summaryrefslogtreecommitdiff
path: root/TAO/tests
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
commit6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch)
treeda50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tests
parent0e555b9150d38e3b3473ba325b56db2642e6352b (diff)
downloadATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/tests')
-rw-r--r--TAO/tests/AMH_Exceptions/.cvsignore2
-rw-r--r--TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc15
-rw-r--r--TAO/tests/AMH_Exceptions/Test.idl28
-rw-r--r--TAO/tests/AMH_Exceptions/client.cpp57
-rwxr-xr-xTAO/tests/AMH_Exceptions/run_test.pl54
-rw-r--r--TAO/tests/AMH_Exceptions/server.cpp241
-rw-r--r--TAO/tests/AMH_Oneway/.cvsignore2
-rw-r--r--TAO/tests/AMH_Oneway/AMH_Oneway.mpc15
-rw-r--r--TAO/tests/AMH_Oneway/Test.idl17
-rw-r--r--TAO/tests/AMH_Oneway/client.cpp76
-rwxr-xr-xTAO/tests/AMH_Oneway/run_test.pl66
-rw-r--r--TAO/tests/AMH_Oneway/server.cpp283
-rw-r--r--TAO/tests/AMI/.cvsignore3
-rw-r--r--TAO/tests/AMI/AMI.mpc23
-rw-r--r--TAO/tests/AMI/README39
-rw-r--r--TAO/tests/AMI/ami_test.idl39
-rw-r--r--TAO/tests/AMI/ami_test_i.cpp93
-rw-r--r--TAO/tests/AMI/ami_test_i.h62
-rw-r--r--TAO/tests/AMI/client.cpp348
-rw-r--r--TAO/tests/AMI/exclusive.conf2
-rw-r--r--TAO/tests/AMI/exclusive.conf.xml5
-rw-r--r--TAO/tests/AMI/muxed.conf2
-rw-r--r--TAO/tests/AMI/muxed.conf.xml5
-rwxr-xr-xTAO/tests/AMI/run_test.pl72
-rw-r--r--TAO/tests/AMI/server.conf3
-rw-r--r--TAO/tests/AMI/server.conf.xml7
-rw-r--r--TAO/tests/AMI/server.cpp134
-rw-r--r--TAO/tests/AMI/simple_client.cpp325
-rw-r--r--TAO/tests/AMI_Buffering/.cvsignore3
-rw-r--r--TAO/tests/AMI_Buffering/AMI_Buffering.cpp86
-rw-r--r--TAO/tests/AMI_Buffering/AMI_Buffering.h64
-rw-r--r--TAO/tests/AMI_Buffering/AMI_Buffering.mpc28
-rw-r--r--TAO/tests/AMI_Buffering/AMI_Buffering_Admin.cpp50
-rw-r--r--TAO/tests/AMI_Buffering/AMI_Buffering_Admin.h48
-rw-r--r--TAO/tests/AMI_Buffering/Client_Task.cpp48
-rw-r--r--TAO/tests/AMI_Buffering/Client_Task.h42
-rw-r--r--TAO/tests/AMI_Buffering/README32
-rw-r--r--TAO/tests/AMI_Buffering/Reply_Handler.cpp82
-rw-r--r--TAO/tests/AMI_Buffering/Reply_Handler.h40
-rw-r--r--TAO/tests/AMI_Buffering/Test.idl55
-rw-r--r--TAO/tests/AMI_Buffering/admin.cpp113
-rw-r--r--TAO/tests/AMI_Buffering/client.cpp890
-rwxr-xr-xTAO/tests/AMI_Buffering/run_buffer_size.pl71
-rwxr-xr-xTAO/tests/AMI_Buffering/run_message_count.pl71
-rwxr-xr-xTAO/tests/AMI_Buffering/run_test.pl68
-rwxr-xr-xTAO/tests/AMI_Buffering/run_timeout.pl71
-rwxr-xr-xTAO/tests/AMI_Buffering/run_timeout_reactive.pl71
-rw-r--r--TAO/tests/AMI_Buffering/server.cpp136
-rw-r--r--TAO/tests/AMI_Timeouts/.cvsignore2
-rw-r--r--TAO/tests/AMI_Timeouts/AMI_Timeouts.mpc20
-rw-r--r--TAO/tests/AMI_Timeouts/README20
-rw-r--r--TAO/tests/AMI_Timeouts/client.cpp157
-rwxr-xr-xTAO/tests/AMI_Timeouts/run_test.pl47
-rw-r--r--TAO/tests/AMI_Timeouts/server.cpp154
-rw-r--r--TAO/tests/AMI_Timeouts/svc.conf2
-rw-r--r--TAO/tests/AMI_Timeouts/svc.conf.xml5
-rw-r--r--TAO/tests/AMI_Timeouts/timeout.idl27
-rw-r--r--TAO/tests/AMI_Timeouts/timeout_client.cpp335
-rw-r--r--TAO/tests/AMI_Timeouts/timeout_client.h81
-rw-r--r--TAO/tests/AMI_Timeouts/timeout_i.cpp146
-rw-r--r--TAO/tests/AMI_Timeouts/timeout_i.h86
-rw-r--r--TAO/tests/Abstract_Interface/.cvsignore2
-rw-r--r--TAO/tests/Abstract_Interface/Abstract_Interface.mpc41
-rw-r--r--TAO/tests/Abstract_Interface/README49
-rw-r--r--TAO/tests/Abstract_Interface/client.cpp340
-rwxr-xr-xTAO/tests/Abstract_Interface/run_test.pl54
-rw-r--r--TAO/tests/Abstract_Interface/server.cpp171
-rw-r--r--TAO/tests/Abstract_Interface/test.idl42
-rw-r--r--TAO/tests/Abstract_Interface/test_i.cpp106
-rw-r--r--TAO/tests/Abstract_Interface/test_i.h40
-rw-r--r--TAO/tests/AlternateIIOP/README18
-rwxr-xr-xTAO/tests/AlternateIIOP/run_test.pl44
-rw-r--r--TAO/tests/Any/Recursive/Hello.cpp38
-rw-r--r--TAO/tests/Any/Recursive/Hello.h44
-rw-r--r--TAO/tests/Any/Recursive/NonRecursive.idl22
-rw-r--r--TAO/tests/Any/Recursive/README19
-rw-r--r--TAO/tests/Any/Recursive/RecursiveHello.mpc21
-rw-r--r--TAO/tests/Any/Recursive/Test.idl113
-rw-r--r--TAO/tests/Any/Recursive/client.cpp486
-rwxr-xr-xTAO/tests/Any/Recursive/run_test.pl51
-rw-r--r--TAO/tests/Any/Recursive/server.cpp115
-rw-r--r--TAO/tests/BiDirectional/.cvsignore2
-rw-r--r--TAO/tests/BiDirectional/BiDirectional.mpc19
-rw-r--r--TAO/tests/BiDirectional/README20
-rw-r--r--TAO/tests/BiDirectional/client.cpp161
-rwxr-xr-xTAO/tests/BiDirectional/run_test.pl48
-rwxr-xr-xTAO/tests/BiDirectional/run_test_ipv6.pl48
-rw-r--r--TAO/tests/BiDirectional/server.cpp175
-rw-r--r--TAO/tests/BiDirectional/test.idl27
-rw-r--r--TAO/tests/BiDirectional/test_i.cpp95
-rw-r--r--TAO/tests/BiDirectional/test_i.h92
-rw-r--r--TAO/tests/BiDirectional/test_i.i17
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc18
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/README6
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/client.cpp173
-rwxr-xr-xTAO/tests/BiDirectional_DelayedUpcall/run_test.pl48
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/server.cpp164
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test.idl27
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp106
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test_i.h93
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/test_i.i17
-rw-r--r--TAO/tests/BiDirectional_MultipleORB/.cvsignore1
-rw-r--r--TAO/tests/BiDirectional_MultipleORB/README23
-rw-r--r--TAO/tests/BiDirectional_MultipleORB/destroy.cpp124
-rw-r--r--TAO/tests/BiDirectional_MultipleORB/destroy.mpc10
-rwxr-xr-xTAO/tests/BiDirectional_MultipleORB/run_test.pl21
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/.cvsignore2
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc18
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/README7
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/client.cpp168
-rwxr-xr-xTAO/tests/BiDirectional_NestedUpcall/run_test.pl48
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/server.cpp164
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/test.idl27
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/test_i.cpp80
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/test_i.h89
-rw-r--r--TAO/tests/BiDirectional_NestedUpcall/test_i.i17
-rw-r--r--TAO/tests/Big_AMI/Big_AMI.mpc17
-rw-r--r--TAO/tests/Big_AMI/README18
-rw-r--r--TAO/tests/Big_AMI/ami_test.idl29
-rw-r--r--TAO/tests/Big_AMI/ami_test_i.cpp51
-rw-r--r--TAO/tests/Big_AMI/ami_test_i.h47
-rw-r--r--TAO/tests/Big_AMI/client.cpp265
-rwxr-xr-xTAO/tests/Big_AMI/run_test.pl52
-rw-r--r--TAO/tests/Big_AMI/server.cpp134
-rw-r--r--TAO/tests/Big_Oneways/.cvsignore2
-rw-r--r--TAO/tests/Big_Oneways/Big_Oneways.mpc21
-rw-r--r--TAO/tests/Big_Oneways/Coordinator.cpp83
-rw-r--r--TAO/tests/Big_Oneways/Coordinator.h55
-rw-r--r--TAO/tests/Big_Oneways/Peer.cpp51
-rw-r--r--TAO/tests/Big_Oneways/Peer.h39
-rw-r--r--TAO/tests/Big_Oneways/README21
-rw-r--r--TAO/tests/Big_Oneways/Session.cpp282
-rw-r--r--TAO/tests/Big_Oneways/Session.h112
-rw-r--r--TAO/tests/Big_Oneways/Session_Control.cpp75
-rw-r--r--TAO/tests/Big_Oneways/Session_Control.h45
-rw-r--r--TAO/tests/Big_Oneways/Session_Task.cpp19
-rw-r--r--TAO/tests/Big_Oneways/Session_Task.h33
-rw-r--r--TAO/tests/Big_Oneways/Test.idl83
-rw-r--r--TAO/tests/Big_Oneways/client.cpp118
-rwxr-xr-xTAO/tests/Big_Oneways/run_test.pl88
-rw-r--r--TAO/tests/Big_Oneways/server.cpp230
-rw-r--r--TAO/tests/Big_Reply/.cvsignore2
-rw-r--r--TAO/tests/Big_Reply/Big_Reply.mpc20
-rw-r--r--TAO/tests/Big_Reply/Big_Reply_i.cpp39
-rw-r--r--TAO/tests/Big_Reply/Big_Reply_i.h58
-rw-r--r--TAO/tests/Big_Reply/Client_Task.cpp73
-rw-r--r--TAO/tests/Big_Reply/Client_Task.h43
-rw-r--r--TAO/tests/Big_Reply/README18
-rw-r--r--TAO/tests/Big_Reply/Test.idl18
-rw-r--r--TAO/tests/Big_Reply/client.cpp92
-rwxr-xr-xTAO/tests/Big_Reply/run_test.pl49
-rw-r--r--TAO/tests/Big_Reply/server.cpp122
-rw-r--r--TAO/tests/Big_Request_Muxing/.cvsignore2
-rw-r--r--TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc18
-rw-r--r--TAO/tests/Big_Request_Muxing/Client_Task.cpp134
-rw-r--r--TAO/tests/Big_Request_Muxing/Client_Task.h67
-rw-r--r--TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp43
-rw-r--r--TAO/tests/Big_Request_Muxing/Payload_Receiver.h38
-rw-r--r--TAO/tests/Big_Request_Muxing/README24
-rw-r--r--TAO/tests/Big_Request_Muxing/Test.idl19
-rw-r--r--TAO/tests/Big_Request_Muxing/client.cpp143
-rwxr-xr-xTAO/tests/Big_Request_Muxing/run_test.pl61
-rw-r--r--TAO/tests/Big_Request_Muxing/server.cpp176
-rw-r--r--TAO/tests/Big_Request_Muxing/svc.conf4
-rw-r--r--TAO/tests/Big_Request_Muxing/svc.conf.xml8
-rw-r--r--TAO/tests/Big_Twoways/.cvsignore2
-rw-r--r--TAO/tests/Big_Twoways/Big_Twoways.mpc21
-rw-r--r--TAO/tests/Big_Twoways/Coordinator.cpp83
-rw-r--r--TAO/tests/Big_Twoways/Coordinator.h54
-rw-r--r--TAO/tests/Big_Twoways/Peer.cpp51
-rw-r--r--TAO/tests/Big_Twoways/Peer.h39
-rw-r--r--TAO/tests/Big_Twoways/README21
-rw-r--r--TAO/tests/Big_Twoways/Session.cpp282
-rw-r--r--TAO/tests/Big_Twoways/Session.h110
-rw-r--r--TAO/tests/Big_Twoways/Session_Control.cpp75
-rw-r--r--TAO/tests/Big_Twoways/Session_Control.h45
-rw-r--r--TAO/tests/Big_Twoways/Session_Task.cpp19
-rw-r--r--TAO/tests/Big_Twoways/Session_Task.h33
-rw-r--r--TAO/tests/Big_Twoways/Test.idl80
-rw-r--r--TAO/tests/Big_Twoways/client.cpp119
-rwxr-xr-xTAO/tests/Big_Twoways/run_test.pl92
-rw-r--r--TAO/tests/Big_Twoways/server.cpp233
-rw-r--r--TAO/tests/Blocking_Sync_None/.cvsignore2
-rw-r--r--TAO/tests/Blocking_Sync_None/Blocking_Sync_None.cpp29
-rw-r--r--TAO/tests/Blocking_Sync_None/Blocking_Sync_None.h34
-rw-r--r--TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc18
-rw-r--r--TAO/tests/Blocking_Sync_None/README17
-rw-r--r--TAO/tests/Blocking_Sync_None/Test.idl26
-rw-r--r--TAO/tests/Blocking_Sync_None/client.cpp158
-rwxr-xr-xTAO/tests/Blocking_Sync_None/run_test.pl48
-rw-r--r--TAO/tests/Blocking_Sync_None/server.cpp113
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc19
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Client_Task.cpp31
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Client_Task.h32
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Echo.cpp43
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Echo.h33
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.cpp40
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.h29
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/README42
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Server_Task.cpp43
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Server_Task.h40
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/Test.idl29
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/client.cpp186
-rwxr-xr-xTAO/tests/Bug_1020_Basic_Regression/run_test.pl57
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/server.cpp131
-rw-r--r--TAO/tests/Bug_1020_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1020_Regression/Bug_1020_Regression.mpc19
-rw-r--r--TAO/tests/Bug_1020_Regression/Echo.cpp29
-rw-r--r--TAO/tests/Bug_1020_Regression/Echo.h26
-rw-r--r--TAO/tests/Bug_1020_Regression/Echo_Callback.cpp36
-rw-r--r--TAO/tests/Bug_1020_Regression/Echo_Callback.h26
-rw-r--r--TAO/tests/Bug_1020_Regression/ORB_Task.cpp33
-rw-r--r--TAO/tests/Bug_1020_Regression/ORB_Task.h25
-rw-r--r--TAO/tests/Bug_1020_Regression/Server_Task.cpp41
-rw-r--r--TAO/tests/Bug_1020_Regression/Server_Task.h31
-rw-r--r--TAO/tests/Bug_1020_Regression/Server_i.cpp20
-rw-r--r--TAO/tests/Bug_1020_Regression/Server_i.h27
-rw-r--r--TAO/tests/Bug_1020_Regression/Test.idl26
-rw-r--r--TAO/tests/Bug_1020_Regression/client.cpp205
-rwxr-xr-xTAO/tests/Bug_1020_Regression/run_test.pl62
-rw-r--r--TAO/tests/Bug_1020_Regression/server.cpp148
-rw-r--r--TAO/tests/Bug_1254_Regression/BlobServer.cpp42
-rw-r--r--TAO/tests/Bug_1254_Regression/BlobServer.h37
-rw-r--r--TAO/tests/Bug_1254_Regression/Bug_1254_Regression.mpc19
-rw-r--r--TAO/tests/Bug_1254_Regression/client.cpp113
-rwxr-xr-xTAO/tests/Bug_1254_Regression/run_test.pl54
-rw-r--r--TAO/tests/Bug_1254_Regression/server.cpp112
-rw-r--r--TAO/tests/Bug_1254_Regression/test.idl32
-rw-r--r--TAO/tests/Bug_1269_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc18
-rw-r--r--TAO/tests/Bug_1269_Regression/Echo.cpp43
-rw-r--r--TAO/tests/Bug_1269_Regression/Echo.h29
-rw-r--r--TAO/tests/Bug_1269_Regression/Echo_Caller.cpp40
-rw-r--r--TAO/tests/Bug_1269_Regression/Echo_Caller.h29
-rw-r--r--TAO/tests/Bug_1269_Regression/ORB_Task.cpp33
-rw-r--r--TAO/tests/Bug_1269_Regression/ORB_Task.h25
-rw-r--r--TAO/tests/Bug_1269_Regression/Server_Timer.cpp71
-rw-r--r--TAO/tests/Bug_1269_Regression/Server_Timer.h39
-rw-r--r--TAO/tests/Bug_1269_Regression/Test.idl28
-rw-r--r--TAO/tests/Bug_1269_Regression/client.cpp170
-rwxr-xr-xTAO/tests/Bug_1269_Regression/run_test.pl61
-rw-r--r--TAO/tests/Bug_1269_Regression/server.cpp134
-rw-r--r--TAO/tests/Bug_1269_Regression/shutdown.cpp85
-rw-r--r--TAO/tests/Bug_1270_Regression/.cvsignore3
-rw-r--r--TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc25
-rw-r--r--TAO/tests/Bug_1270_Regression/Echo.cpp43
-rw-r--r--TAO/tests/Bug_1270_Regression/Echo.h31
-rw-r--r--TAO/tests/Bug_1270_Regression/Echo_Caller.cpp40
-rw-r--r--TAO/tests/Bug_1270_Regression/Echo_Caller.h30
-rw-r--r--TAO/tests/Bug_1270_Regression/ORB_Task.cpp33
-rw-r--r--TAO/tests/Bug_1270_Regression/ORB_Task.h25
-rw-r--r--TAO/tests/Bug_1270_Regression/Server_Timer.cpp74
-rw-r--r--TAO/tests/Bug_1270_Regression/Server_Timer.h41
-rw-r--r--TAO/tests/Bug_1270_Regression/Test.idl28
-rw-r--r--TAO/tests/Bug_1270_Regression/client.cpp171
-rwxr-xr-xTAO/tests/Bug_1270_Regression/run_test.pl65
-rw-r--r--TAO/tests/Bug_1270_Regression/server.cpp134
-rw-r--r--TAO/tests/Bug_1270_Regression/shutdown.cpp85
-rw-r--r--TAO/tests/Bug_1330_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc17
-rw-r--r--TAO/tests/Bug_1330_Regression/README3
-rw-r--r--TAO/tests/Bug_1330_Regression/Test.idl8
-rw-r--r--TAO/tests/Bug_1330_Regression/Test_i.cpp21
-rw-r--r--TAO/tests/Bug_1330_Regression/Test_i.h26
-rw-r--r--TAO/tests/Bug_1330_Regression/client.cpp83
-rwxr-xr-xTAO/tests/Bug_1330_Regression/run_test.pl58
-rw-r--r--TAO/tests/Bug_1330_Regression/server.cpp125
-rw-r--r--TAO/tests/Bug_1361_Regression/.cvsignore3
-rw-r--r--TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc27
-rw-r--r--TAO/tests/Bug_1361_Regression/Echo.cpp59
-rw-r--r--TAO/tests/Bug_1361_Regression/Echo.h40
-rw-r--r--TAO/tests/Bug_1361_Regression/Echo_Caller.cpp36
-rw-r--r--TAO/tests/Bug_1361_Regression/Echo_Caller.h33
-rw-r--r--TAO/tests/Bug_1361_Regression/ORB_Task.cpp34
-rw-r--r--TAO/tests/Bug_1361_Regression/ORB_Task.h25
-rw-r--r--TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp177
-rw-r--r--TAO/tests/Bug_1361_Regression/Server_Thread_Pool.h33
-rw-r--r--TAO/tests/Bug_1361_Regression/Server_Timer.cpp67
-rw-r--r--TAO/tests/Bug_1361_Regression/Server_Timer.h41
-rw-r--r--TAO/tests/Bug_1361_Regression/Test.idl29
-rw-r--r--TAO/tests/Bug_1361_Regression/client.cpp227
-rwxr-xr-xTAO/tests/Bug_1361_Regression/run_test.pl75
-rw-r--r--TAO/tests/Bug_1361_Regression/server.cpp149
-rw-r--r--TAO/tests/Bug_1361_Regression/shutdown.cpp98
-rw-r--r--TAO/tests/Bug_1476_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc20
-rw-r--r--TAO/tests/Bug_1476_Regression/Client_Task.cpp82
-rw-r--r--TAO/tests/Bug_1476_Regression/Client_Task.h42
-rw-r--r--TAO/tests/Bug_1476_Regression/README26
-rw-r--r--TAO/tests/Bug_1476_Regression/Sender_i.cpp45
-rw-r--r--TAO/tests/Bug_1476_Regression/Sender_i.h58
-rw-r--r--TAO/tests/Bug_1476_Regression/Server_Task.cpp35
-rw-r--r--TAO/tests/Bug_1476_Regression/Server_Task.h33
-rw-r--r--TAO/tests/Bug_1476_Regression/Test.idl15
-rw-r--r--TAO/tests/Bug_1476_Regression/client.cpp202
-rwxr-xr-xTAO/tests/Bug_1476_Regression/run_test.pl44
-rw-r--r--TAO/tests/Bug_1476_Regression/server.cpp143
-rw-r--r--TAO/tests/Bug_1482_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1482_Regression/Bug_1482_Regression.mpc20
-rw-r--r--TAO/tests/Bug_1482_Regression/Client_Task.cpp73
-rw-r--r--TAO/tests/Bug_1482_Regression/Client_Task.h43
-rw-r--r--TAO/tests/Bug_1482_Regression/Hello.cpp48
-rw-r--r--TAO/tests/Bug_1482_Regression/Hello.h36
-rw-r--r--TAO/tests/Bug_1482_Regression/Reply_Handler.cpp49
-rw-r--r--TAO/tests/Bug_1482_Regression/Reply_Handler.h32
-rw-r--r--TAO/tests/Bug_1482_Regression/Server_Task.cpp32
-rw-r--r--TAO/tests/Bug_1482_Regression/Server_Task.h34
-rw-r--r--TAO/tests/Bug_1482_Regression/Test.idl14
-rw-r--r--TAO/tests/Bug_1482_Regression/client.cpp140
-rwxr-xr-xTAO/tests/Bug_1482_Regression/run_test.pl71
-rw-r--r--TAO/tests/Bug_1482_Regression/server.cpp125
-rw-r--r--TAO/tests/Bug_1495_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1495_Regression/Bug_1495.mpc27
-rw-r--r--TAO/tests/Bug_1495_Regression/Client_ORBInitializer.cpp51
-rw-r--r--TAO/tests/Bug_1495_Regression/Client_ORBInitializer.h48
-rw-r--r--TAO/tests/Bug_1495_Regression/Client_Task.cpp88
-rw-r--r--TAO/tests/Bug_1495_Regression/Client_Task.h46
-rw-r--r--TAO/tests/Bug_1495_Regression/Server_ORBInitializer.cpp49
-rw-r--r--TAO/tests/Bug_1495_Regression/Server_ORBInitializer.h59
-rw-r--r--TAO/tests/Bug_1495_Regression/Server_Task.cpp117
-rw-r--r--TAO/tests/Bug_1495_Regression/Server_Task.h50
-rw-r--r--TAO/tests/Bug_1495_Regression/Threaded_Client.cpp130
-rw-r--r--TAO/tests/Bug_1495_Regression/Threaded_Server.cpp190
-rw-r--r--TAO/tests/Bug_1495_Regression/client_interceptor.cpp91
-rw-r--r--TAO/tests/Bug_1495_Regression/client_interceptor.h78
-rwxr-xr-xTAO/tests/Bug_1495_Regression/run_test.pl50
-rwxr-xr-xTAO/tests/Bug_1495_Regression/run_test_complex.pl63
-rw-r--r--TAO/tests/Bug_1495_Regression/server_interceptor.cpp145
-rw-r--r--TAO/tests/Bug_1495_Regression/server_interceptor.h83
-rw-r--r--TAO/tests/Bug_1495_Regression/test.idl30
-rw-r--r--TAO/tests/Bug_1495_Regression/test_i.cpp58
-rw-r--r--TAO/tests/Bug_1495_Regression/test_i.h65
-rw-r--r--TAO/tests/Bug_1535_Regression/.cvsignore1
-rw-r--r--TAO/tests/Bug_1535_Regression/Bug_1535_Regression.mpc9
-rw-r--r--TAO/tests/Bug_1535_Regression/Test.idl6
-rw-r--r--TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp232
-rwxr-xr-xTAO/tests/Bug_1535_Regression/run_test.pl31
-rw-r--r--TAO/tests/Bug_1551_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1551_Regression/Bug_1551_Regression.mpc20
-rw-r--r--TAO/tests/Bug_1551_Regression/Client_Task.cpp53
-rw-r--r--TAO/tests/Bug_1551_Regression/Client_Task.h41
-rw-r--r--TAO/tests/Bug_1551_Regression/Hello.cpp36
-rw-r--r--TAO/tests/Bug_1551_Regression/Hello.h31
-rw-r--r--TAO/tests/Bug_1551_Regression/README5
-rw-r--r--TAO/tests/Bug_1551_Regression/Reply_Handler.cpp92
-rw-r--r--TAO/tests/Bug_1551_Regression/Reply_Handler.h37
-rw-r--r--TAO/tests/Bug_1551_Regression/Server_Task.cpp32
-rw-r--r--TAO/tests/Bug_1551_Regression/Server_Task.h25
-rw-r--r--TAO/tests/Bug_1551_Regression/Test.idl12
-rw-r--r--TAO/tests/Bug_1551_Regression/client.cpp163
-rwxr-xr-xTAO/tests/Bug_1551_Regression/run_test.pl76
-rw-r--r--TAO/tests/Bug_1551_Regression/server.cpp136
-rw-r--r--TAO/tests/Bug_1568_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc16
-rw-r--r--TAO/tests/Bug_1568_Regression/Test.idl31
-rw-r--r--TAO/tests/Bug_1568_Regression/client.cpp88
-rwxr-xr-xTAO/tests/Bug_1568_Regression/run_test.pl48
-rw-r--r--TAO/tests/Bug_1568_Regression/server.cpp199
-rw-r--r--TAO/tests/Bug_1627_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1627_Regression/Bug_1627_Regression.mpc17
-rw-r--r--TAO/tests/Bug_1627_Regression/README4
-rw-r--r--TAO/tests/Bug_1627_Regression/Test.idl7
-rw-r--r--TAO/tests/Bug_1627_Regression/Test_i.cpp21
-rw-r--r--TAO/tests/Bug_1627_Regression/Test_i.h25
-rw-r--r--TAO/tests/Bug_1627_Regression/client.cpp83
-rwxr-xr-xTAO/tests/Bug_1627_Regression/run_test.pl51
-rw-r--r--TAO/tests/Bug_1627_Regression/server.cpp125
-rw-r--r--TAO/tests/Bug_1628_Regression/TestCase.idl16
-rw-r--r--TAO/tests/Bug_1628_Regression/TestType.idl16
-rwxr-xr-xTAO/tests/Bug_1628_Regression/run_test.pl62
-rw-r--r--TAO/tests/Bug_1635_Regression/.cvsignore1
-rw-r--r--TAO/tests/Bug_1635_Regression/Bug_1635_Regression.mpc9
-rw-r--r--TAO/tests/Bug_1635_Regression/README7
-rw-r--r--TAO/tests/Bug_1635_Regression/client.cpp26
-rwxr-xr-xTAO/tests/Bug_1635_Regression/run_test.pl78
-rw-r--r--TAO/tests/Bug_1636_Regression/.cvsignore1
-rw-r--r--TAO/tests/Bug_1636_Regression/README14
-rw-r--r--TAO/tests/Bug_1636_Regression/client.cpp91
-rwxr-xr-xTAO/tests/Bug_1636_Regression/run_test.pl25
-rw-r--r--TAO/tests/Bug_1636_Regression/test.idl26
-rw-r--r--TAO/tests/Bug_1636_Regression/test.mpc16
-rw-r--r--TAO/tests/Bug_1639_Regression/.cvsignore1
-rwxr-xr-xTAO/tests/Bug_1639_Regression/run_test.pl26
-rw-r--r--TAO/tests/Bug_1639_Regression/struct.idl20
-rw-r--r--TAO/tests/Bug_1639_Regression/struct_client.cpp118
-rw-r--r--TAO/tests/Bug_1639_Regression/test.mpc16
-rw-r--r--TAO/tests/Bug_1670_Regression/.cvsignore2
-rw-r--r--TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc16
-rw-r--r--TAO/tests/Bug_1670_Regression/Test.idl31
-rw-r--r--TAO/tests/Bug_1670_Regression/client.cpp133
-rwxr-xr-xTAO/tests/Bug_1670_Regression/run_test.pl48
-rw-r--r--TAO/tests/Bug_1670_Regression/server.cpp199
-rw-r--r--TAO/tests/Bug_1676_Regression/Bug_1676_Regression.mpc19
-rw-r--r--TAO/tests/Bug_1676_Regression/Hello.cpp98
-rw-r--r--TAO/tests/Bug_1676_Regression/Hello.h54
-rw-r--r--TAO/tests/Bug_1676_Regression/Test.idl39
-rw-r--r--TAO/tests/Bug_1676_Regression/client.cpp151
-rwxr-xr-xTAO/tests/Bug_1676_Regression/run_test.pl49
-rw-r--r--TAO/tests/Bug_1676_Regression/server.cpp115
-rw-r--r--TAO/tests/Bug_1693_Test/.cvsignore1
-rw-r--r--TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc10
-rw-r--r--TAO/tests/Bug_1693_Test/client.cpp100
-rwxr-xr-xTAO/tests/Bug_1693_Test/run_test.pl27
-rw-r--r--TAO/tests/Bug_1693_Test/test.idl18
-rwxr-xr-xTAO/tests/Bug_1812_Regression/Bug_1812_Regession.mpc9
-rwxr-xr-xTAO/tests/Bug_1812_Regression/Test.idl7
-rwxr-xr-xTAO/tests/Bug_1812_Regression/test.cpp12
-rwxr-xr-xTAO/tests/Bug_1813_Regression/Bug_1813_Regession.mpc9
-rwxr-xr-xTAO/tests/Bug_1813_Regression/Test.idl8
-rwxr-xr-xTAO/tests/Bug_1813_Regression/test.cpp12
-rw-r--r--TAO/tests/Bug_1869_Regression/AMI.idl7
-rw-r--r--TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc14
-rw-r--r--TAO/tests/Bug_1869_Regression/client.cpp93
-rw-r--r--TAO/tests/Bug_1869_Regression/run_test.pl40
-rw-r--r--TAO/tests/Bug_1869_Regression/server.cpp87
-rw-r--r--TAO/tests/Bug_1904_Regression/.cvsignore1
-rw-r--r--TAO/tests/Bug_1904_Regression/test.cpp12
-rw-r--r--TAO/tests/Bug_1904_Regression/test.idl5
-rw-r--r--TAO/tests/Bug_1904_Regression/test.mpc9
-rw-r--r--TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc6
-rw-r--r--TAO/tests/Bug_2084_Regression/Client_Task.cpp100
-rw-r--r--TAO/tests/Bug_2084_Regression/Client_Task.h37
-rw-r--r--TAO/tests/Bug_2084_Regression/Collocated_Test.cpp127
-rw-r--r--TAO/tests/Bug_2084_Regression/EventNode.cpp60
-rw-r--r--TAO/tests/Bug_2084_Regression/EventNode.h38
-rw-r--r--TAO/tests/Bug_2084_Regression/Hello.cpp68
-rw-r--r--TAO/tests/Bug_2084_Regression/Hello.h38
-rw-r--r--TAO/tests/Bug_2084_Regression/Server_Task.cpp102
-rw-r--r--TAO/tests/Bug_2084_Regression/Server_Task.h48
-rw-r--r--TAO/tests/Bug_2084_Regression/Test.idl27
-rwxr-xr-xTAO/tests/Bug_2084_Regression/run_test.pl82
-rw-r--r--TAO/tests/Bug_2119_Regression/README3
-rw-r--r--TAO/tests/Bug_2119_Regression/test.idl8
-rw-r--r--TAO/tests/Bug_2119_Regression/test.mpc6
-rw-r--r--TAO/tests/Bug_2122_Regression/Bug_2122_Regression.mpc9
-rw-r--r--TAO/tests/Bug_2122_Regression/README6
-rw-r--r--TAO/tests/Bug_2122_Regression/Test.idl51
-rw-r--r--TAO/tests/Bug_2122_Regression/test.cpp15
-rw-r--r--TAO/tests/Bug_2124_Regression/Bug_2124_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2124_Regression/README6
-rw-r--r--TAO/tests/Bug_2124_Regression/Test.idl19
-rw-r--r--TAO/tests/Bug_2124_Regression/test.cpp15
-rw-r--r--TAO/tests/Bug_2126_Regression/Bug_2126_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2126_Regression/README6
-rw-r--r--TAO/tests/Bug_2126_Regression/Test.idl26
-rw-r--r--TAO/tests/Bug_2126_Regression/test.cpp15
-rw-r--r--TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2134_Regression/Hello.cpp105
-rw-r--r--TAO/tests/Bug_2134_Regression/Hello.idl7
-rw-r--r--TAO/tests/Bug_2134_Regression/README5
-rwxr-xr-xTAO/tests/Bug_2134_Regression/run_test.pl22
-rwxr-xr-xTAO/tests/Bug_2144_Regression/Bug_2144_Regression.mpc10
-rwxr-xr-xTAO/tests/Bug_2144_Regression/README4
-rwxr-xr-xTAO/tests/Bug_2144_Regression/test.cpp10
-rwxr-xr-xTAO/tests/Bug_2144_Regression/test.idl17
-rw-r--r--TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc18
-rw-r--r--TAO/tests/Bug_2174_Regression/README3
-rw-r--r--TAO/tests/Bug_2174_Regression/client.cpp103
-rwxr-xr-xTAO/tests/Bug_2174_Regression/run_test.pl81
-rw-r--r--TAO/tests/Bug_2174_Regression/server.cpp122
-rw-r--r--TAO/tests/Bug_2174_Regression/test.idl12
-rw-r--r--TAO/tests/Bug_2174_Regression/test_i.cpp37
-rw-r--r--TAO/tests/Bug_2174_Regression/test_i.h46
-rwxr-xr-xTAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc18
-rwxr-xr-xTAO/tests/Bug_2183_Regression/Hello.cpp25
-rwxr-xr-xTAO/tests/Bug_2183_Regression/Hello.h42
-rwxr-xr-xTAO/tests/Bug_2183_Regression/README18
-rwxr-xr-xTAO/tests/Bug_2183_Regression/Test.idl20
-rwxr-xr-xTAO/tests/Bug_2183_Regression/client.cpp86
-rwxr-xr-xTAO/tests/Bug_2183_Regression/hang_client.pl26
-rwxr-xr-xTAO/tests/Bug_2183_Regression/run_test.pl72
-rwxr-xr-xTAO/tests/Bug_2183_Regression/server.conf3
-rwxr-xr-xTAO/tests/Bug_2183_Regression/server.cpp116
-rw-r--r--TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc18
-rw-r--r--TAO/tests/Bug_2186_Regression/Hello.cpp45
-rw-r--r--TAO/tests/Bug_2186_Regression/Hello.h36
-rw-r--r--TAO/tests/Bug_2186_Regression/README60
-rw-r--r--TAO/tests/Bug_2186_Regression/Test.idl22
-rw-r--r--TAO/tests/Bug_2186_Regression/client.cpp132
-rwxr-xr-xTAO/tests/Bug_2186_Regression/run_test.pl63
-rw-r--r--TAO/tests/Bug_2186_Regression/server.conf2
-rw-r--r--TAO/tests/Bug_2186_Regression/server.cpp115
-rw-r--r--TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc9
-rw-r--r--TAO/tests/Bug_2201_Regression/TestData.idl11
-rwxr-xr-xTAO/tests/Bug_2201_Regression/run_test.pl27
-rw-r--r--TAO/tests/Bug_2201_Regression/test.cpp32
-rwxr-xr-xTAO/tests/Bug_2222_Regression/Bug_2222_Regression.mpc10
-rwxr-xr-xTAO/tests/Bug_2222_Regression/TestCase.idl6
-rwxr-xr-xTAO/tests/Bug_2222_Regression/TestType.idl3
-rwxr-xr-xTAO/tests/Bug_2222_Regression/test.cpp22
-rw-r--r--TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc25
-rw-r--r--TAO/tests/Bug_2234_Regression/Test.idl41
-rw-r--r--TAO/tests/Bug_2234_Regression/client.cpp332
-rwxr-xr-xTAO/tests/Bug_2234_Regression/run_test.pl57
-rw-r--r--TAO/tests/Bug_2234_Regression/server.cpp748
-rw-r--r--TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc21
-rw-r--r--TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp20
-rw-r--r--TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h21
-rw-r--r--TAO/tests/Bug_2289_Regression/README26
-rw-r--r--TAO/tests/Bug_2289_Regression/Test.idl8
-rw-r--r--TAO/tests/Bug_2289_Regression/client.cpp145
-rwxr-xr-xTAO/tests/Bug_2289_Regression/run_test.pl60
-rw-r--r--TAO/tests/Bug_2289_Regression/server.cpp142
-rw-r--r--TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2319_Regression/Test.idl17
-rwxr-xr-xTAO/tests/Bug_2319_Regression/run_test.pl24
-rw-r--r--TAO/tests/Bug_2319_Regression/server.cpp365
-rw-r--r--TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2328_Regression/Hello.cpp26
-rw-r--r--TAO/tests/Bug_2328_Regression/Hello.h33
-rw-r--r--TAO/tests/Bug_2328_Regression/README16
-rw-r--r--TAO/tests/Bug_2328_Regression/Test.idl20
-rw-r--r--TAO/tests/Bug_2328_Regression/client.cpp89
-rwxr-xr-xTAO/tests/Bug_2328_Regression/run_test.pl49
-rw-r--r--TAO/tests/Bug_2328_Regression/server.cpp116
-rw-r--r--TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc8
-rwxr-xr-xTAO/tests/Bug_2345_Regression/run_test.pl22
-rw-r--r--TAO/tests/Bug_2345_Regression/server.cpp41
-rw-r--r--TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc17
-rw-r--r--TAO/tests/Bug_2349_Regression/client.cpp39
-rw-r--r--TAO/tests/Bug_2349_Regression/foo.idl8
-rwxr-xr-xTAO/tests/Bug_2349_Regression/run_test.pl49
-rw-r--r--TAO/tests/Bug_2349_Regression/server.cpp115
-rwxr-xr-xTAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc8
-rwxr-xr-xTAO/tests/Bug_2375_Regression/README5
-rwxr-xr-xTAO/tests/Bug_2375_Regression/test.cpp11
-rwxr-xr-xTAO/tests/Bug_2375_Regression/test.idl5
-rw-r--r--TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc11
-rw-r--r--TAO/tests/Bug_2399_Regression/README8
-rw-r--r--TAO/tests/Bug_2399_Regression/included.idl5
-rw-r--r--TAO/tests/Bug_2399_Regression/mytmp/included.idl3
-rw-r--r--TAO/tests/Bug_2399_Regression/test.cpp10
-rw-r--r--TAO/tests/Bug_2399_Regression/test.idl7
-rw-r--r--TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2417_Regression/client.cpp77
-rw-r--r--TAO/tests/Bug_2417_Regression/publisher.idl10
-rw-r--r--TAO/tests/Bug_2417_Regression/publisher_impl.cpp166
-rw-r--r--TAO/tests/Bug_2417_Regression/publisher_impl.h37
-rwxr-xr-xTAO/tests/Bug_2417_Regression/run_test.pl54
-rw-r--r--TAO/tests/Bug_2417_Regression/server.cpp93
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber.idl7
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber_impl.cpp45
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber_impl.h34
-rw-r--r--TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2419_Regression/README3
-rw-r--r--TAO/tests/Bug_2419_Regression/abstract_parent.idl6
-rw-r--r--TAO/tests/Bug_2419_Regression/client.cpp8
-rw-r--r--TAO/tests/Bug_2419_Regression/local_child.idl6
-rw-r--r--TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl2
-rw-r--r--TAO/tests/Bug_2424_Regression/README5
-rw-r--r--TAO/tests/Bug_2424_Regression/client.cpp8
-rw-r--r--TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc21
-rw-r--r--TAO/tests/Bug_2429_Regression/Child.idl8
-rw-r--r--TAO/tests/Bug_2429_Regression/ChildServant.cpp30
-rw-r--r--TAO/tests/Bug_2429_Regression/ChildServant.h24
-rw-r--r--TAO/tests/Bug_2429_Regression/Parent.idl8
-rw-r--r--TAO/tests/Bug_2429_Regression/README16
-rw-r--r--TAO/tests/Bug_2429_Regression/client.cpp185
-rwxr-xr-xTAO/tests/Bug_2429_Regression/run_test.pl44
-rw-r--r--TAO/tests/Bug_2429_Regression/server.cpp105
-rw-r--r--TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2494_Regression/README34
-rw-r--r--TAO/tests/Bug_2494_Regression/client.cpp140
-rwxr-xr-xTAO/tests/Bug_2494_Regression/run_test.pl70
-rw-r--r--TAO/tests/Bug_2494_Regression/server.cpp157
-rw-r--r--TAO/tests/Bug_2494_Regression/test.idl10
-rw-r--r--TAO/tests/Bug_2494_Regression/test_i.cpp29
-rw-r--r--TAO/tests/Bug_2494_Regression/test_i.h36
-rw-r--r--TAO/tests/Bug_2494_Regression/test_i.inl7
-rw-r--r--TAO/tests/Bug_2503_Regression/Bug_2503_Regression.mpc20
-rw-r--r--TAO/tests/Bug_2503_Regression/Test.idl8
-rw-r--r--TAO/tests/Bug_2503_Regression/client.cpp103
-rw-r--r--TAO/tests/Bug_2503_Regression/common.cpp45
-rw-r--r--TAO/tests/Bug_2503_Regression/common.h12
-rwxr-xr-xTAO/tests/Bug_2503_Regression/run_test.pl54
-rw-r--r--TAO/tests/Bug_2503_Regression/server.cpp77
-rw-r--r--TAO/tests/Bug_2503_Regression/test_i.cpp38
-rw-r--r--TAO/tests/Bug_2503_Regression/test_i.h25
-rw-r--r--TAO/tests/Bug_2542_Regression/Bug_2542_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2542_Regression/Test.idl9
-rw-r--r--TAO/tests/Bug_2542_Regression/bug_2542_regression.cpp47
-rwxr-xr-xTAO/tests/Bug_2542_Regression/run_test.pl29
-rw-r--r--TAO/tests/Bug_2543_Regression/Bug_2543_Regression.mpc8
-rw-r--r--TAO/tests/Bug_2543_Regression/Test.idl13
-rw-r--r--TAO/tests/Bug_2543_Regression/bug_2543_regression.cpp74
-rwxr-xr-xTAO/tests/Bug_2543_Regression/run_test.pl29
-rw-r--r--TAO/tests/Bug_2549_Regression/Bug_2549_Regression.mpc10
-rw-r--r--TAO/tests/Bug_2549_Regression/README4
-rw-r--r--TAO/tests/Bug_2549_Regression/test.cpp8
-rw-r--r--TAO/tests/Bug_2549_Regression/test.idl19
-rw-r--r--TAO/tests/Bug_2593_Regression/Bug_2593_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2593_Regression/Hello.cpp25
-rw-r--r--TAO/tests/Bug_2593_Regression/Hello.h33
-rw-r--r--TAO/tests/Bug_2593_Regression/README18
-rw-r--r--TAO/tests/Bug_2593_Regression/Test.idl20
-rw-r--r--TAO/tests/Bug_2593_Regression/client.cpp86
-rwxr-xr-xTAO/tests/Bug_2593_Regression/run_test.pl67
-rw-r--r--TAO/tests/Bug_2593_Regression/server.conf10
-rw-r--r--TAO/tests/Bug_2593_Regression/server.cpp115
-rw-r--r--TAO/tests/Bug_2595_Regression/Bug_2595_Regression.mpc19
-rw-r--r--TAO/tests/Bug_2595_Regression/Hello.cpp33
-rw-r--r--TAO/tests/Bug_2595_Regression/Hello.h38
-rw-r--r--TAO/tests/Bug_2595_Regression/Test.idl38
-rw-r--r--TAO/tests/Bug_2595_Regression/client.cpp91
-rwxr-xr-xTAO/tests/Bug_2595_Regression/run_test.pl49
-rw-r--r--TAO/tests/Bug_2595_Regression/server.cpp115
-rw-r--r--TAO/tests/CDR/.cvsignore6
-rw-r--r--TAO/tests/CDR/CDR.mpc51
-rw-r--r--TAO/tests/CDR/README32
-rw-r--r--TAO/tests/CDR/alignment.cpp90
-rw-r--r--TAO/tests/CDR/allocator.cpp253
-rw-r--r--TAO/tests/CDR/basic_types.cpp287
-rw-r--r--TAO/tests/CDR/growth.cpp166
-rw-r--r--TAO/tests/CDR/octet_sequence.cpp78
-rwxr-xr-xTAO/tests/CDR/run_test.pl36
-rw-r--r--TAO/tests/CDR/tc.cpp171
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp328
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h78
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp427
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h85
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/Broken/run_test.pl186
-rw-r--r--TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/README117
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp102
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h114
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp85
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h42
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc39
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp12
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h38
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp116
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h51
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h24
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp75
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h40
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp99
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h38
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp135
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h68
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp35
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h24
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp30
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h36
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h49
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl29
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp94
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h40
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp88
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h34
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp82
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h43
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc20
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl11
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp28
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h31
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl70
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp209
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h47
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp83
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h47
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp218
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h54
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp297
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h92
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc25
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h58
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl29
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp92
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h40
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp136
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h42
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp153
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h52
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp111
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h35
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp65
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h45
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp66
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h50
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp69
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h51
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp52
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h47
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp81
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h50
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp148
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h53
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc27
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp84
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h28
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp192
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h30
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp5
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl60
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp196
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h51
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp375
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h79
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl186
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp7
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp326
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h78
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp428
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h85
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl186
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp199
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h52
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/README337
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp391
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h79
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp7
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl191
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc21
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp25
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h33
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README37
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl20
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp86
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl49
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp119
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf1
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc22
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp87
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h28
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README38
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp175
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h30
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp5
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl61
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp5
-rw-r--r--TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf1
-rw-r--r--TAO/tests/Cache_Growth_Test/.cvsignore2
-rw-r--r--TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc18
-rw-r--r--TAO/tests/Cache_Growth_Test/Hello.cpp34
-rw-r--r--TAO/tests/Cache_Growth_Test/Hello.h33
-rw-r--r--TAO/tests/Cache_Growth_Test/README17
-rw-r--r--TAO/tests/Cache_Growth_Test/Test.idl20
-rw-r--r--TAO/tests/Cache_Growth_Test/client.cpp95
-rwxr-xr-xTAO/tests/Cache_Growth_Test/run_test.pl58
-rw-r--r--TAO/tests/Cache_Growth_Test/server.cpp113
-rw-r--r--TAO/tests/CallbackTest/Callback.cpp41
-rw-r--r--TAO/tests/CallbackTest/Callback.h34
-rw-r--r--TAO/tests/CallbackTest/CallbackTest.mpc18
-rw-r--r--TAO/tests/CallbackTest/README22
-rw-r--r--TAO/tests/CallbackTest/Service.cpp114
-rw-r--r--TAO/tests/CallbackTest/Service.h56
-rw-r--r--TAO/tests/CallbackTest/Test.idl36
-rw-r--r--TAO/tests/CallbackTest/client.cpp156
-rwxr-xr-xTAO/tests/CallbackTest/run_test.pl50
-rwxr-xr-xTAO/tests/CallbackTest/run_test_ipv6.pl50
-rwxr-xr-xTAO/tests/CallbackTest/run_test_mixed_ip.pl50
-rw-r--r--TAO/tests/CallbackTest/server.cpp150
-rw-r--r--TAO/tests/Client_Leaks/.cvsignore3
-rw-r--r--TAO/tests/Client_Leaks/Client_Leaks.mpc30
-rw-r--r--TAO/tests/Client_Leaks/Client_Task.cpp116
-rw-r--r--TAO/tests/Client_Leaks/Client_Task.h52
-rw-r--r--TAO/tests/Client_Leaks/Process.cpp27
-rw-r--r--TAO/tests/Client_Leaks/Process.h33
-rw-r--r--TAO/tests/Client_Leaks/Process_Factory.cpp118
-rw-r--r--TAO/tests/Client_Leaks/Process_Factory.h42
-rw-r--r--TAO/tests/Client_Leaks/README15
-rw-r--r--TAO/tests/Client_Leaks/Server_Task.cpp35
-rw-r--r--TAO/tests/Client_Leaks/Server_Task.h33
-rw-r--r--TAO/tests/Client_Leaks/Startup_Callback.cpp31
-rw-r--r--TAO/tests/Client_Leaks/Startup_Callback.h40
-rw-r--r--TAO/tests/Client_Leaks/Test.idl47
-rw-r--r--TAO/tests/Client_Leaks/child.cpp94
-rw-r--r--TAO/tests/Client_Leaks/client.cpp108
-rwxr-xr-xTAO/tests/Client_Leaks/run_test.pl42
-rw-r--r--TAO/tests/Client_Leaks/server.cpp119
-rw-r--r--TAO/tests/CodeSets/README8
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.cpp32
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.h38
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp182
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.h75
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/CodeSets_libs_IMB1047_ISO8859.mpc7
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/IBM1047_ISO8859_export.h40
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.cpp33
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.h40
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.cpp74
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.h75
-rw-r--r--TAO/tests/CodeSets/libs/UCS4_UTF16/CodeSets_libs_UCS4_UTF16.mpc7
-rw-r--r--TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp599
-rw-r--r--TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.h92
-rw-r--r--TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.cpp14
-rw-r--r--TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.h30
-rw-r--r--TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_export.h40
-rw-r--r--TAO/tests/CodeSets/simple/.cvsignore2
-rw-r--r--TAO/tests/CodeSets/simple/CodeSets_simple.mpc38
-rw-r--r--TAO/tests/CodeSets/simple/README41
-rw-r--r--TAO/tests/CodeSets/simple/client.cpp140
-rw-r--r--TAO/tests/CodeSets/simple/cs_test.conf11
-rwxr-xr-xTAO/tests/CodeSets/simple/run_test.pl75
-rw-r--r--TAO/tests/CodeSets/simple/server.cpp154
-rw-r--r--TAO/tests/CodeSets/simple/simple.idl10
-rw-r--r--TAO/tests/CodeSets/simple/svc.conf1
-rw-r--r--TAO/tests/CodeSets/simple/wcs_test.conf13
-rw-r--r--TAO/tests/Codec/.cvsignore1
-rw-r--r--TAO/tests/Codec/Codec.mpc10
-rw-r--r--TAO/tests/Codec/README45
-rw-r--r--TAO/tests/Codec/client.cpp254
-rwxr-xr-xTAO/tests/Codec/run_test.pl27
-rw-r--r--TAO/tests/Codec/test.idl27
-rw-r--r--TAO/tests/Collocation/.cvsignore1
-rw-r--r--TAO/tests/Collocation/Collocation.cpp30
-rw-r--r--TAO/tests/Collocation/Collocation.mpc46
-rw-r--r--TAO/tests/Collocation/Collocation_Tester.cpp156
-rw-r--r--TAO/tests/Collocation/Collocation_Tester.h64
-rw-r--r--TAO/tests/Collocation/Diamond.idl24
-rw-r--r--TAO/tests/Collocation/Diamond_i.cpp134
-rw-r--r--TAO/tests/Collocation/Diamond_i.h85
-rw-r--r--TAO/tests/Collocation/README11
-rw-r--r--TAO/tests/Collocation/diamond_export.h40
-rwxr-xr-xTAO/tests/Collocation/run_test.pl30
-rw-r--r--TAO/tests/Collocation/stub_export.h40
-rw-r--r--TAO/tests/Collocation/svc.conf14
-rw-r--r--TAO/tests/Collocation/svc.conf.xml15
-rw-r--r--TAO/tests/CollocationLockup/AB.idl8
-rw-r--r--TAO/tests/CollocationLockup/CollocationLockup.cpp150
-rw-r--r--TAO/tests/CollocationLockup/CollocationLockup.mpc27
-rw-r--r--TAO/tests/CollocationLockup/SimpleNamingService.cpp74
-rw-r--r--TAO/tests/CollocationLockup/SimpleNamingService.idl9
-rwxr-xr-xTAO/tests/CollocationLockup/run_test.pl68
-rw-r--r--TAO/tests/Collocation_Exception_Test/Client_Task.cpp141
-rw-r--r--TAO/tests/Collocation_Exception_Test/Client_Task.h41
-rw-r--r--TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp106
-rw-r--r--TAO/tests/Collocation_Exception_Test/Collocation_Excep_Test.mpc6
-rw-r--r--TAO/tests/Collocation_Exception_Test/Hello.cpp92
-rw-r--r--TAO/tests/Collocation_Exception_Test/Hello.h58
-rw-r--r--TAO/tests/Collocation_Exception_Test/Server_Task.cpp105
-rw-r--r--TAO/tests/Collocation_Exception_Test/Server_Task.h48
-rw-r--r--TAO/tests/Collocation_Exception_Test/Test.idl33
-rwxr-xr-xTAO/tests/Collocation_Exception_Test/run_test.pl32
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp115
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Client_Task.h46
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp132
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Collocation_Oneway_Tests.mpc6
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Hello.cpp75
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Hello.h50
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp105
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Server_Task.h48
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Test.idl23
-rwxr-xr-xTAO/tests/Collocation_Oneway_Tests/run_test.pl62
-rw-r--r--TAO/tests/Collocation_Opportunities/.cvsignore1
-rw-r--r--TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp326
-rw-r--r--TAO/tests/Collocation_Opportunities/Collocation_Opportunities.mpc6
-rw-r--r--TAO/tests/Collocation_Opportunities/README30
-rwxr-xr-xTAO/tests/Collocation_Opportunities/run_test.pl25
-rw-r--r--TAO/tests/Collocation_Opportunities/svc.conf1
-rw-r--r--TAO/tests/Collocation_Opportunities/test.idl8
-rw-r--r--TAO/tests/Collocation_Tests/.cvsignore1
-rw-r--r--TAO/tests/Collocation_Tests/Client_Task.cpp62
-rw-r--r--TAO/tests/Collocation_Tests/Client_Task.h37
-rw-r--r--TAO/tests/Collocation_Tests/Collocated_Test.cpp114
-rw-r--r--TAO/tests/Collocation_Tests/Collocation_Tests.mpc6
-rw-r--r--TAO/tests/Collocation_Tests/Hello.cpp69
-rw-r--r--TAO/tests/Collocation_Tests/Hello.h38
-rw-r--r--TAO/tests/Collocation_Tests/Server_Task.cpp99
-rw-r--r--TAO/tests/Collocation_Tests/Server_Task.h48
-rw-r--r--TAO/tests/Collocation_Tests/Test.idl20
-rwxr-xr-xTAO/tests/Collocation_Tests/run_test.pl82
-rw-r--r--TAO/tests/Connect_Strategy_Test/.cvsignore2
-rw-r--r--TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc18
-rw-r--r--TAO/tests/Connect_Strategy_Test/Hello.cpp26
-rw-r--r--TAO/tests/Connect_Strategy_Test/Hello.h33
-rw-r--r--TAO/tests/Connect_Strategy_Test/README19
-rw-r--r--TAO/tests/Connect_Strategy_Test/Test.idl20
-rw-r--r--TAO/tests/Connect_Strategy_Test/blocked.conf4
-rw-r--r--TAO/tests/Connect_Strategy_Test/blocked.conf.xml8
-rw-r--r--TAO/tests/Connect_Strategy_Test/client.cpp94
-rw-r--r--TAO/tests/Connect_Strategy_Test/reactor.conf4
-rw-r--r--TAO/tests/Connect_Strategy_Test/reactor.conf.xml8
-rwxr-xr-xTAO/tests/Connect_Strategy_Test/run_test.pl71
-rw-r--r--TAO/tests/Connect_Strategy_Test/server.cpp115
-rw-r--r--TAO/tests/Connection_Failure/.cvsignore1
-rw-r--r--TAO/tests/Connection_Failure/Connection_Failure.mpc10
-rw-r--r--TAO/tests/Connection_Failure/README8
-rw-r--r--TAO/tests/Connection_Failure/client.cpp45
-rwxr-xr-xTAO/tests/Connection_Failure/run_test.pl22
-rw-r--r--TAO/tests/Connection_Failure/test.idl7
-rw-r--r--TAO/tests/Connection_Purging/.cvsignore2
-rw-r--r--TAO/tests/Connection_Purging/Connection_Purging.mpc18
-rw-r--r--TAO/tests/Connection_Purging/README240
-rw-r--r--TAO/tests/Connection_Purging/client.cpp121
-rw-r--r--TAO/tests/Connection_Purging/client.fifo.conf3
-rw-r--r--TAO/tests/Connection_Purging/client.fifo.conf.xml7
-rw-r--r--TAO/tests/Connection_Purging/client.lfu.conf3
-rw-r--r--TAO/tests/Connection_Purging/client.lfu.conf.xml7
-rw-r--r--TAO/tests/Connection_Purging/client.lru.conf3
-rw-r--r--TAO/tests/Connection_Purging/client.lru.conf.xml7
-rw-r--r--TAO/tests/Connection_Purging/client.null.conf3
-rw-r--r--TAO/tests/Connection_Purging/client.null.conf.xml7
-rwxr-xr-xTAO/tests/Connection_Purging/run_test.pl80
-rw-r--r--TAO/tests/Connection_Purging/server.cpp112
-rw-r--r--TAO/tests/Connection_Purging/server_shmiop.conf4
-rw-r--r--TAO/tests/Connection_Purging/server_shmiop.conf.xml8
-rw-r--r--TAO/tests/Connection_Purging/test.idl8
-rw-r--r--TAO/tests/Connection_Purging/test_i.cpp13
-rw-r--r--TAO/tests/Connection_Purging/test_i.h24
-rw-r--r--TAO/tests/Connection_Timeout/.cvsignore1
-rw-r--r--TAO/tests/Connection_Timeout/Connection_Timeout.mpc12
-rw-r--r--TAO/tests/Connection_Timeout/README15
-rw-r--r--TAO/tests/Connection_Timeout/Test.idl20
-rw-r--r--TAO/tests/Connection_Timeout/client.cpp186
-rwxr-xr-xTAO/tests/Connection_Timeout/run_test.pl27
-rw-r--r--TAO/tests/Crash_On_Write/.cvsignore2
-rw-r--r--TAO/tests/Crash_On_Write/Crash_On_Write.mpc20
-rw-r--r--TAO/tests/Crash_On_Write/Crash_Task.cpp26
-rw-r--r--TAO/tests/Crash_On_Write/Crash_Task.h32
-rw-r--r--TAO/tests/Crash_On_Write/Oneway_Receiver.cpp16
-rw-r--r--TAO/tests/Crash_On_Write/Oneway_Receiver.h25
-rw-r--r--TAO/tests/Crash_On_Write/README17
-rw-r--r--TAO/tests/Crash_On_Write/Test.idl13
-rw-r--r--TAO/tests/Crash_On_Write/client.cpp124
-rwxr-xr-xTAO/tests/Crash_On_Write/run_test.pl45
-rw-r--r--TAO/tests/Crash_On_Write/server.cpp123
-rw-r--r--TAO/tests/Crashed_Callback/.cvsignore2
-rw-r--r--TAO/tests/Crashed_Callback/Crashed_Callback.cpp39
-rw-r--r--TAO/tests/Crashed_Callback/Crashed_Callback.h31
-rw-r--r--TAO/tests/Crashed_Callback/Crashed_Callback.mpc18
-rw-r--r--TAO/tests/Crashed_Callback/README15
-rw-r--r--TAO/tests/Crashed_Callback/Service.cpp119
-rw-r--r--TAO/tests/Crashed_Callback/Service.h53
-rw-r--r--TAO/tests/Crashed_Callback/Test.idl42
-rw-r--r--TAO/tests/Crashed_Callback/client.cpp150
-rwxr-xr-xTAO/tests/Crashed_Callback/run_test.pl50
-rw-r--r--TAO/tests/Crashed_Callback/server.cpp151
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp285
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Client_Task.h41
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Collocated_Test.cpp140
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/DII_Collocation_Tests.mpc6
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp397
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Hello.h207
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/README55
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Server_Task.cpp150
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Server_Task.h56
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Test.idl76
-rwxr-xr-xTAO/tests/DII_Collocation_Tests/oneway/run_test.pl77
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp289
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Client_Task.h41
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Collocated_Test.cpp140
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Hello.cpp400
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Hello.h208
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/README26
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Server_Task.cpp150
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Server_Task.h54
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Test.idl76
-rwxr-xr-xTAO/tests/DII_Collocation_Tests/twoway/run_test.pl77
-rw-r--r--TAO/tests/DLL_ORB/.cvsignore2
-rw-r--r--TAO/tests/DLL_ORB/DLL_ORB.mpc43
-rw-r--r--TAO/tests/DLL_ORB/Test.idl30
-rw-r--r--TAO/tests/DLL_ORB/Test_Client_Module.cpp221
-rw-r--r--TAO/tests/DLL_ORB/Test_Client_Module.h65
-rw-r--r--TAO/tests/DLL_ORB/Test_Client_Module_Export.h40
-rw-r--r--TAO/tests/DLL_ORB/Test_Server_Module.cpp237
-rw-r--r--TAO/tests/DLL_ORB/Test_Server_Module.h71
-rw-r--r--TAO/tests/DLL_ORB/Test_Server_Module_Export.h40
-rw-r--r--TAO/tests/DLL_ORB/Test_i.cpp37
-rw-r--r--TAO/tests/DLL_ORB/Test_i.h55
-rw-r--r--TAO/tests/DLL_ORB/client.cpp55
-rwxr-xr-xTAO/tests/DLL_ORB/run_test.pl46
-rw-r--r--TAO/tests/DLL_ORB/server.cpp51
-rw-r--r--TAO/tests/DSI_Gateway/.cvsignore3
-rw-r--r--TAO/tests/DSI_Gateway/DSI_Gateway.mpc25
-rw-r--r--TAO/tests/DSI_Gateway/README36
-rw-r--r--TAO/tests/DSI_Gateway/client.cpp183
-rw-r--r--TAO/tests/DSI_Gateway/gateway.cpp146
-rwxr-xr-xTAO/tests/DSI_Gateway/run_exception_test.pl73
-rwxr-xr-xTAO/tests/DSI_Gateway/run_test.pl69
-rw-r--r--TAO/tests/DSI_Gateway/server.cpp122
-rw-r--r--TAO/tests/DSI_Gateway/test.idl32
-rw-r--r--TAO/tests/DSI_Gateway/test_dsi.cpp85
-rw-r--r--TAO/tests/DSI_Gateway/test_dsi.h69
-rw-r--r--TAO/tests/DSI_Gateway/test_dsi.i11
-rw-r--r--TAO/tests/DSI_Gateway/test_i.cpp63
-rw-r--r--TAO/tests/DSI_Gateway/test_i.h60
-rw-r--r--TAO/tests/DSI_Gateway/test_i.i7
-rw-r--r--TAO/tests/DynAny_Test/.cvsignore1
-rw-r--r--TAO/tests/DynAny_Test/DynAny_Test.mpc19
-rw-r--r--TAO/tests/DynAny_Test/README27
-rw-r--r--TAO/tests/DynAny_Test/analyzer.cpp302
-rw-r--r--TAO/tests/DynAny_Test/analyzer.h44
-rw-r--r--TAO/tests/DynAny_Test/da_tests.idl53
-rw-r--r--TAO/tests/DynAny_Test/data.cpp115
-rw-r--r--TAO/tests/DynAny_Test/data.h45
-rw-r--r--TAO/tests/DynAny_Test/driver.cpp209
-rw-r--r--TAO/tests/DynAny_Test/driver.h57
-rwxr-xr-xTAO/tests/DynAny_Test/run_test.pl60
-rw-r--r--TAO/tests/DynAny_Test/test_dynany.cpp215
-rw-r--r--TAO/tests/DynAny_Test/test_dynany.h39
-rw-r--r--TAO/tests/DynAny_Test/test_dynarray.cpp204
-rw-r--r--TAO/tests/DynAny_Test/test_dynarray.h37
-rw-r--r--TAO/tests/DynAny_Test/test_dynenum.cpp206
-rw-r--r--TAO/tests/DynAny_Test/test_dynenum.h38
-rw-r--r--TAO/tests/DynAny_Test/test_dynsequence.cpp323
-rw-r--r--TAO/tests/DynAny_Test/test_dynsequence.h38
-rw-r--r--TAO/tests/DynAny_Test/test_dynstruct.cpp405
-rw-r--r--TAO/tests/DynAny_Test/test_dynstruct.h36
-rw-r--r--TAO/tests/DynAny_Test/test_dynunion.cpp371
-rw-r--r--TAO/tests/DynAny_Test/test_dynunion.h38
-rw-r--r--TAO/tests/DynAny_Test/test_wrapper.cpp59
-rw-r--r--TAO/tests/DynAny_Test/test_wrapper.h45
-rw-r--r--TAO/tests/Explicit_Event_Loop/.cvsignore2
-rw-r--r--TAO/tests/Explicit_Event_Loop/CHANGES56
-rw-r--r--TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc17
-rw-r--r--TAO/tests/Explicit_Event_Loop/README46
-rw-r--r--TAO/tests/Explicit_Event_Loop/client.cpp106
-rwxr-xr-xTAO/tests/Explicit_Event_Loop/run_test.pl42
-rw-r--r--TAO/tests/Explicit_Event_Loop/server.cpp193
-rw-r--r--TAO/tests/Explicit_Event_Loop/server.h33
-rw-r--r--TAO/tests/Explicit_Event_Loop/time.idl13
-rw-r--r--TAO/tests/Exposed_Policies/.cvsignore2
-rw-r--r--TAO/tests/Exposed_Policies/Counter.idl18
-rw-r--r--TAO/tests/Exposed_Policies/Counter_i.cpp50
-rw-r--r--TAO/tests/Exposed_Policies/Counter_i.h55
-rw-r--r--TAO/tests/Exposed_Policies/Exposed_Policies.mpc25
-rw-r--r--TAO/tests/Exposed_Policies/Object.cfg1
-rw-r--r--TAO/tests/Exposed_Policies/Object.cfg.tru641
-rw-r--r--TAO/tests/Exposed_Policies/POA.cfg5
-rw-r--r--TAO/tests/Exposed_Policies/POA.cfg.tru645
-rw-r--r--TAO/tests/Exposed_Policies/Policy_Tester.cpp298
-rw-r--r--TAO/tests/Exposed_Policies/Policy_Tester.h66
-rw-r--r--TAO/tests/Exposed_Policies/Policy_Verifier.cpp267
-rw-r--r--TAO/tests/Exposed_Policies/Policy_Verifier.h72
-rw-r--r--TAO/tests/Exposed_Policies/README79
-rw-r--r--TAO/tests/Exposed_Policies/RT_Properties.cpp107
-rw-r--r--TAO/tests/Exposed_Policies/RT_Properties.h52
-rw-r--r--TAO/tests/Exposed_Policies/client.cpp46
-rwxr-xr-xTAO/tests/Exposed_Policies/run_test.pl68
-rw-r--r--TAO/tests/Exposed_Policies/server.cpp50
-rw-r--r--TAO/tests/Exposed_Policies/svc.conf2
-rw-r--r--TAO/tests/FL_Cube/.cvsignore2
-rw-r--r--TAO/tests/FL_Cube/FL_Cube.mpc16
-rw-r--r--TAO/tests/FL_Cube/README10
-rw-r--r--TAO/tests/FL_Cube/client.cpp199
-rw-r--r--TAO/tests/FL_Cube/server.cpp123
-rw-r--r--TAO/tests/FL_Cube/test.idl13
-rw-r--r--TAO/tests/FL_Cube/test_i.cpp177
-rw-r--r--TAO/tests/FL_Cube/test_i.h80
-rw-r--r--TAO/tests/Faults/.cvsignore5
-rw-r--r--TAO/tests/Faults/Faults.mpc71
-rw-r--r--TAO/tests/Faults/README5
-rw-r--r--TAO/tests/Faults/client.cpp208
-rw-r--r--TAO/tests/Faults/middle.cpp146
-rw-r--r--TAO/tests/Faults/ping.cpp143
-rw-r--r--TAO/tests/Faults/ping.idl18
-rw-r--r--TAO/tests/Faults/ping_i.cpp37
-rw-r--r--TAO/tests/Faults/ping_i.h60
-rw-r--r--TAO/tests/Faults/ping_i.i9
-rw-r--r--TAO/tests/Faults/pong.cpp213
-rwxr-xr-xTAO/tests/Faults/run_test.pl359
-rw-r--r--TAO/tests/Faults/server.conf4
-rw-r--r--TAO/tests/Faults/server.cpp119
-rw-r--r--TAO/tests/Faults/test.idl27
-rw-r--r--TAO/tests/Faults/test_i.cpp146
-rw-r--r--TAO/tests/Faults/test_i.h115
-rw-r--r--TAO/tests/Faults/test_i.i21
-rw-r--r--TAO/tests/File_IO/.cvsignore2
-rw-r--r--TAO/tests/File_IO/File.idl53
-rw-r--r--TAO/tests/File_IO/File_IO.mpc18
-rw-r--r--TAO/tests/File_IO/File_i.cpp238
-rw-r--r--TAO/tests/File_IO/File_i.h101
-rw-r--r--TAO/tests/File_IO/README18
-rw-r--r--TAO/tests/File_IO/client.cpp224
-rwxr-xr-xTAO/tests/File_IO/run_test.pl49
-rw-r--r--TAO/tests/File_IO/server.cpp247
-rw-r--r--TAO/tests/Forwarding/.cvsignore2
-rw-r--r--TAO/tests/Forwarding/Forwarding.mpc18
-rw-r--r--TAO/tests/Forwarding/README30
-rw-r--r--TAO/tests/Forwarding/client.cpp195
-rwxr-xr-xTAO/tests/Forwarding/run_test.pl59
-rw-r--r--TAO/tests/Forwarding/server.cpp118
-rw-r--r--TAO/tests/Forwarding/test.idl8
-rw-r--r--TAO/tests/Forwarding/test_i.cpp25
-rw-r--r--TAO/tests/Forwarding/test_i.h49
-rw-r--r--TAO/tests/Forwarding/test_i.i7
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.cpp60
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.h38
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Reply/Java_Big_Reply.mpc48
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Reply/Test.idl18
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp95
-rwxr-xr-xTAO/tests/GIOP_Fragments/Java_Big_Reply/run_test.pl62
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Reply/server.java62
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Request/Java_Big_Request.mpc45
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.cpp45
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.h39
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Request/Test.idl21
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Request/client.java47
-rwxr-xr-xTAO/tests/GIOP_Fragments/Java_Big_Request/run_test.pl53
-rw-r--r--TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp120
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/.cvsignore1
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/PMB_With_Fragments.mpc5
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp45
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.h39
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/README21
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/Test.idl21
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch70
-rwxr-xr-xTAO/tests/GIOP_Fragments/PMB_With_Fragments/dribble.pl150
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.datbin2032328 -> 0 bytes
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.layout86
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.datbin2032366 -> 0 bytes
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.layout86
-rwxr-xr-xTAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl57
-rw-r--r--TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp138
-rw-r--r--TAO/tests/Hang_Shutdown/Hang.mpc20
-rw-r--r--TAO/tests/Hang_Shutdown/Test.idl11
-rw-r--r--TAO/tests/Hang_Shutdown/client.conf3
-rw-r--r--TAO/tests/Hang_Shutdown/client.cpp267
-rwxr-xr-xTAO/tests/Hang_Shutdown/run_test.pl85
-rw-r--r--TAO/tests/Hang_Shutdown/server.cpp104
-rw-r--r--TAO/tests/Hang_Shutdown/test_i.h42
-rw-r--r--TAO/tests/Hello/.cvsignore3
-rw-r--r--TAO/tests/Hello/Hello.cpp25
-rw-r--r--TAO/tests/Hello/Hello.h33
-rw-r--r--TAO/tests/Hello/Hello.mpc19
-rw-r--r--TAO/tests/Hello/README37
-rw-r--r--TAO/tests/Hello/Test.idl20
-rw-r--r--TAO/tests/Hello/client.cpp86
-rwxr-xr-xTAO/tests/Hello/run_test.pl61
-rw-r--r--TAO/tests/Hello/server.cpp115
-rw-r--r--TAO/tests/ICMG_Any_Bug/.cvsignore2
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/Hello.cpp40
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/Hello.h36
-rw-r--r--TAO/tests/ICMG_Any_Bug/Hello.mpc19
-rw-r--r--TAO/tests/ICMG_Any_Bug/HelloWorld.cpp20
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/HelloWorld.h27
-rw-r--r--TAO/tests/ICMG_Any_Bug/README15
-rw-r--r--TAO/tests/ICMG_Any_Bug/Test.idl18
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/client.cpp124
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/run_test.pl43
-rwxr-xr-xTAO/tests/ICMG_Any_Bug/server.cpp115
-rw-r--r--TAO/tests/IDL_Test/.cvsignore23
-rw-r--r--TAO/tests/IDL_Test/Bug_2577_Regression.idl22
-rw-r--r--TAO/tests/IDL_Test/Bug_2582_Regression.idl22
-rw-r--r--TAO/tests/IDL_Test/Bug_2583_Regression.idl12
-rw-r--r--TAO/tests/IDL_Test/IDL_Test.mpc46
-rw-r--r--TAO/tests/IDL_Test/README54
-rw-r--r--TAO/tests/IDL_Test/anonymous.idl71
-rw-r--r--TAO/tests/IDL_Test/array.idl168
-rwxr-xr-xTAO/tests/IDL_Test/array_only.idl30
-rw-r--r--TAO/tests/IDL_Test/constants.idl114
-rw-r--r--TAO/tests/IDL_Test/enum_in_struct.idl84
-rw-r--r--TAO/tests/IDL_Test/full.idl61
-rw-r--r--TAO/tests/IDL_Test/fwd.idl77
-rw-r--r--TAO/tests/IDL_Test/generic_object.idl44
-rw-r--r--TAO/tests/IDL_Test/gperf.idl98
-rw-r--r--TAO/tests/IDL_Test/included.idl46
-rw-r--r--TAO/tests/IDL_Test/including.idl72
-rw-r--r--TAO/tests/IDL_Test/interface.idl193
-rw-r--r--TAO/tests/IDL_Test/keywords.idl43
-rw-r--r--TAO/tests/IDL_Test/main.cpp369
-rw-r--r--TAO/tests/IDL_Test/nested_scope.idl192
-rw-r--r--TAO/tests/IDL_Test/params.idl51
-rw-r--r--TAO/tests/IDL_Test/pragma.idl62
-rw-r--r--TAO/tests/IDL_Test/reopen_include1.idl45
-rw-r--r--TAO/tests/IDL_Test/reopen_include2.idl51
-rw-r--r--TAO/tests/IDL_Test/reopened_modules.idl314
-rw-r--r--TAO/tests/IDL_Test/repo_id_mod.idl74
-rwxr-xr-xTAO/tests/IDL_Test/run_test.pl25
-rw-r--r--TAO/tests/IDL_Test/sequence.idl102
-rw-r--r--TAO/tests/IDL_Test/typedef.idl118
-rw-r--r--TAO/tests/IDL_Test/typeprefix.idl20
-rw-r--r--TAO/tests/IDL_Test/union.idl271
-rw-r--r--TAO/tests/IDL_Test/valuetype.idl42
-rw-r--r--TAO/tests/IORManipulation/.cvsignore1
-rw-r--r--TAO/tests/IORManipulation/IORManipulation.mpc6
-rw-r--r--TAO/tests/IORManipulation/IORTest.cpp324
-rw-r--r--TAO/tests/IORManipulation/README13
-rwxr-xr-xTAO/tests/IORManipulation/run_test.pl25
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/IOR_Endpoint_Hostnames.mpc18
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/bogus.idl11
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/bogus_i.cpp19
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/bogus_i.h23
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp52
-rw-r--r--TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp85
-rwxr-xr-xTAO/tests/IOR_Endpoint_Hostnames/run_test.pl256
-rw-r--r--TAO/tests/IPV6/Hello.cpp25
-rw-r--r--TAO/tests/IPV6/Hello.h33
-rw-r--r--TAO/tests/IPV6/IPV6_Hello.mpc19
-rw-r--r--TAO/tests/IPV6/README14
-rw-r--r--TAO/tests/IPV6/Test.idl20
-rw-r--r--TAO/tests/IPV6/client.cpp110
-rwxr-xr-xTAO/tests/IPV6/run_test.pl177
-rw-r--r--TAO/tests/IPV6/server.cpp115
-rw-r--r--TAO/tests/InterOp-Naming/.cvsignore2
-rw-r--r--TAO/tests/InterOp-Naming/INS.idl11
-rw-r--r--TAO/tests/InterOp-Naming/INS_i.cpp33
-rw-r--r--TAO/tests/InterOp-Naming/INS_i.h51
-rw-r--r--TAO/tests/InterOp-Naming/INS_test_client.cpp115
-rw-r--r--TAO/tests/InterOp-Naming/INS_test_server.cpp41
-rw-r--r--TAO/tests/InterOp-Naming/InterOp-Naming.mpc21
-rw-r--r--TAO/tests/InterOp-Naming/README68
-rw-r--r--TAO/tests/InterOp-Naming/Server_i.cpp184
-rw-r--r--TAO/tests/InterOp-Naming/Server_i.h75
-rwxr-xr-xTAO/tests/InterOp-Naming/run_test.pl165
-rw-r--r--TAO/tests/Leader_Followers/.cvsignore2
-rw-r--r--TAO/tests/Leader_Followers/Leader_Followers.mpc18
-rw-r--r--TAO/tests/Leader_Followers/README19
-rw-r--r--TAO/tests/Leader_Followers/client.cpp311
-rwxr-xr-xTAO/tests/Leader_Followers/run_test.pl172
-rwxr-xr-xTAO/tests/Leader_Followers/run_test_mt.pl10
-rw-r--r--TAO/tests/Leader_Followers/server.cpp162
-rw-r--r--TAO/tests/Leader_Followers/test.idl9
-rw-r--r--TAO/tests/Leader_Followers/test_i.cpp38
-rw-r--r--TAO/tests/Leader_Followers/test_i.h38
-rw-r--r--TAO/tests/LongUpcalls/.cvsignore4
-rw-r--r--TAO/tests/LongUpcalls/AMI_Manager.cpp209
-rw-r--r--TAO/tests/LongUpcalls/AMI_Manager.h83
-rw-r--r--TAO/tests/LongUpcalls/Controller.cpp44
-rw-r--r--TAO/tests/LongUpcalls/Controller.h30
-rw-r--r--TAO/tests/LongUpcalls/LongUpcalls.mpc37
-rw-r--r--TAO/tests/LongUpcalls/Manager.cpp113
-rw-r--r--TAO/tests/LongUpcalls/Manager.h52
-rw-r--r--TAO/tests/LongUpcalls/Manager_Handler.cpp53
-rw-r--r--TAO/tests/LongUpcalls/Manager_Handler.h35
-rw-r--r--TAO/tests/LongUpcalls/README36
-rw-r--r--TAO/tests/LongUpcalls/Test.idl23
-rw-r--r--TAO/tests/LongUpcalls/ami_client.cpp124
-rw-r--r--TAO/tests/LongUpcalls/ami_server.cpp107
-rw-r--r--TAO/tests/LongUpcalls/blocking_client.cpp113
-rw-r--r--TAO/tests/LongUpcalls/blocking_server.cpp107
-rwxr-xr-xTAO/tests/LongUpcalls/run_test.pl128
-rw-r--r--TAO/tests/LongUpcalls/svc.conf5
-rw-r--r--TAO/tests/LongUpcalls/svc.conf.xml9
-rw-r--r--TAO/tests/MProfile/.cvsignore2
-rw-r--r--TAO/tests/MProfile/MProfile.mpc17
-rw-r--r--TAO/tests/MProfile/README29
-rw-r--r--TAO/tests/MProfile/client.cpp169
-rw-r--r--TAO/tests/MProfile/server.cpp115
-rw-r--r--TAO/tests/MProfile/test.idl9
-rw-r--r--TAO/tests/MProfile/test_i.cpp35
-rw-r--r--TAO/tests/MProfile/test_i.h50
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/.cvsignore2
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc17
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/README24
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/client.cpp182
-rwxr-xr-xTAO/tests/MProfile_Connection_Timeout/run_test.pl62
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/server.cpp121
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/test.idl9
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/test_i.cpp42
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/test_i.h50
-rw-r--r--TAO/tests/MProfile_Forwarding/.cvsignore3
-rw-r--r--TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc28
-rw-r--r--TAO/tests/MProfile_Forwarding/Manager.cpp306
-rw-r--r--TAO/tests/MProfile_Forwarding/Manager.h46
-rw-r--r--TAO/tests/MProfile_Forwarding/README56
-rwxr-xr-xTAO/tests/MProfile_Forwarding/Servant_Locator.cpp94
-rwxr-xr-xTAO/tests/MProfile_Forwarding/Servant_Locator.h69
-rw-r--r--TAO/tests/MProfile_Forwarding/client.cpp137
-rwxr-xr-xTAO/tests/MProfile_Forwarding/server.cpp115
-rwxr-xr-xTAO/tests/MProfile_Forwarding/test.idl10
-rw-r--r--TAO/tests/MProfile_Forwarding/test_i.cpp31
-rw-r--r--TAO/tests/MProfile_Forwarding/test_i.h52
-rwxr-xr-xTAO/tests/MProfile_Forwarding/test_i.i8
-rw-r--r--TAO/tests/MT_BiDir/.cvsignore2
-rw-r--r--TAO/tests/MT_BiDir/Client_Task.cpp40
-rw-r--r--TAO/tests/MT_BiDir/Client_Task.h35
-rw-r--r--TAO/tests/MT_BiDir/MT_BiDir.mpc26
-rw-r--r--TAO/tests/MT_BiDir/README17
-rw-r--r--TAO/tests/MT_BiDir/Receiver.idl11
-rw-r--r--TAO/tests/MT_BiDir/Receiver_i.cpp32
-rw-r--r--TAO/tests/MT_BiDir/Receiver_i.h37
-rw-r--r--TAO/tests/MT_BiDir/Sender.idl14
-rw-r--r--TAO/tests/MT_BiDir/Sender_i.cpp70
-rw-r--r--TAO/tests/MT_BiDir/Sender_i.h56
-rw-r--r--TAO/tests/MT_BiDir/Server_Task.cpp85
-rw-r--r--TAO/tests/MT_BiDir/Server_Task.h54
-rw-r--r--TAO/tests/MT_BiDir/client.cpp171
-rwxr-xr-xTAO/tests/MT_BiDir/run_test.pl68
-rw-r--r--TAO/tests/MT_BiDir/server.conf3
-rw-r--r--TAO/tests/MT_BiDir/server.conf.xml7
-rw-r--r--TAO/tests/MT_BiDir/server.cpp207
-rw-r--r--TAO/tests/MT_Client/.cvsignore2
-rw-r--r--TAO/tests/MT_Client/MT_Client.mpc19
-rw-r--r--TAO/tests/MT_Client/README18
-rw-r--r--TAO/tests/MT_Client/client.conf3
-rw-r--r--TAO/tests/MT_Client/client.conf.xml6
-rw-r--r--TAO/tests/MT_Client/client.cpp188
-rw-r--r--TAO/tests/MT_Client/client_muxed.conf3
-rw-r--r--TAO/tests/MT_Client/client_muxed.conf.xml6
-rw-r--r--TAO/tests/MT_Client/orb_creation.cpp179
-rwxr-xr-xTAO/tests/MT_Client/run_test.pl68
-rw-r--r--TAO/tests/MT_Client/server.conf3
-rw-r--r--TAO/tests/MT_Client/server.conf.xml7
-rw-r--r--TAO/tests/MT_Client/server.cpp113
-rw-r--r--TAO/tests/MT_Client/test.idl17
-rw-r--r--TAO/tests/MT_Client/test_i.cpp22
-rw-r--r--TAO/tests/MT_Client/test_i.h48
-rw-r--r--TAO/tests/MT_Client/test_i.i7
-rw-r--r--TAO/tests/MT_Server/.cvsignore2
-rw-r--r--TAO/tests/MT_Server/MT_Server.mpc18
-rw-r--r--TAO/tests/MT_Server/README19
-rw-r--r--TAO/tests/MT_Server/client.cpp105
-rwxr-xr-xTAO/tests/MT_Server/run_test.pl78
-rw-r--r--TAO/tests/MT_Server/server.conf2
-rw-r--r--TAO/tests/MT_Server/server.conf.xml6
-rw-r--r--TAO/tests/MT_Server/server.cpp163
-rw-r--r--TAO/tests/MT_Server/test.idl10
-rw-r--r--TAO/tests/MT_Server/test_i.cpp29
-rw-r--r--TAO/tests/MT_Server/test_i.h49
-rw-r--r--TAO/tests/MT_Server/test_i.i7
-rw-r--r--TAO/tests/MT_Timeout/.cvsignore2
-rw-r--r--TAO/tests/MT_Timeout/Client_Task.cpp207
-rw-r--r--TAO/tests/MT_Timeout/Client_Task.h92
-rw-r--r--TAO/tests/MT_Timeout/MT_Timeout.mpc20
-rw-r--r--TAO/tests/MT_Timeout/README14
-rw-r--r--TAO/tests/MT_Timeout/Server_Task.cpp33
-rw-r--r--TAO/tests/MT_Timeout/Server_Task.h37
-rw-r--r--TAO/tests/MT_Timeout/Sleep_Service.cpp32
-rw-r--r--TAO/tests/MT_Timeout/Sleep_Service.h34
-rw-r--r--TAO/tests/MT_Timeout/Test.idl19
-rw-r--r--TAO/tests/MT_Timeout/client.cpp168
-rwxr-xr-xTAO/tests/MT_Timeout/run_test.pl47
-rw-r--r--TAO/tests/MT_Timeout/server.cpp120
-rw-r--r--TAO/tests/Multiple/.cvsignore2
-rw-r--r--TAO/tests/Multiple/Collocation_Tester.cpp254
-rw-r--r--TAO/tests/Multiple/Collocation_Tester.h80
-rw-r--r--TAO/tests/Multiple/Multiple.idl56
-rw-r--r--TAO/tests/Multiple/Multiple.mpc24
-rw-r--r--TAO/tests/Multiple/Multiple_Impl.cpp133
-rw-r--r--TAO/tests/Multiple/Multiple_Impl.h120
-rw-r--r--TAO/tests/Multiple/README103
-rw-r--r--TAO/tests/Multiple/client.cpp41
-rwxr-xr-xTAO/tests/Multiple/run_test.pl101
-rw-r--r--TAO/tests/Multiple/server.cpp74
-rw-r--r--TAO/tests/Multiple_Inheritance/.cvsignore2
-rw-r--r--TAO/tests/Multiple_Inheritance/Multiple_Inheritance.idl22
-rw-r--r--TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc17
-rw-r--r--TAO/tests/Multiple_Inheritance/Multiple_Inheritance_i.h32
-rw-r--r--TAO/tests/Multiple_Inheritance/README26
-rw-r--r--TAO/tests/Multiple_Inheritance/client.cpp172
-rwxr-xr-xTAO/tests/Multiple_Inheritance/run_test.pl41
-rw-r--r--TAO/tests/Multiple_Inheritance/server.cpp98
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/.cvsignore2
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc18
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/README15
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/client.cpp244
-rwxr-xr-xTAO/tests/Muxed_GIOP_Versions/run_test.pl124
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/server.cpp333
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/test.idl10
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/test_i.cpp32
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/test_i.h49
-rw-r--r--TAO/tests/Muxed_GIOP_Versions/test_i.i7
-rw-r--r--TAO/tests/Muxing/.cvsignore2
-rw-r--r--TAO/tests/Muxing/Client_Task.cpp46
-rw-r--r--TAO/tests/Muxing/Client_Task.h41
-rw-r--r--TAO/tests/Muxing/Muxing.mpc20
-rw-r--r--TAO/tests/Muxing/README16
-rw-r--r--TAO/tests/Muxing/Receiver.cpp41
-rw-r--r--TAO/tests/Muxing/Receiver.h48
-rw-r--r--TAO/tests/Muxing/Server_Task.cpp35
-rw-r--r--TAO/tests/Muxing/Server_Task.h33
-rw-r--r--TAO/tests/Muxing/Test.idl16
-rw-r--r--TAO/tests/Muxing/client.cpp93
-rwxr-xr-xTAO/tests/Muxing/run_test.pl58
-rw-r--r--TAO/tests/Muxing/server.cpp118
-rw-r--r--TAO/tests/Muxing/svc.conf5
-rw-r--r--TAO/tests/Muxing/svc.conf.xml8
-rw-r--r--TAO/tests/Native_Exceptions/.cvsignore2
-rw-r--r--TAO/tests/Native_Exceptions/Native_Exceptions.mpc18
-rw-r--r--TAO/tests/Native_Exceptions/README12
-rw-r--r--TAO/tests/Native_Exceptions/client.cpp97
-rwxr-xr-xTAO/tests/Native_Exceptions/run_test.pl47
-rw-r--r--TAO/tests/Native_Exceptions/server.cpp93
-rw-r--r--TAO/tests/Native_Exceptions/test.idl13
-rw-r--r--TAO/tests/Native_Exceptions/test_i.cpp35
-rw-r--r--TAO/tests/Native_Exceptions/test_i.h50
-rw-r--r--TAO/tests/Native_Exceptions/test_i.i7
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/.cvsignore2
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.idl32
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc19
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.cpp60
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.h45
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/README41
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/client.conf4
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/client.conf.xml12
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/client.cpp364
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/client.h110
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp302
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/local_server.h124
-rwxr-xr-xTAO/tests/NestedUpcall/MT_Client_Test/run_test.pl71
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/server.cpp160
-rw-r--r--TAO/tests/NestedUpcall/MT_Client_Test/server.h80
-rw-r--r--TAO/tests/NestedUpcall/Simple/.cvsignore2
-rw-r--r--TAO/tests/NestedUpcall/Simple/README17
-rw-r--r--TAO/tests/NestedUpcall/Simple/Simple.mpc18
-rw-r--r--TAO/tests/NestedUpcall/Simple/client.cpp187
-rw-r--r--TAO/tests/NestedUpcall/Simple/client_i.cpp30
-rw-r--r--TAO/tests/NestedUpcall/Simple/client_i.h22
-rwxr-xr-xTAO/tests/NestedUpcall/Simple/run_test.pl86
-rw-r--r--TAO/tests/NestedUpcall/Simple/server.cpp189
-rw-r--r--TAO/tests/NestedUpcall/Simple/server_i.cpp53
-rw-r--r--TAO/tests/NestedUpcall/Simple/server_i.h32
-rw-r--r--TAO/tests/NestedUpcall/Simple/simple-client.cpp197
-rw-r--r--TAO/tests/NestedUpcall/Simple/svc.conf5
-rw-r--r--TAO/tests/NestedUpcall/Simple/svc.conf.xml8
-rw-r--r--TAO/tests/NestedUpcall/Simple/test.idl38
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/.cvsignore3
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.cpp61
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.h49
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.cpp66
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.h47
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.cpp66
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.h42
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/README29
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/TT.mpc26
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/Triangle_Test.idl38
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp326
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/initiator.h93
-rwxr-xr-xTAO/tests/NestedUpcall/Triangle_Test/run_test.pl71
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp155
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_A.h78
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp154
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/server_B.h78
-rw-r--r--TAO/tests/Nested_Event_Loop/.cvsignore2
-rw-r--r--TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc18
-rw-r--r--TAO/tests/Nested_Event_Loop/README19
-rw-r--r--TAO/tests/Nested_Event_Loop/client.cpp147
-rwxr-xr-xTAO/tests/Nested_Event_Loop/run_test.pl48
-rw-r--r--TAO/tests/Nested_Event_Loop/server.cpp111
-rw-r--r--TAO/tests/Nested_Event_Loop/svc.conf3
-rw-r--r--TAO/tests/Nested_Event_Loop/svc.conf.xml7
-rw-r--r--TAO/tests/Nested_Event_Loop/test.idl29
-rw-r--r--TAO/tests/Nested_Event_Loop/test_i.cpp198
-rw-r--r--TAO/tests/Nested_Event_Loop/test_i.h54
-rw-r--r--TAO/tests/Nested_Upcall_Crash/.cvsignore3
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Client_Peer.cpp81
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Client_Peer.h34
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp35
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h23
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc33
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Server_Peer.cpp81
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Server_Peer.h40
-rw-r--r--TAO/tests/Nested_Upcall_Crash/Test.idl27
-rw-r--r--TAO/tests/Nested_Upcall_Crash/client.cpp195
-rwxr-xr-xTAO/tests/Nested_Upcall_Crash/run_test.pl61
-rw-r--r--TAO/tests/Nested_Upcall_Crash/scavenger.cpp136
-rw-r--r--TAO/tests/Nested_Upcall_Crash/server.cpp211
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/.cvsignore2
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc18
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/README23
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/blocked.conf4
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/blocked.conf.xml8
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/client.cpp166
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/reactor.conf4
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/reactor.conf.xml8
-rwxr-xr-xTAO/tests/No_Server_MT_Connect_Test/run_test.pl73
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/server.cpp113
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/test.idl17
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/test_i.cpp23
-rw-r--r--TAO/tests/No_Server_MT_Connect_Test/test_i.h31
-rw-r--r--TAO/tests/OBV/Any/.cvsignore2
-rw-r--r--TAO/tests/OBV/Any/Any.idl38
-rw-r--r--TAO/tests/OBV/Any/AnyS_impl.cpp69
-rw-r--r--TAO/tests/OBV/Any/AnyS_impl.h51
-rw-r--r--TAO/tests/OBV/Any/OBV_Any.mpc17
-rw-r--r--TAO/tests/OBV/Any/README18
-rw-r--r--TAO/tests/OBV/Any/client.cpp236
-rwxr-xr-xTAO/tests/OBV/Any/run_test.pl58
-rw-r--r--TAO/tests/OBV/Any/server.cpp116
-rw-r--r--TAO/tests/OBV/Collocated/Forward/.cvsignore1
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Client_Task.cpp268
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Client_Task.h48
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp104
-rw-r--r--TAO/tests/OBV/Collocated/Forward/OBV_Forward.mpc20
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Server_Task.cpp135
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Server_Task.h48
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Test_impl.cpp47
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Test_impl.h49
-rw-r--r--TAO/tests/OBV/Collocated/Forward/TreeBase.idl21
-rw-r--r--TAO/tests/OBV/Collocated/Forward/TreeController.idl21
-rw-r--r--TAO/tests/OBV/Collocated/Forward/TreeNode.idl11
-rwxr-xr-xTAO/tests/OBV/Collocated/Forward/run_test.pl39
-rw-r--r--TAO/tests/OBV/Factory/.cvsignore2
-rw-r--r--TAO/tests/OBV/Factory/Factory.idl63
-rw-r--r--TAO/tests/OBV/Factory/FactoryC_impl.cpp59
-rw-r--r--TAO/tests/OBV/Factory/FactoryC_impl.h64
-rw-r--r--TAO/tests/OBV/Factory/FactoryS_impl.cpp55
-rw-r--r--TAO/tests/OBV/Factory/FactoryS_impl.h51
-rw-r--r--TAO/tests/OBV/Factory/OBV_Factory.mpc20
-rw-r--r--TAO/tests/OBV/Factory/README18
-rw-r--r--TAO/tests/OBV/Factory/client.cpp178
-rwxr-xr-xTAO/tests/OBV/Factory/run_test.pl58
-rw-r--r--TAO/tests/OBV/Factory/server.cpp114
-rw-r--r--TAO/tests/OBV/Forward/.cvsignore2
-rw-r--r--TAO/tests/OBV/Forward/OBV_Forward.mpc25
-rw-r--r--TAO/tests/OBV/Forward/README18
-rw-r--r--TAO/tests/OBV/Forward/Test_impl.cpp50
-rw-r--r--TAO/tests/OBV/Forward/Test_impl.h47
-rw-r--r--TAO/tests/OBV/Forward/TreeBase.idl21
-rw-r--r--TAO/tests/OBV/Forward/TreeController.idl21
-rw-r--r--TAO/tests/OBV/Forward/TreeNode.idl11
-rw-r--r--TAO/tests/OBV/Forward/client.cpp218
-rwxr-xr-xTAO/tests/OBV/Forward/run_test.pl47
-rw-r--r--TAO/tests/OBV/Forward/server.cpp158
-rw-r--r--TAO/tests/OBV/README17
-rw-r--r--TAO/tests/OBV/Simple/Client_i.cpp69
-rw-r--r--TAO/tests/OBV/Simple/Client_i.h56
-rw-r--r--TAO/tests/OBV/Simple/OBV.idl16
-rw-r--r--TAO/tests/OBV/Simple/OBV_Simple.mpc37
-rw-r--r--TAO/tests/OBV/Simple/OBV_impl.cpp44
-rw-r--r--TAO/tests/OBV/Simple/OBV_impl.h39
-rw-r--r--TAO/tests/OBV/Simple/Server_i.cpp80
-rw-r--r--TAO/tests/OBV/Simple/Server_i.h60
-rw-r--r--TAO/tests/OBV/Simple/Simple_util.cpp317
-rw-r--r--TAO/tests/OBV/Simple/Simple_util.h170
-rw-r--r--TAO/tests/OBV/Simple/client.cpp23
-rwxr-xr-xTAO/tests/OBV/Simple/run_test.pl44
-rw-r--r--TAO/tests/OBV/Simple/server.cpp44
-rw-r--r--TAO/tests/OBV/Supports/README32
-rw-r--r--TAO/tests/OBV/Supports/Supports_Test.idl98
-rw-r--r--TAO/tests/OBV/Supports/Supports_Test.mpc32
-rw-r--r--TAO/tests/OBV/Supports/Supports_Test_impl.cpp292
-rw-r--r--TAO/tests/OBV/Supports/Supports_Test_impl.h136
-rw-r--r--TAO/tests/OBV/Supports/client.cpp236
-rwxr-xr-xTAO/tests/OBV/Supports/run_test.pl42
-rw-r--r--TAO/tests/OBV/Supports/server.cpp99
-rw-r--r--TAO/tests/OBV/TC_Alignment/.cvsignore2
-rw-r--r--TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc20
-rw-r--r--TAO/tests/OBV/TC_Alignment/README33
-rw-r--r--TAO/tests/OBV/TC_Alignment/client.cpp238
-rwxr-xr-xTAO/tests/OBV/TC_Alignment/run_test.pl74
-rw-r--r--TAO/tests/OBV/TC_Alignment/server.cpp97
-rw-r--r--TAO/tests/OBV/TC_Alignment/test.idl46
-rw-r--r--TAO/tests/OBV/TC_Alignment/test_i.cpp79
-rw-r--r--TAO/tests/OBV/TC_Alignment/test_i.h53
-rw-r--r--TAO/tests/OBV/Truncatable/Extra.idl19
-rw-r--r--TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc18
-rw-r--r--TAO/tests/OBV/Truncatable/README20
-rw-r--r--TAO/tests/OBV/Truncatable/Truncatable.idl102
-rw-r--r--TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp205
-rw-r--r--TAO/tests/OBV/Truncatable/TruncatableS_impl.h98
-rw-r--r--TAO/tests/OBV/Truncatable/client.cpp542
-rwxr-xr-xTAO/tests/OBV/Truncatable/run_test.pl58
-rw-r--r--TAO/tests/OBV/Truncatable/server.cpp159
-rw-r--r--TAO/tests/OBV/ValueBox/Test_impl.cpp528
-rw-r--r--TAO/tests/OBV/ValueBox/Test_impl.h157
-rw-r--r--TAO/tests/OBV/ValueBox/client.cpp1533
-rwxr-xr-xTAO/tests/OBV/ValueBox/run_test.pl49
-rw-r--r--TAO/tests/OBV/ValueBox/server.cpp116
-rw-r--r--TAO/tests/OBV/ValueBox/valuebox.idl102
-rw-r--r--TAO/tests/OBV/ValueBox/valuebox.mpc34
-rw-r--r--TAO/tests/OBV/ValueBox/vb_basic.idl77
-rw-r--r--TAO/tests/OBV/ValueBox/vb_struct.idl68
-rw-r--r--TAO/tests/OBV/ValueBox/vb_union.idl22
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/Bug_1459.mpc12
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/README2
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/Test.cpp151
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/a.conf2
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/b.conf3
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/m.conf0
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/m1.conf4
-rwxr-xr-xTAO/tests/ORB_Local_Config/Bug_1459/run_test.pl49
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/server_cert.pem16
-rw-r--r--TAO/tests/ORB_Local_Config/Bug_1459/server_key.pem9
-rw-r--r--TAO/tests/ORB_Local_Config/Bunch/Bunch.mpc12
-rw-r--r--TAO/tests/ORB_Local_Config/Bunch/Test.cpp174
-rwxr-xr-xTAO/tests/ORB_Local_Config/Bunch/run_test.pl49
-rw-r--r--TAO/tests/ORB_Local_Config/ORB_Local_Config.mwc13
-rw-r--r--TAO/tests/ORB_Local_Config/README50
-rw-r--r--TAO/tests/ORB_Local_Config/Separation/Separation.mpc12
-rw-r--r--TAO/tests/ORB_Local_Config/Separation/Test.cpp71
-rwxr-xr-xTAO/tests/ORB_Local_Config/Separation/run_test.pl49
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.cpp196
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.h69
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL_Export.h38
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.confbin2006 -> 0 bytes
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.conf.xmlbin2874 -> 0 bytes
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.confbin4008 -> 0 bytes
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.conf.xmlbin5744 -> 0 bytes
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf19
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf.xml27
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Service_Dependency.mpc28
-rw-r--r--TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp345
-rwxr-xr-xTAO/tests/ORB_Local_Config/Service_Dependency/run_test.pl49
-rw-r--r--TAO/tests/ORB_Local_Config/Shared/Shared.mpc12
-rw-r--r--TAO/tests/ORB_Local_Config/Shared/Test.cpp85
-rwxr-xr-xTAO/tests/ORB_Local_Config/Shared/run_test.pl49
-rw-r--r--TAO/tests/ORB_Local_Config/Simple/Simple.mpc12
-rw-r--r--TAO/tests/ORB_Local_Config/Simple/Test.cpp40
-rwxr-xr-xTAO/tests/ORB_Local_Config/Simple/run_test.pl49
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp149
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h112
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL_Export.h58
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/README24
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.cpp70
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.idl20
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.cpp25
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.h33
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc61
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp132
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-csd.conf2
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-ssl.conf3
-rwxr-xr-xTAO/tests/ORB_Local_Config/Two_DLL_ORB/run_test.pl48
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-csd.conf2
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-empty.conf1
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-ssl.conf2
-rw-r--r--TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp146
-rw-r--r--TAO/tests/ORB_Local_Config/lib/Service_Configuration_Per_ORB.h70
-rwxr-xr-xTAO/tests/ORB_Local_Config/run_tests_all.pl61
-rw-r--r--TAO/tests/ORB_destroy/.cvsignore1
-rw-r--r--TAO/tests/ORB_destroy/ORB_destroy.cpp204
-rw-r--r--TAO/tests/ORB_destroy/ORB_destroy.mpc7
-rw-r--r--TAO/tests/ORB_destroy/README2
-rwxr-xr-xTAO/tests/ORB_destroy/run_test.pl25
-rw-r--r--TAO/tests/ORB_init/.cvsignore1
-rw-r--r--TAO/tests/ORB_init/ORB_init.cpp201
-rw-r--r--TAO/tests/ORB_init/ORB_init.mpc7
-rw-r--r--TAO/tests/ORB_init/Portspan/.cvsignore1
-rw-r--r--TAO/tests/ORB_init/Portspan/ORB_Init_Portspan.mpc6
-rw-r--r--TAO/tests/ORB_init/Portspan/README16
-rwxr-xr-xTAO/tests/ORB_init/Portspan/run_test.pl44
-rw-r--r--TAO/tests/ORB_init/Portspan/server.cpp47
-rw-r--r--TAO/tests/ORB_init/Portspan/simple.idl5
-rw-r--r--TAO/tests/ORB_init/Portspan/simpleI.cpp42
-rw-r--r--TAO/tests/ORB_init/Portspan/simpleI.h51
-rw-r--r--TAO/tests/ORB_init/README68
-rwxr-xr-xTAO/tests/ORB_init/run_test.pl25
-rw-r--r--TAO/tests/ORB_shutdown/.cvsignore1
-rw-r--r--TAO/tests/ORB_shutdown/Foo_Bar.cpp19
-rw-r--r--TAO/tests/ORB_shutdown/Foo_Bar.h30
-rw-r--r--TAO/tests/ORB_shutdown/Foo_Bar.mpc10
-rw-r--r--TAO/tests/ORB_shutdown/README22
-rw-r--r--TAO/tests/ORB_shutdown/Test.idl13
-rwxr-xr-xTAO/tests/ORB_shutdown/run_test.pl29
-rw-r--r--TAO/tests/ORB_shutdown/server.cpp91
-rw-r--r--TAO/tests/ORT/.cvsignore2
-rw-r--r--TAO/tests/ORT/ORT.mpc35
-rw-r--r--TAO/tests/ORT/ORT_test.idl27
-rw-r--r--TAO/tests/ORT/ORT_test_IORInterceptor.cpp101
-rw-r--r--TAO/tests/ORT/ORT_test_IORInterceptor.h94
-rw-r--r--TAO/tests/ORT/ORT_test_i.cpp27
-rw-r--r--TAO/tests/ORT/ORT_test_i.h42
-rw-r--r--TAO/tests/ORT/ObjectReferenceFactory.cpp40
-rw-r--r--TAO/tests/ORT/ObjectReferenceFactory.h88
-rw-r--r--TAO/tests/ORT/ObjectReferenceFactory.idl27
-rw-r--r--TAO/tests/ORT/README47
-rw-r--r--TAO/tests/ORT/ServerORBInitializer.cpp83
-rw-r--r--TAO/tests/ORT/ServerORBInitializer.h72
-rw-r--r--TAO/tests/ORT/ServerRequestInterceptor.cpp155
-rw-r--r--TAO/tests/ORT/ServerRequestInterceptor.h124
-rw-r--r--TAO/tests/ORT/client.cpp85
-rwxr-xr-xTAO/tests/ORT/run_test.pl49
-rw-r--r--TAO/tests/ORT/server.cpp173
-rw-r--r--TAO/tests/Object_Loader/.cvsignore1
-rw-r--r--TAO/tests/Object_Loader/Loader.cpp64
-rw-r--r--TAO/tests/Object_Loader/Loader.h44
-rw-r--r--TAO/tests/Object_Loader/OLT_Export.h40
-rw-r--r--TAO/tests/Object_Loader/Object_Loader.mpc21
-rw-r--r--TAO/tests/Object_Loader/README16
-rw-r--r--TAO/tests/Object_Loader/Test.idl12
-rw-r--r--TAO/tests/Object_Loader/Test_i.cpp42
-rw-r--r--TAO/tests/Object_Loader/Test_i.h49
-rw-r--r--TAO/tests/Object_Loader/driver.cpp90
-rwxr-xr-xTAO/tests/Object_Loader/run_test.pl28
-rw-r--r--TAO/tests/Object_Loader/svc.conf8
-rw-r--r--TAO/tests/Object_Loader/svc.conf.xml13
-rw-r--r--TAO/tests/Objref_Sequence_Test/.cvsignore2
-rw-r--r--TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc17
-rw-r--r--TAO/tests/Objref_Sequence_Test/README22
-rw-r--r--TAO/tests/Objref_Sequence_Test/Test.idl16
-rw-r--r--TAO/tests/Objref_Sequence_Test/client.cpp133
-rwxr-xr-xTAO/tests/Objref_Sequence_Test/run_test.pl45
-rw-r--r--TAO/tests/Objref_Sequence_Test/server.cpp240
-rw-r--r--TAO/tests/OctetSeq/.cvsignore3
-rw-r--r--TAO/tests/OctetSeq/OctetSeq.cpp257
-rw-r--r--TAO/tests/OctetSeq/OctetSeq.mpc29
-rw-r--r--TAO/tests/OctetSeq/README44
-rw-r--r--TAO/tests/OctetSeq/client.cpp183
-rwxr-xr-xTAO/tests/OctetSeq/run_test.pl60
-rwxr-xr-xTAO/tests/OctetSeq/run_test1.pl60
-rwxr-xr-xTAO/tests/OctetSeq/run_test2.pl60
-rw-r--r--TAO/tests/OctetSeq/server.cpp118
-rw-r--r--TAO/tests/OctetSeq/svc1.conf5
-rw-r--r--TAO/tests/OctetSeq/svc1.conf.xml9
-rw-r--r--TAO/tests/OctetSeq/svc2.conf5
-rw-r--r--TAO/tests/OctetSeq/svc2.conf.xml9
-rw-r--r--TAO/tests/OctetSeq/test.idl57
-rw-r--r--TAO/tests/OctetSeq/test_i.cpp80
-rw-r--r--TAO/tests/OctetSeq/test_i.h68
-rw-r--r--TAO/tests/OctetSeq/test_i.i10
-rw-r--r--TAO/tests/Ondemand_Write/Hello.cpp29
-rw-r--r--TAO/tests/Ondemand_Write/Hello.h37
-rw-r--r--TAO/tests/Ondemand_Write/Ondemand_Write.mpc19
-rw-r--r--TAO/tests/Ondemand_Write/README37
-rw-r--r--TAO/tests/Ondemand_Write/Test.idl20
-rw-r--r--TAO/tests/Ondemand_Write/client.cpp87
-rw-r--r--TAO/tests/Ondemand_Write/run_test.pl49
-rw-r--r--TAO/tests/Ondemand_Write/server.cpp115
-rw-r--r--TAO/tests/Oneway_Buffering/.cvsignore3
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp41
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.h43
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc35
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp49
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h48
-rw-r--r--TAO/tests/Oneway_Buffering/README32
-rw-r--r--TAO/tests/Oneway_Buffering/Test.idl55
-rw-r--r--TAO/tests/Oneway_Buffering/admin.cpp113
-rw-r--r--TAO/tests/Oneway_Buffering/client.cpp793
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_buffer_size.pl72
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_message_count.pl72
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_test.pl69
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_timeout.pl72
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_timeout_reactive.pl71
-rw-r--r--TAO/tests/Oneway_Buffering/server.cpp136
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/.cvsignore2
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp46
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Client_Task.h38
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc21
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/README25
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp39
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Receiver_i.h58
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp52
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Sender_i.h59
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Server_Task.cpp35
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Server_Task.h33
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/Test.idl28
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/client.cpp139
-rwxr-xr-xTAO/tests/Oneways_Invoking_Twoways/run_test.pl50
-rwxr-xr-xTAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl45
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/server.cpp119
-rw-r--r--TAO/tests/Oneways_Invoking_Twoways/svcconf9
-rw-r--r--TAO/tests/Optimized_Connection/Optimized_Connection.mpc16
-rw-r--r--TAO/tests/Optimized_Connection/README19
-rw-r--r--TAO/tests/Optimized_Connection/oc.ior1
-rw-r--r--TAO/tests/Optimized_Connection/oc_client.cpp93
-rw-r--r--TAO/tests/Optimized_Connection/oc_svc.conf1
-rwxr-xr-xTAO/tests/Optimized_Connection/run_test.pl32
-rw-r--r--TAO/tests/POA/Bug_2511_Regression/Bug_2511_Regression.mpc5
-rwxr-xr-xTAO/tests/POA/Bug_2511_Regression/run_test.pl25
-rw-r--r--TAO/tests/POA/Bug_2511_Regression/server.cpp286
-rw-r--r--TAO/tests/POA/Bug_2511_Regression/test.idl8
-rw-r--r--TAO/tests/POA/Current/.cvsignore1
-rw-r--r--TAO/tests/POA/Current/Current.cpp76
-rw-r--r--TAO/tests/POA/Current/Current.mpc6
-rwxr-xr-xTAO/tests/POA/Current/run_test.pl25
-rw-r--r--TAO/tests/POA/Deactivate_Object/Deactivate_Object.mpc9
-rw-r--r--TAO/tests/POA/Deactivate_Object/Hello.cpp19
-rw-r--r--TAO/tests/POA/Deactivate_Object/Hello.h30
-rw-r--r--TAO/tests/POA/Deactivate_Object/Test.idl14
-rwxr-xr-xTAO/tests/POA/Deactivate_Object/run_test.pl27
-rw-r--r--TAO/tests/POA/Deactivate_Object/server.cpp76
-rw-r--r--TAO/tests/POA/Default_Servant/.cvsignore1
-rw-r--r--TAO/tests/POA/Default_Servant/Default_Servant.cpp301
-rw-r--r--TAO/tests/POA/Default_Servant/Default_Servant.mpc6
-rwxr-xr-xTAO/tests/POA/Default_Servant/run_test.pl25
-rw-r--r--TAO/tests/POA/Default_Servant/test.idl5
-rw-r--r--TAO/tests/POA/EndpointPolicy/EndpointPolicy.mpc19
-rw-r--r--TAO/tests/POA/EndpointPolicy/Hello.cpp25
-rw-r--r--TAO/tests/POA/EndpointPolicy/Hello.h33
-rw-r--r--TAO/tests/POA/EndpointPolicy/README26
-rw-r--r--TAO/tests/POA/EndpointPolicy/Test.idl20
-rw-r--r--TAO/tests/POA/EndpointPolicy/client.cpp112
-rwxr-xr-xTAO/tests/POA/EndpointPolicy/run_test.pl107
-rw-r--r--TAO/tests/POA/EndpointPolicy/server.cpp259
-rw-r--r--TAO/tests/POA/Etherealization/.cvsignore1
-rw-r--r--TAO/tests/POA/Etherealization/Etherealization.cpp290
-rw-r--r--TAO/tests/POA/Etherealization/Etherealization.mpc6
-rwxr-xr-xTAO/tests/POA/Etherealization/run_test.pl25
-rw-r--r--TAO/tests/POA/Etherealization/test.idl6
-rw-r--r--TAO/tests/POA/Excessive_Object_Deactivations/.cvsignore1
-rw-r--r--TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp245
-rw-r--r--TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.mpc5
-rwxr-xr-xTAO/tests/POA/Excessive_Object_Deactivations/run_test.pl25
-rw-r--r--TAO/tests/POA/Excessive_Object_Deactivations/test.idl6
-rw-r--r--TAO/tests/POA/Identity/.cvsignore1
-rw-r--r--TAO/tests/POA/Identity/Identity.cpp800
-rw-r--r--TAO/tests/POA/Identity/Identity.mpc6
-rwxr-xr-xTAO/tests/POA/Identity/run_test.pl26
-rw-r--r--TAO/tests/POA/Identity/svc.conf6
-rw-r--r--TAO/tests/POA/Identity/svc.conf.xml9
-rw-r--r--TAO/tests/POA/Identity/test.idl5
-rw-r--r--TAO/tests/POA/MT_Servant_Locator/.cvsignore1
-rw-r--r--TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp372
-rw-r--r--TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.mpc5
-rwxr-xr-xTAO/tests/POA/MT_Servant_Locator/run_test.pl25
-rw-r--r--TAO/tests/POA/MT_Servant_Locator/test.idl6
-rw-r--r--TAO/tests/POA/Nested_Non_Servant_Upcalls/.cvsignore1
-rw-r--r--TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp315
-rw-r--r--TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.mpc5
-rwxr-xr-xTAO/tests/POA/Nested_Non_Servant_Upcalls/run_test.pl25
-rw-r--r--TAO/tests/POA/Nested_Non_Servant_Upcalls/test.idl6
-rw-r--r--TAO/tests/POA/Non_Servant_Upcalls/.cvsignore1
-rw-r--r--TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp146
-rw-r--r--TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.mpc5
-rwxr-xr-xTAO/tests/POA/Non_Servant_Upcalls/run_test.pl25
-rw-r--r--TAO/tests/POA/Non_Servant_Upcalls/test.idl5
-rw-r--r--TAO/tests/POA/Object_Reactivation/.cvsignore1
-rw-r--r--TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp316
-rw-r--r--TAO/tests/POA/Object_Reactivation/Object_Reactivation.mpc5
-rwxr-xr-xTAO/tests/POA/Object_Reactivation/run_test.pl25
-rw-r--r--TAO/tests/POA/Object_Reactivation/test.idl6
-rw-r--r--TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp307
-rw-r--r--TAO/tests/POA/POAManagerFactory/POAManagerFactory.mpc5
-rwxr-xr-xTAO/tests/POA/POAManagerFactory/run_test.pl25
-rw-r--r--TAO/tests/POA/POA_Destruction/.cvsignore1
-rw-r--r--TAO/tests/POA/POA_Destruction/POA_Destruction.cpp95
-rw-r--r--TAO/tests/POA/POA_Destruction/POA_Destruction.mpc5
-rwxr-xr-xTAO/tests/POA/POA_Destruction/run_test.pl25
-rw-r--r--TAO/tests/POA/POA_Destruction/test.idl6
-rw-r--r--TAO/tests/POA/Persistent_ID/.cvsignore2
-rw-r--r--TAO/tests/POA/Persistent_ID/Persistent_ID.mpc16
-rw-r--r--TAO/tests/POA/Persistent_ID/README21
-rw-r--r--TAO/tests/POA/Persistent_ID/client.cpp128
-rwxr-xr-xTAO/tests/POA/Persistent_ID/run_test.pl47
-rw-r--r--TAO/tests/POA/Persistent_ID/server.cpp298
-rw-r--r--TAO/tests/POA/Persistent_ID/test.idl9
-rw-r--r--TAO/tests/POA/Policies/.cvsignore1
-rw-r--r--TAO/tests/POA/Policies/Policies.cpp246
-rw-r--r--TAO/tests/POA/Policies/Policies.mpc5
-rwxr-xr-xTAO/tests/POA/Policies/run_test.pl25
-rw-r--r--TAO/tests/POA/README97
-rw-r--r--TAO/tests/POA/Reference_Counting/Hello.idl7
-rw-r--r--TAO/tests/POA/Reference_Counting/Reference_Counting.mpc8
-rwxr-xr-xTAO/tests/POA/Reference_Counting/run_test.pl27
-rw-r--r--TAO/tests/POA/Reference_Counting/test.cpp153
-rw-r--r--TAO/tests/POA/Single_Threaded_POA/.cvsignore1
-rw-r--r--TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp211
-rw-r--r--TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.mpc5
-rwxr-xr-xTAO/tests/POA/Single_Threaded_POA/run_test.pl26
-rw-r--r--TAO/tests/POA/Single_Threaded_POA/test.idl6
-rw-r--r--TAO/tests/POA/wait_for_completion/.cvsignore1
-rwxr-xr-xTAO/tests/POA/wait_for_completion/run_test.pl25
-rw-r--r--TAO/tests/POA/wait_for_completion/test.idl6
-rw-r--r--TAO/tests/POA/wait_for_completion/wait_for_completion.cpp158
-rw-r--r--TAO/tests/POA/wait_for_completion/wait_for_completion.mpc6
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/Parallel_Connect_Strategy.mpc18
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/README33
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/Test.idl20
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/Test_i.cpp23
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/Test_i.h35
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/blocked.conf3
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/client.cpp121
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/reactive.conf3
-rwxr-xr-xTAO/tests/Parallel_Connect_Strategy/run_test.pl97
-rw-r--r--TAO/tests/Parallel_Connect_Strategy/server.cpp136
-rw-r--r--TAO/tests/Param_Test/.cvsignore4
-rw-r--r--TAO/tests/Param_Test/Param_Test.mpc70
-rw-r--r--TAO/tests/Param_Test/README109
-rw-r--r--TAO/tests/Param_Test/any.cpp485
-rw-r--r--TAO/tests/Param_Test/any.h99
-rw-r--r--TAO/tests/Param_Test/anyop.cpp357
-rw-r--r--TAO/tests/Param_Test/bd_array_seq.cpp252
-rw-r--r--TAO/tests/Param_Test/bd_array_seq.h90
-rw-r--r--TAO/tests/Param_Test/bd_long_seq.cpp221
-rw-r--r--TAO/tests/Param_Test/bd_long_seq.h80
-rw-r--r--TAO/tests/Param_Test/bd_short_seq.cpp245
-rw-r--r--TAO/tests/Param_Test/bd_short_seq.h80
-rw-r--r--TAO/tests/Param_Test/bd_str_seq.cpp219
-rw-r--r--TAO/tests/Param_Test/bd_str_seq.h80
-rw-r--r--TAO/tests/Param_Test/bd_string.cpp195
-rw-r--r--TAO/tests/Param_Test/bd_string.h79
-rw-r--r--TAO/tests/Param_Test/bd_struct_seq.cpp236
-rw-r--r--TAO/tests/Param_Test/bd_struct_seq.h89
-rw-r--r--TAO/tests/Param_Test/bd_wstr_seq.cpp172
-rw-r--r--TAO/tests/Param_Test/bd_wstr_seq.h81
-rw-r--r--TAO/tests/Param_Test/bd_wstring.cpp181
-rw-r--r--TAO/tests/Param_Test/bd_wstring.h80
-rw-r--r--TAO/tests/Param_Test/big_union.cpp553
-rw-r--r--TAO/tests/Param_Test/big_union.h89
-rw-r--r--TAO/tests/Param_Test/client.cpp279
-rw-r--r--TAO/tests/Param_Test/client.h77
-rw-r--r--TAO/tests/Param_Test/complex_any.cpp328
-rw-r--r--TAO/tests/Param_Test/complex_any.h86
-rw-r--r--TAO/tests/Param_Test/driver.cpp634
-rw-r--r--TAO/tests/Param_Test/driver.h52
-rw-r--r--TAO/tests/Param_Test/except.cpp441
-rw-r--r--TAO/tests/Param_Test/except.h79
-rw-r--r--TAO/tests/Param_Test/fixed_array.cpp184
-rw-r--r--TAO/tests/Param_Test/fixed_array.h86
-rw-r--r--TAO/tests/Param_Test/fixed_struct.cpp239
-rw-r--r--TAO/tests/Param_Test/fixed_struct.h79
-rw-r--r--TAO/tests/Param_Test/helper.cpp128
-rw-r--r--TAO/tests/Param_Test/helper.h51
-rw-r--r--TAO/tests/Param_Test/multdim_array.cpp224
-rw-r--r--TAO/tests/Param_Test/multdim_array.h86
-rw-r--r--TAO/tests/Param_Test/nested_struct.cpp210
-rw-r--r--TAO/tests/Param_Test/nested_struct.h81
-rw-r--r--TAO/tests/Param_Test/objref.cpp313
-rw-r--r--TAO/tests/Param_Test/objref.h79
-rw-r--r--TAO/tests/Param_Test/objref_struct.cpp287
-rw-r--r--TAO/tests/Param_Test/objref_struct.h81
-rw-r--r--TAO/tests/Param_Test/options.cpp243
-rw-r--r--TAO/tests/Param_Test/options.h135
-rw-r--r--TAO/tests/Param_Test/param_test.idl391
-rw-r--r--TAO/tests/Param_Test/param_test_i.cpp1080
-rw-r--r--TAO/tests/Param_Test/param_test_i.h349
-rw-r--r--TAO/tests/Param_Test/recursive_struct.cpp261
-rw-r--r--TAO/tests/Param_Test/recursive_struct.h92
-rw-r--r--TAO/tests/Param_Test/recursive_union.cpp396
-rw-r--r--TAO/tests/Param_Test/recursive_union.h99
-rw-r--r--TAO/tests/Param_Test/results.cpp154
-rw-r--r--TAO/tests/Param_Test/results.h89
-rwxr-xr-xTAO/tests/Param_Test/run_test.pl117
-rwxr-xr-xTAO/tests/Param_Test/run_test_dii.pl9
-rw-r--r--TAO/tests/Param_Test/server.cpp201
-rw-r--r--TAO/tests/Param_Test/short.cpp148
-rw-r--r--TAO/tests/Param_Test/short.h79
-rw-r--r--TAO/tests/Param_Test/small_union.cpp210
-rw-r--r--TAO/tests/Param_Test/small_union.h85
-rw-r--r--TAO/tests/Param_Test/svc.conf7
-rw-r--r--TAO/tests/Param_Test/svc.conf.xml10
-rw-r--r--TAO/tests/Param_Test/tests.h58
-rw-r--r--TAO/tests/Param_Test/typecode.cpp192
-rw-r--r--TAO/tests/Param_Test/typecode.h83
-rw-r--r--TAO/tests/Param_Test/ub_any_seq.cpp357
-rw-r--r--TAO/tests/Param_Test/ub_any_seq.h87
-rw-r--r--TAO/tests/Param_Test/ub_array_seq.cpp253
-rw-r--r--TAO/tests/Param_Test/ub_array_seq.h91
-rw-r--r--TAO/tests/Param_Test/ub_long_seq.cpp214
-rw-r--r--TAO/tests/Param_Test/ub_long_seq.h80
-rw-r--r--TAO/tests/Param_Test/ub_objref_seq.cpp318
-rw-r--r--TAO/tests/Param_Test/ub_objref_seq.h89
-rw-r--r--TAO/tests/Param_Test/ub_short_seq.cpp216
-rw-r--r--TAO/tests/Param_Test/ub_short_seq.h80
-rw-r--r--TAO/tests/Param_Test/ub_str_seq.cpp220
-rw-r--r--TAO/tests/Param_Test/ub_str_seq.h80
-rw-r--r--TAO/tests/Param_Test/ub_string.cpp196
-rw-r--r--TAO/tests/Param_Test/ub_string.h79
-rw-r--r--TAO/tests/Param_Test/ub_struct_seq.cpp417
-rw-r--r--TAO/tests/Param_Test/ub_struct_seq.h153
-rw-r--r--TAO/tests/Param_Test/ub_wstr_seq.cpp170
-rw-r--r--TAO/tests/Param_Test/ub_wstr_seq.h81
-rw-r--r--TAO/tests/Param_Test/ub_wstring.cpp181
-rw-r--r--TAO/tests/Param_Test/ub_wstring.h80
-rw-r--r--TAO/tests/Param_Test/ulonglong.cpp163
-rw-r--r--TAO/tests/Param_Test/ulonglong.h76
-rw-r--r--TAO/tests/Param_Test/var_array.cpp181
-rw-r--r--TAO/tests/Param_Test/var_array.h86
-rw-r--r--TAO/tests/Param_Test/var_struct.cpp274
-rw-r--r--TAO/tests/Param_Test/var_struct.h81
-rwxr-xr-xTAO/tests/Permanent_Forward/Permanent_Forward.mpc6
-rwxr-xr-xTAO/tests/Permanent_Forward/README3
-rwxr-xr-xTAO/tests/Permanent_Forward/StubTest.cpp371
-rwxr-xr-xTAO/tests/Permanent_Forward/run_test.pl25
-rw-r--r--TAO/tests/Policies/.cvsignore1
-rw-r--r--TAO/tests/Policies/Manipulation.cpp351
-rw-r--r--TAO/tests/Policies/Policies.mpc7
-rw-r--r--TAO/tests/Policies/README16
-rwxr-xr-xTAO/tests/Policies/run_test.pl27
-rw-r--r--TAO/tests/Policies/test.idl7
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/.cvsignore12
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.cpp151
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.h59
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.cpp38
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.h33
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Echo.cpp30
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Echo.h30
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp53
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h38
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc23
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.cpp99
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.h55
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.cpp40
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.h33
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Shared_Interceptor.h18
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/Test.idl19
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/client.cpp319
-rwxr-xr-xTAO/tests/Portable_Interceptors/AMI/run_test.pl48
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/server.cpp127
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc28
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl12
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/client.cpp27
-rwxr-xr-xTAO/tests/Portable_Interceptors/AdvSlot/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlot/server.cpp199
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc28
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl12
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README60
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp41
-rwxr-xr-xTAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp326
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc28
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl12
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp27
-rwxr-xr-xTAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp242
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.cpp73
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.h52
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp29
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.h33
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc26
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/README10
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.cpp75
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.h51
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/client.cpp244
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.cpp495
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.h207
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/marker.cpp69
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/marker.h32
-rwxr-xr-xTAO/tests/Portable_Interceptors/Benchmark/run_test.pl45
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/server.cpp143
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.cpp405
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.h215
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/test.idl51
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/test_i.cpp47
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/test_i.h52
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc22
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.cpp50
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.h48
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.cpp49
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.h58
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/client.cpp133
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp386
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.h78
-rwxr-xr-xTAO/tests/Portable_Interceptors/Bug_1559/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/server.cpp166
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp286
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h81
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/test.idl48
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/test_i.cpp53
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/test_i.h55
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2088/Bug_2088.mpc10
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.cpp37
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.h51
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2088/client.cpp67
-rwxr-xr-xTAO/tests/Portable_Interceptors/Bug_2088/run_test.pl26
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/Bug_2510_Regression.mpc20
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.cpp49
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.h48
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp117
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.cpp116
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.h72
-rwxr-xr-xTAO/tests/Portable_Interceptors/Bug_2510_Regression/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp127
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/test.idl32
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.cpp53
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.h55
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/.cvsignore1
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp98
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h41
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp138
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp69
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h47
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/PI_Dynamic.mpc16
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp109
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h48
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp371
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h139
-rwxr-xr-xTAO/tests/Portable_Interceptors/Collocated/Dynamic/run_test.pl42
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/test.idl42
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp60
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h54
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/.cvsignore1
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.cpp95
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.h41
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.cpp72
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.h45
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp122
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc16
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp108
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h46
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp492
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.h125
-rwxr-xr-xTAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/run_test.pl82
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test.idl48
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp56
-rw-r--r--TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.h53
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.cpp46
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.h51
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.cpp46
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.h51
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc22
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/README10
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/client.cpp156
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.cpp255
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.h84
-rwxr-xr-xTAO/tests/Portable_Interceptors/Dynamic/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/server.cpp141
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp182
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.h83
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/test.idl61
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/test_i.cpp75
-rw-r--r--TAO/tests/Portable_Interceptors/Dynamic/test_i.h53
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.cpp69
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.h62
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.cpp151
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.h125
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc24
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/README72
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.cpp60
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.h78
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.cpp175
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.h137
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp162
-rwxr-xr-xTAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl62
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp230
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/test.idl41
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/test_i.cpp35
-rw-r--r--TAO/tests/Portable_Interceptors/ForwardRequest/test_i.h57
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp126
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.h110
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp59
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.h74
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp198
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h110
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp60
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.h74
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc22
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/README28
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp95
-rwxr-xr-xTAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp148
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/test.idl30
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/test_i.cpp21
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/test_i.h47
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc22
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/README16
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.cpp52
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.h71
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.cpp90
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.h116
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp91
-rwxr-xr-xTAO/tests/Portable_Interceptors/ORB_Shutdown/run_test.pl53
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp138
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/test.idl21
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.cpp34
-rw-r--r--TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.h53
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.cpp70
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.h81
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp156
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h113
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.cpp127
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.h106
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc23
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/README30
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp97
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.h82
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp252
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h113
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/client.cpp164
-rwxr-xr-xTAO/tests/Portable_Interceptors/PICurrent/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/server.cpp162
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/test.idl30
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp201
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/test_i.h74
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/.cvsignore1
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp78
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h95
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/PI_PolicyFactory.mpc14
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/Policy.cpp52
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/Policy.h67
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp36
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.h70
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/README26
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.cpp64
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.h74
-rwxr-xr-xTAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl32
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp128
-rw-r--r--TAO/tests/Portable_Interceptors/PolicyFactory/test.idl31
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp98
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h45
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp226
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp138
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h59
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc16
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp109
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h53
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp395
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h138
-rwxr-xr-xTAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl134
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl42
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp60
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h54
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp98
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h45
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp90
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h58
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp94
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h57
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc26
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp112
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h53
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp184
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h81
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp136
-rwxr-xr-xTAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl154
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp192
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h84
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp138
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl42
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp55
-rw-r--r--TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h54
-rw-r--r--TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.cpp48
-rw-r--r--TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.h53
-rw-r--r--TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Register_ORBInitializer.mpc10
-rw-r--r--TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp59
-rwxr-xr-xTAO/tests/Portable_Interceptors/Recursive_ORBInitializer/run_test.pl26
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/Register_ORBInitializer.mpc11
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp113
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.h49
-rwxr-xr-xTAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl26
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp148
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/test.idl21
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.cpp16
-rw-r--r--TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.h38
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.cpp77
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.h64
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.cpp273
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h105
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc24
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/README168
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.cpp72
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.h89
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.cpp75
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.h64
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.cpp263
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.h112
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp224
-rwxr-xr-xTAO/tests/Portable_Interceptors/Request_Interceptor_Flow/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp135
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl38
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp69
-rw-r--r--TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.h61
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.cpp50
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.h48
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc22
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/README8
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.cpp45
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.h48
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp134
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.cpp284
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.h78
-rwxr-xr-xTAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl50
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp141
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.cpp224
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.h74
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test.idl48
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.cpp53
-rw-r--r--TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.h55
-rw-r--r--TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc7
-rw-r--r--TAO/tests/Portable_Interceptors/Slot/driver.cpp64
-rwxr-xr-xTAO/tests/Portable_Interceptors/Slot/run_test.pl26
-rw-r--r--TAO/tests/QtTests/.cvsignore8
-rw-r--r--TAO/tests/QtTests/QtTests.mpc30
-rw-r--r--TAO/tests/QtTests/README31
-rwxr-xr-xTAO/tests/QtTests/client.cpp159
-rwxr-xr-xTAO/tests/QtTests/client.h70
-rwxr-xr-xTAO/tests/QtTests/server.cpp145
-rwxr-xr-xTAO/tests/QtTests/test.idl11
-rwxr-xr-xTAO/tests/QtTests/test_i.cpp34
-rwxr-xr-xTAO/tests/QtTests/test_i.h54
-rw-r--r--TAO/tests/Queued_Message_Test/.cvsignore1
-rw-r--r--TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp176
-rw-r--r--TAO/tests/Queued_Message_Test/Queued_Message_Test.mpc7
-rwxr-xr-xTAO/tests/Queued_Message_Test/run_test.pl27
-rw-r--r--TAO/tests/README345
-rw-r--r--TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/.cvsignore1
-rw-r--r--TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/AO_Multiple_ORBs.mpc5
-rwxr-xr-xTAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/run_test.pl20
-rw-r--r--TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp109
-rw-r--r--TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.idl6
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/README45
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc17
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/bands.hpux1
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/bands.irix1
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/bands.nt1
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/bands.tru641
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/bands.unix1
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/client.cpp387
-rwxr-xr-xTAO/tests/RTCORBA/Banded_Connections/run_test.pl91
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/server.cpp632
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/svc.conf4
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/svc.conf.xml7
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/test.idl11
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.cpp50
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.h48
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/README50
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc19
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/client.cpp268
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/interceptors.cpp131
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/interceptors.h80
-rwxr-xr-xTAO/tests/RTCORBA/Client_Propagated/run_test.pl64
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/server.cpp320
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/svc.conf4
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/svc.conf.xml7
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/test.idl13
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/README141
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc17
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/client.cpp269
-rwxr-xr-xTAO/tests/RTCORBA/Client_Protocol/run_test.pl78
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/server.cpp255
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/svc.conf3
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/svc.conf.xml6
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/test.idl13
-rw-r--r--TAO/tests/RTCORBA/Collocation/.cvsignore1
-rw-r--r--TAO/tests/RTCORBA/Collocation/Collocation.cpp981
-rw-r--r--TAO/tests/RTCORBA/Collocation/README48
-rw-r--r--TAO/tests/RTCORBA/Collocation/RTCORBA_Collocation.mpc7
-rw-r--r--TAO/tests/RTCORBA/Collocation/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Collocation/continuous.conf.xml6
-rwxr-xr-xTAO/tests/RTCORBA/Collocation/run_test.pl37
-rw-r--r--TAO/tests/RTCORBA/Collocation/svc.conf4
-rw-r--r--TAO/tests/RTCORBA/Collocation/svc.conf.xml7
-rw-r--r--TAO/tests/RTCORBA/Collocation/test.idl8
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/.cvsignore1
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp168
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/README7
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/RTCORBA_Destroy_Thread_Pool.mpc7
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf.xml6
-rwxr-xr-xTAO/tests/RTCORBA/Destroy_Thread_Pool/run_test.pl33
-rw-r--r--TAO/tests/RTCORBA/Diffserv/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.cpp133
-rw-r--r--TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.h58
-rw-r--r--TAO/tests/RTCORBA/Diffserv/README47
-rw-r--r--TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc17
-rw-r--r--TAO/tests/RTCORBA/Diffserv/client.cpp273
-rw-r--r--TAO/tests/RTCORBA/Diffserv/server.cpp240
-rw-r--r--TAO/tests/RTCORBA/Diffserv/test.idl9
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/README10
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc18
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp225
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml6
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl117
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp397
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf1
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml5
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl12
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp71
-rw-r--r--TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h45
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/README99
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc17
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/client.cpp214
-rwxr-xr-xTAO/tests/RTCORBA/Explicit_Binding/run_test.pl49
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/server.cpp196
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/svc.conf.xml6
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/test.idl12
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/README36
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc17
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/bands1
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/client.cpp389
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/empty_file0
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/invocation_priorities1
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/lanes1
-rwxr-xr-xTAO/tests/RTCORBA/Linear_Priority/run_test.pl142
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/server.cpp354
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/svc.conf5
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/svc.conf.xml8
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/test.idl8
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/.cvsignore3
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README41
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc17
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp440
-rwxr-xr-xTAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl161
-rwxr-xr-xTAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl163
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf.xml9
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp276
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf7
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf.xml9
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/test.idl12
-rw-r--r--TAO/tests/RTCORBA/ORB_init/.cvsignore1
-rw-r--r--TAO/tests/RTCORBA/ORB_init/ORB_init.cpp132
-rw-r--r--TAO/tests/RTCORBA/ORB_init/README6
-rw-r--r--TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc6
-rwxr-xr-xTAO/tests/RTCORBA/ORB_init/run_test.pl27
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/README17
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc17
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/client.cpp107
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/continuous.conf.xml6
-rwxr-xr-xTAO/tests/RTCORBA/Persistent_IOR/run_test.pl145
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/server.cpp447
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/test.idl8
-rw-r--r--TAO/tests/RTCORBA/Policies/.cvsignore1
-rw-r--r--TAO/tests/RTCORBA/Policies/Policies.cpp233
-rw-r--r--TAO/tests/RTCORBA/Policies/Policies.mpc5
-rwxr-xr-xTAO/tests/RTCORBA/Policies/run_test.pl25
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/README44
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc17
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/client.cpp218
-rwxr-xr-xTAO/tests/RTCORBA/Policy_Combinations/run_test.pl112
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/server.cpp975
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/svc.conf6
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/svc.conf.xml8
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/test.idl10
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc18
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/README51
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp259
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf.xml6
-rwxr-xr-xTAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl123
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp389
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf4
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf.xml7
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test.idl11
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.cpp152
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.h71
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/README132
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc17
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/client.cpp179
-rwxr-xr-xTAO/tests/RTCORBA/Private_Connection/run_test.pl55
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/server.cpp211
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/test.idl12
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc13
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/README118
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands_r1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp631
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/empty_file0
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop_shmiop1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities_r1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes_r1
-rwxr-xr-xTAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl162
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp459
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop_iiop1
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf10
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf.xml13
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/test.idl8
-rw-r--r--TAO/tests/RTCORBA/README98
-rw-r--r--TAO/tests/RTCORBA/RTCORBA-test-configurations.xlsbin14848 -> 0 bytes
-rw-r--r--TAO/tests/RTCORBA/RTMutex/.cvsignore1
-rw-r--r--TAO/tests/RTCORBA/RTMutex/README23
-rw-r--r--TAO/tests/RTCORBA/RTMutex/RTCORBA_RTMutex.mpc5
-rwxr-xr-xTAO/tests/RTCORBA/RTMutex/run_test.pl27
-rw-r--r--TAO/tests/RTCORBA/RTMutex/server.cpp571
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/README21
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc17
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/client.cpp156
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/continuous.conf.xml6
-rwxr-xr-xTAO/tests/RTCORBA/Server_Declared/run_test.pl91
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/server.cpp391
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/svc.conf4
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/svc.conf.xml7
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/test.idl13
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/README93
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc17
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/client.cpp77
-rwxr-xr-xTAO/tests/RTCORBA/Server_Protocol/run_test.pl112
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server.cpp371
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf2
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf.xml6
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_iiop_shmiop.conf2
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_iiop_uiop.conf2
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf5
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf.xml8
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf5
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf.xml8
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf6
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf.xml8
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf2
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf.xml6
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/test.idl9
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/.cvsignore2
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/README10
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc18
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/client.cpp179
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/continuous.conf2
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/continuous.conf.xml6
-rwxr-xr-xTAO/tests/RTCORBA/Thread_Pool/run_test.pl124
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/server.cpp398
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/svc.conf4
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/svc.conf.xml7
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/test.idl11
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/test_i.cpp65
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/test_i.h44
-rw-r--r--TAO/tests/RTCORBA/check_supported_priorities.cpp53
-rw-r--r--TAO/tests/RTCORBA/common_args.cpp388
-rw-r--r--TAO/tests/RTScheduling/Current/.cvsignore1
-rw-r--r--TAO/tests/RTScheduling/Current/Current.mpc12
-rw-r--r--TAO/tests/RTScheduling/Current/README63
-rw-r--r--TAO/tests/RTScheduling/Current/Thread_Task.cpp206
-rw-r--r--TAO/tests/RTScheduling/Current/Thread_Task.h30
-rwxr-xr-xTAO/tests/RTScheduling/Current/run_test.pl29
-rw-r--r--TAO/tests/RTScheduling/Current/test.cpp53
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/.cvsignore1
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/DT_Spawn.mpc11
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/README39
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h69
-rwxr-xr-xTAO/tests/RTScheduling/DT_Spawn/run_test.pl29
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/test.cpp137
-rw-r--r--TAO/tests/RTScheduling/Scheduler.cpp243
-rw-r--r--TAO/tests/RTScheduling/Scheduler.h131
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/.cvsignore2
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/README86
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc21
-rwxr-xr-xTAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl53
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test.idl9
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp142
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp209
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/.cvsignore1
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/README59
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/Thread_Cancel.mpc13
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp160
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.h29
-rwxr-xr-xTAO/tests/RTScheduling/Thread_Cancel/run_test.pl29
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/test.cpp79
-rw-r--r--TAO/tests/RTScheduling/VoidData/.cvsignore1
-rw-r--r--TAO/tests/RTScheduling/VoidData/README17
-rw-r--r--TAO/tests/RTScheduling/VoidData/VoidData.mpc11
-rwxr-xr-xTAO/tests/RTScheduling/VoidData/run_test.pl29
-rw-r--r--TAO/tests/RTScheduling/VoidData/test.h17
-rw-r--r--TAO/tests/RTScheduling/VoidData/test.idl6
-rw-r--r--TAO/tests/RTScheduling/VoidData/test_client.cpp34
-rw-r--r--TAO/tests/Reliable_Oneways/.cvsignore2
-rw-r--r--TAO/tests/Reliable_Oneways/Oneway_Receiver.cpp49
-rw-r--r--TAO/tests/Reliable_Oneways/Oneway_Receiver.h36
-rw-r--r--TAO/tests/Reliable_Oneways/README41
-rw-r--r--TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc19
-rw-r--r--TAO/tests/Reliable_Oneways/Shutdown_Helper.cpp18
-rw-r--r--TAO/tests/Reliable_Oneways/Shutdown_Helper.h30
-rw-r--r--TAO/tests/Reliable_Oneways/Test.idl29
-rw-r--r--TAO/tests/Reliable_Oneways/client.cpp453
-rwxr-xr-xTAO/tests/Reliable_Oneways/run_sync_none.pl42
-rwxr-xr-xTAO/tests/Reliable_Oneways/run_sync_with_server.pl42
-rwxr-xr-xTAO/tests/Reliable_Oneways/run_sync_with_target.pl42
-rwxr-xr-xTAO/tests/Reliable_Oneways/run_sync_with_transport.pl42
-rwxr-xr-xTAO/tests/Reliable_Oneways/run_test.pl49
-rw-r--r--TAO/tests/Reliable_Oneways/server.cpp113
-rw-r--r--TAO/tests/Sequence_Unit_Tests/.cvsignore4
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp62
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp56
-rw-r--r--TAO/tests/Sequence_Unit_Tests/README23
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc148
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp52
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp58
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Unbounded_String.cpp55
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp410
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp59
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp128
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp392
-rw-r--r--TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp360
-rw-r--r--TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp42
-rw-r--r--TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp39
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_array.cpp51
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_array.hpp46
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_reference.cpp101
-rw-r--r--TAO/tests/Sequence_Unit_Tests/mock_reference.hpp109
-rw-r--r--TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp342
-rwxr-xr-xTAO/tests/Sequence_Unit_Tests/run_test.pl76
-rw-r--r--TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp402
-rw-r--r--TAO/tests/Sequence_Unit_Tests/string_sequence_tester.hpp501
-rw-r--r--TAO/tests/Sequence_Unit_Tests/string_ut.cpp139
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp91
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp201
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_counters.hpp106
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_exception.hpp15
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp75
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp72
-rw-r--r--TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp101
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_array_sequence_ut.cpp77
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp86
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp519
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp486
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp450
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp56
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp125
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp544
-rw-r--r--TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp477
-rw-r--r--TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp269
-rw-r--r--TAO/tests/Servant_To_Reference_Test/.cvsignore1
-rw-r--r--TAO/tests/Servant_To_Reference_Test/Servant_to_Reference.mpc18
-rw-r--r--TAO/tests/Servant_To_Reference_Test/Test.idl24
-rw-r--r--TAO/tests/Servant_To_Reference_Test/Test_i.cpp43
-rw-r--r--TAO/tests/Servant_To_Reference_Test/Test_i.h63
-rwxr-xr-xTAO/tests/Servant_To_Reference_Test/run_test.pl33
-rw-r--r--TAO/tests/Servant_To_Reference_Test/server.cpp208
-rw-r--r--TAO/tests/Server_Connection_Purging/.cvsignore2
-rw-r--r--TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc18
-rw-r--r--TAO/tests/Server_Connection_Purging/Test.idl10
-rw-r--r--TAO/tests/Server_Connection_Purging/Test_i.cpp12
-rw-r--r--TAO/tests/Server_Connection_Purging/Test_i.h24
-rw-r--r--TAO/tests/Server_Connection_Purging/client.cpp137
-rwxr-xr-xTAO/tests/Server_Connection_Purging/run_test.pl45
-rw-r--r--TAO/tests/Server_Connection_Purging/server.cpp110
-rw-r--r--TAO/tests/Server_Connection_Purging/svc.conf3
-rw-r--r--TAO/tests/Server_Leaks/.cvsignore2
-rw-r--r--TAO/tests/Server_Leaks/Ping_Service.cpp24
-rw-r--r--TAO/tests/Server_Leaks/Ping_Service.h33
-rw-r--r--TAO/tests/Server_Leaks/README15
-rw-r--r--TAO/tests/Server_Leaks/Server_Leaks.mpc18
-rw-r--r--TAO/tests/Server_Leaks/Test.idl16
-rw-r--r--TAO/tests/Server_Leaks/client.cpp94
-rwxr-xr-xTAO/tests/Server_Leaks/run_test.pl87
-rw-r--r--TAO/tests/Server_Leaks/server.cpp112
-rw-r--r--TAO/tests/Server_Port_Zero/.cvsignore1
-rw-r--r--TAO/tests/Server_Port_Zero/Hello.cpp27
-rw-r--r--TAO/tests/Server_Port_Zero/Hello.h33
-rw-r--r--TAO/tests/Server_Port_Zero/README10
-rw-r--r--TAO/tests/Server_Port_Zero/Server_Port_Zero.mpc11
-rw-r--r--TAO/tests/Server_Port_Zero/Test.idl20
-rwxr-xr-xTAO/tests/Server_Port_Zero/run_test.pl35
-rw-r--r--TAO/tests/Server_Port_Zero/server.cpp117
-rw-r--r--TAO/tests/Single_Read/.cvsignore2
-rw-r--r--TAO/tests/Single_Read/README18
-rw-r--r--TAO/tests/Single_Read/Single_Read.mpc18
-rw-r--r--TAO/tests/Single_Read/client.cpp167
-rwxr-xr-xTAO/tests/Single_Read/run_test.pl52
-rw-r--r--TAO/tests/Single_Read/server.cpp110
-rw-r--r--TAO/tests/Single_Read/test.idl14
-rw-r--r--TAO/tests/Single_Read/test_i.cpp38
-rw-r--r--TAO/tests/Single_Read/test_i.h45
-rw-r--r--TAO/tests/Smart_Proxies/.cvsignore2
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/.cvsignore2
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/README48
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/SP_Benchmark.mpc16
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp40
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h26
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/client.cpp263
-rwxr-xr-xTAO/tests/Smart_Proxies/Benchmark/run_test.pl45
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/server.cpp184
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/test.idl20
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/.cvsignore1
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp157
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h61
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/Diamond.idl24
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp134
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/Diamond_i.h86
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/README9
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/SP_Collocation.mpc36
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp61
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h39
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/diamond_export.h40
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/main.cpp27
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/stub_export.h40
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/svc.conf14
-rw-r--r--TAO/tests/Smart_Proxies/Collocation/svc.conf.xml15
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/.cvsignore2
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/README43
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/SP_On_Demand.mpc17
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp35
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.h18
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.cpp27
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.h23
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/client.cpp104
-rwxr-xr-xTAO/tests/Smart_Proxies/On_Demand/run_test.pl46
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/server.cpp181
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/svc.conf4
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/svc.conf.xml9
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/test.idl21
-rw-r--r--TAO/tests/Smart_Proxies/Policy/.cvsignore2
-rw-r--r--TAO/tests/Smart_Proxies/Policy/README87
-rw-r--r--TAO/tests/Smart_Proxies/Policy/SP_Policy.mpc16
-rw-r--r--TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp56
-rw-r--r--TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.h29
-rw-r--r--TAO/tests/Smart_Proxies/Policy/client.cpp153
-rwxr-xr-xTAO/tests/Smart_Proxies/Policy/run_test.pl116
-rw-r--r--TAO/tests/Smart_Proxies/Policy/server.cpp182
-rw-r--r--TAO/tests/Smart_Proxies/Policy/test.idl23
-rw-r--r--TAO/tests/Smart_Proxies/README39
-rw-r--r--TAO/tests/Smart_Proxies/Smart_Proxies.mpc18
-rw-r--r--TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp55
-rw-r--r--TAO/tests/Smart_Proxies/Smart_Proxy_Impl.h29
-rw-r--r--TAO/tests/Smart_Proxies/client.cpp123
-rw-r--r--TAO/tests/Smart_Proxies/dtor/.cvsignore2
-rw-r--r--TAO/tests/Smart_Proxies/dtor/README16
-rw-r--r--TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.cpp33
-rw-r--r--TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.h19
-rw-r--r--TAO/tests/Smart_Proxies/dtor/client.cpp117
-rw-r--r--TAO/tests/Smart_Proxies/dtor/dtor.mpc15
-rwxr-xr-xTAO/tests/Smart_Proxies/dtor/run_test.pl56
-rw-r--r--TAO/tests/Smart_Proxies/dtor/server.cpp159
-rw-r--r--TAO/tests/Smart_Proxies/dtor/test.idl12
-rwxr-xr-xTAO/tests/Smart_Proxies/run_test.pl51
-rw-r--r--TAO/tests/Smart_Proxies/server.cpp184
-rw-r--r--TAO/tests/Smart_Proxies/test.idl23
-rw-r--r--TAO/tests/Stack_Recursion/.cvsignore2
-rw-r--r--TAO/tests/Stack_Recursion/Client_Task.cpp72
-rw-r--r--TAO/tests/Stack_Recursion/Client_Task.h47
-rw-r--r--TAO/tests/Stack_Recursion/README23
-rw-r--r--TAO/tests/Stack_Recursion/Sender.cpp87
-rw-r--r--TAO/tests/Stack_Recursion/Sender.h53
-rw-r--r--TAO/tests/Stack_Recursion/Server_Task.cpp44
-rw-r--r--TAO/tests/Stack_Recursion/Server_Task.h39
-rw-r--r--TAO/tests/Stack_Recursion/Stack_Recursion.mpc22
-rw-r--r--TAO/tests/Stack_Recursion/Test.idl24
-rw-r--r--TAO/tests/Stack_Recursion/client.cpp102
-rwxr-xr-xTAO/tests/Stack_Recursion/run_test.pl53
-rw-r--r--TAO/tests/Stack_Recursion/server.cpp124
-rw-r--r--TAO/tests/Strategies/.cvsignore2
-rw-r--r--TAO/tests/Strategies/README20
-rw-r--r--TAO/tests/Strategies/Strategies.mpc18
-rw-r--r--TAO/tests/Strategies/advanced_svc.conf12
-rw-r--r--TAO/tests/Strategies/advanced_svc.conf.xml15
-rw-r--r--TAO/tests/Strategies/client.cpp122
-rwxr-xr-xTAO/tests/Strategies/run_test.pl88
-rw-r--r--TAO/tests/Strategies/server.cpp113
-rw-r--r--TAO/tests/Strategies/simple_test.idl10
-rw-r--r--TAO/tests/Strategies/simple_test_i.cpp27
-rw-r--r--TAO/tests/Strategies/simple_test_i.h48
-rw-r--r--TAO/tests/Strategies/simple_test_i.i8
-rw-r--r--TAO/tests/Strategies/svc.conf9
-rw-r--r--TAO/tests/Strategies/svc.conf.xml9
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/.cvsignore2
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/README32
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc18
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/client.cpp330
-rwxr-xr-xTAO/tests/Timed_Buffered_Oneways/run_test.pl51
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/server.cpp110
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/test.idl13
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/test_i.cpp38
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/test_i.h45
-rw-r--r--TAO/tests/Timeout/.cvsignore2
-rw-r--r--TAO/tests/Timeout/README16
-rw-r--r--TAO/tests/Timeout/Timeout.mpc18
-rw-r--r--TAO/tests/Timeout/client.cpp279
-rwxr-xr-xTAO/tests/Timeout/run_test.pl50
-rw-r--r--TAO/tests/Timeout/server.cpp108
-rw-r--r--TAO/tests/Timeout/test.idl12
-rw-r--r--TAO/tests/Timeout/test_i.cpp36
-rw-r--r--TAO/tests/Timeout/test_i.h46
-rw-r--r--TAO/tests/Two_Objects/.cvsignore2
-rw-r--r--TAO/tests/Two_Objects/First_i.cpp29
-rw-r--r--TAO/tests/Two_Objects/First_i.h36
-rw-r--r--TAO/tests/Two_Objects/Object_Factory_i.cpp54
-rw-r--r--TAO/tests/Two_Objects/Object_Factory_i.h38
-rw-r--r--TAO/tests/Two_Objects/README54
-rw-r--r--TAO/tests/Two_Objects/Second_i.cpp63
-rw-r--r--TAO/tests/Two_Objects/Second_i.h38
-rw-r--r--TAO/tests/Two_Objects/Two_Objects.idl31
-rw-r--r--TAO/tests/Two_Objects/Two_Objects.mpc21
-rw-r--r--TAO/tests/Two_Objects/client.cpp106
-rwxr-xr-xTAO/tests/Two_Objects/run_test.pl48
-rw-r--r--TAO/tests/Two_Objects/server.cpp158
-rw-r--r--TAO/tests/Two_Objects/worker.cpp33
-rw-r--r--TAO/tests/Two_Objects/worker.h31
-rw-r--r--TAO/tests/Typedef_String_Array/.cvsignore2
-rw-r--r--TAO/tests/Typedef_String_Array/client.cpp85
-rwxr-xr-xTAO/tests/Typedef_String_Array/run_test.pl50
-rw-r--r--TAO/tests/Typedef_String_Array/server.cpp112
-rw-r--r--TAO/tests/Typedef_String_Array/test.idl18
-rw-r--r--TAO/tests/Typedef_String_Array/testImpl.cpp42
-rw-r--r--TAO/tests/Typedef_String_Array/testImpl.h16
-rw-r--r--TAO/tests/Typedef_String_Array/typedef_string_array.mpc17
-rw-r--r--TAO/tests/UNKNOWN_Exception/.cvsignore2
-rw-r--r--TAO/tests/UNKNOWN_Exception/README32
-rw-r--r--TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc17
-rw-r--r--TAO/tests/UNKNOWN_Exception/client.cpp101
-rwxr-xr-xTAO/tests/UNKNOWN_Exception/run_test.pl49
-rw-r--r--TAO/tests/UNKNOWN_Exception/server.cpp257
-rw-r--r--TAO/tests/UNKNOWN_Exception/test.idl18
-rw-r--r--TAO/tests/Xt_Stopwatch/.cvsignore4
-rw-r--r--TAO/tests/Xt_Stopwatch/Client.h61
-rw-r--r--TAO/tests/Xt_Stopwatch/Control.cpp54
-rw-r--r--TAO/tests/Xt_Stopwatch/Control.h63
-rw-r--r--TAO/tests/Xt_Stopwatch/README35
-rw-r--r--TAO/tests/Xt_Stopwatch/Stopwatch_display.cpp59
-rw-r--r--TAO/tests/Xt_Stopwatch/Stopwatch_display.h51
-rw-r--r--TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc21
-rw-r--r--TAO/tests/Xt_Stopwatch/client.cpp180
-rwxr-xr-xTAO/tests/Xt_Stopwatch/run_test.pl45
-rw-r--r--TAO/tests/Xt_Stopwatch/server.cpp146
-rw-r--r--TAO/tests/Xt_Stopwatch/test.idl13
-rw-r--r--TAO/tests/Xt_Stopwatch/test_i.cpp33
-rw-r--r--TAO/tests/Xt_Stopwatch/test_i.h53
-rw-r--r--TAO/tests/Xt_Stopwatch/timer.cpp84
-rw-r--r--TAO/tests/Xt_Stopwatch/timer.h72
-rw-r--r--TAO/tests/tests.mwc5
2796 files changed, 0 insertions, 202511 deletions
diff --git a/TAO/tests/AMH_Exceptions/.cvsignore b/TAO/tests/AMH_Exceptions/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/AMH_Exceptions/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc b/TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc
deleted file mode 100644
index 5188e4a669b..00000000000
--- a/TAO/tests/AMH_Exceptions/AMH_Exceptions.mpc
+++ /dev/null
@@ -1,15 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, amh, strategies {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoexe, amh, portableserver, strategies {
- after += *Server
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/AMH_Exceptions/Test.idl b/TAO/tests/AMH_Exceptions/Test.idl
deleted file mode 100644
index c3ffd609ca4..00000000000
--- a/TAO/tests/AMH_Exceptions/Test.idl
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// $Id$
-//
-
-/// A simple module to avoid namespace pollution
-module Test
-{
-
- exception InvalidTimestamp {};
- exception ServerOverload {};
-
- /// Use a timestamp to measure the roundtrip delay
- typedef unsigned long long Timestamp;
-
- valuetype Red_Herring
- {
- Timestamp test_method (in Timestamp send_time)
- raises (InvalidTimestamp, ServerOverload);
- };
-
- /// Measure roundtrip Delay
- interface Roundtrip
- {
- Timestamp test_method (in Timestamp send_time)
- raises (InvalidTimestamp, ServerOverload);
- };
-
-};
diff --git a/TAO/tests/AMH_Exceptions/client.cpp b/TAO/tests/AMH_Exceptions/client.cpp
deleted file mode 100644
index 9ff92b2933d..00000000000
--- a/TAO/tests/AMH_Exceptions/client.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-
-const char *ior = "file://test.ior";
-
-int
-main (int argc, char *argv[])
-{
- int received_expected_exception = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- Test::Timestamp time = 10;
- roundtrip->test_method (time ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH(Test::ServerOverload, ov)
- {
- ACE_DEBUG ((LM_DEBUG, "Received expected exception\n"));
- received_expected_exception = 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
- return 1;
- }
- ACE_ENDTRY;
-
- if(!received_expected_exception)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR, expecting a ServerOverload exception!!\n"),
- 1);
- }
-
- return 0;
-}
diff --git a/TAO/tests/AMH_Exceptions/run_test.pl b/TAO/tests/AMH_Exceptions/run_test.pl
deleted file mode 100755
index 4c78cd27121..00000000000
--- a/TAO/tests/AMH_Exceptions/run_test.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that tests AMH exceptions
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-# Amount of delay (in seconds) between starting a server and a client.
-$sleeptime = $PerlACE::wait_interval_for_process_creation;
-
-# File used to pass AMH server ior to its clients.
-# This file name is hard-coded in the server.cpp and client.cpp files
-$iorfile = PerlACE::LocalFile("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $AMH = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $AMH = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "");
-
-# Run the AMH server.
-$AMH->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
- print STDERR "ERROR: File containing AMH Server ior,".
- " <$iorfile>, cannot be found\n";
- $AMH->Kill ();
- exit 1;
-}
-
-
-# Run client.
-$client = $CL->SpawnWaitKill (30);
-
-# Clean up.
-$amhserver= $AMH->TerminateWaitKill (5);
-
-if ($amhserver != 0) {
- print STDERR "ERROR: AMH Server returned $amhserver\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/AMH_Exceptions/server.cpp b/TAO/tests/AMH_Exceptions/server.cpp
deleted file mode 100644
index 05d82934074..00000000000
--- a/TAO/tests/AMH_Exceptions/server.cpp
+++ /dev/null
@@ -1,241 +0,0 @@
-
-// $Id$
-
-#include "ace/OS_NS_stdio.h"
-#include "TestS.h"
-
-/***************************/
-/*** Servant Declaration ***/
-
-class ST_AMH_Servant
- : public virtual POA_Test::AMH_Roundtrip
-{
-public:
- ST_AMH_Servant (CORBA::ORB_ptr orb);
-
- void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- CORBA::ORB_ptr orb_;
-};
-
-
-/***************************/
-/*** Servant Definition ***/
-
-ST_AMH_Servant::ST_AMH_Servant (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Throw an overload exception
-
- Test::ServerOverload *ts = new Test::ServerOverload;
-
- // Calee owns the memory now. Need not delete 'ts'
- Test::AMH_RoundtripExceptionHolder holder (ts);
-
- ACE_TRY
- {
- _tao_rh->test_method_excep (&holder ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {}
- ACE_ENDTRY;
-
- ACE_UNUSED_ARG (send_time);
-}
-
-
-/*** Server Declaration ***/
-
-/**
- Class that performs all 'dirty' initialisation work that is common to
- all the AMH servers and 'hides' all the common ORB functions.
- */
-class ST_AMH_Server
-{
-public:
- ST_AMH_Server (int *argc, char **argv);
- virtual ~ST_AMH_Server ();
-
- /// ORB inititalisation stuff
- int start_orb_and_poa (void);
-
- /// register the servant with the poa
- virtual void register_servant (ST_AMH_Servant *servant);
-
- /// orb-perform_work () abstraction
- virtual void run_event_loop ();
-
-public:
- /// Accesor method (for servants) to the initialised ORB
- CORBA::ORB_ptr orb () { return this->orb_.in (); }
-
-protected:
- int *argc_;
- char **argv_;
- char *ior_output_file_;
- CORBA::ORB_var orb_;
- PortableServer::POA_var root_poa_;
-
-private:
- /// Write servant IOR to file specified with the '-o' option
- int write_ior_to_file (CORBA::String_var ior);
-};
-
-
-
-/*** Server Declaration ***/
-
-ST_AMH_Server::ST_AMH_Server (int* argc, char **argv)
- : argc_ (argc)
- , argv_ (argv)
-{
- this->ior_output_file_ = const_cast<char*> ("test.ior");
-}
-
-ST_AMH_Server::~ST_AMH_Server ()
-{
- ACE_TRY_NEW_ENV
- {
- this->root_poa_->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-
-}
-
-int
-ST_AMH_Server::start_orb_and_poa (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_ = CORBA::ORB_init (*(this->argc_),
- this->argv_,
- "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- this->root_poa_ = PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-ST_AMH_Server::register_servant (ST_AMH_Servant *servant)
-{
- ACE_TRY_NEW_ENV
- {
- Test::Roundtrip_var roundtrip =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- (void) this->write_ior_to_file (ior);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-}
-
-void
-ST_AMH_Server::run_event_loop ()
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- ACE_Time_Value period (0, 11000);
- while (1)
- {
- this->orb_->perform_work (&period);
- ACE_TRY_CHECK;
- }
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {}
- ACE_ENDTRY;
-}
-
-int
-ST_AMH_Server::write_ior_to_file (CORBA::String_var ior)
-{
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ST_AMH_Server::ior_output_file_,
- "w");
- if (output_file == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ST_AMH_Server::ior_output_file_));
- return -1;
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ST_AMH_Server amh_server (&argc, argv);
-
- amh_server.start_orb_and_poa ();
-
- ST_AMH_Servant servant (amh_server.orb ());
-
- amh_server.register_servant (&servant);
-
- amh_server.run_event_loop ();
-
- return 0;
-}
diff --git a/TAO/tests/AMH_Oneway/.cvsignore b/TAO/tests/AMH_Oneway/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/AMH_Oneway/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/AMH_Oneway/AMH_Oneway.mpc b/TAO/tests/AMH_Oneway/AMH_Oneway.mpc
deleted file mode 100644
index a0a1fbb883e..00000000000
--- a/TAO/tests/AMH_Oneway/AMH_Oneway.mpc
+++ /dev/null
@@ -1,15 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*client) : taoexe, portableserver, amh {
- source_files {
- client.cpp
- }
-}
-
-project(*server) : taoserver, amh, strategies {
- after += *client
- source_files {
- server.cpp
- }
-}
diff --git a/TAO/tests/AMH_Oneway/Test.idl b/TAO/tests/AMH_Oneway/Test.idl
deleted file mode 100644
index ef304de303a..00000000000
--- a/TAO/tests/AMH_Oneway/Test.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// $Id$
-//
-
-/// A simple module to avoid namespace pollution
-module Test
-{
-
- /// Use a timestamp to measure the roundtrip delay
- typedef unsigned long long Timestamp;
-
- /// Measure roundtrip Delay
- interface Roundtrip
- {
- oneway void test_method (in Timestamp send_time);
- };
-};
diff --git a/TAO/tests/AMH_Oneway/client.cpp b/TAO/tests/AMH_Oneway/client.cpp
deleted file mode 100644
index 381cc74f8b8..00000000000
--- a/TAO/tests/AMH_Oneway/client.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "TestC.h"
-
-const char *ior = "file://test.ior";
-int num_calls = 10;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- num_calls = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- default:
- break;
- }
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip =
- Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (roundtrip.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- // Do a couple of calls on the server. If the sever is trying to
- // do something stupid like sending an exception to us, then it
- // won't be able to handle more than 1 request from us.
- Test::Timestamp time = 10;
- for (int i = 0; i < num_calls; i++)
- {
- roundtrip->test_method (time ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Sent call # %d \n", i));
- }
- orb->destroy();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/AMH_Oneway/run_test.pl b/TAO/tests/AMH_Oneway/run_test.pl
deleted file mode 100755
index e092024d923..00000000000
--- a/TAO/tests/AMH_Oneway/run_test.pl
+++ /dev/null
@@ -1,66 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that tests AMH exceptions
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-# Amount of delay (in seconds) between starting a server and a client.
-$sleeptime = $PerlACE::wait_interval_for_process_creation;
-
-# File used to pass AMH server ior to its clients.
-# This file name is hard-coded in the server.cpp and client.cpp files
-$iorfile = PerlACE::LocalFile("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $AMH = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $AMH = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "");
-
-# Run the AMH server.
-$sv = $AMH->Spawn ();
-
-if ($sv != 0) {
- print STDERR "ERROR: AMH server returned $sv\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
- print STDERR "ERROR: File containing AMH Server ior,".
- " <$iorfile>, cannot be found\n";
- $AMH->Kill ();
- exit 1;
-}
-
-# Run the client.
-$client = $CL->Spawn ();
-
-
-# Clean up.
-
-$client = $CL->WaitKill (30);
-if ($client != 0) {
- print STDERR "ERROR: Client returned $client\n";
- $status = 1;
-}
-
-
-$amhserver= $AMH->WaitKill (60);
-if ($amhserver != 0) {
- print STDERR "ERROR: AMH Server returned $amhserver\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/AMH_Oneway/server.cpp b/TAO/tests/AMH_Oneway/server.cpp
deleted file mode 100644
index 29d8037da8d..00000000000
--- a/TAO/tests/AMH_Oneway/server.cpp
+++ /dev/null
@@ -1,283 +0,0 @@
-
-// $Id$
-
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/Get_Opt.h"
-#include "TestS.h"
-
-int num_calls = 10; // total calls client is going to make
-const int sleep_time = 1; // sleep for 1 sec on each call
-
-// This should equal num_calls within 'sleep * num_calls' seconds
-int calls_received = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- num_calls = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- default:
- break;
- }
- return 0;
-}
-
-
-/***************************/
-/*** Servant Declaration ***/
-
-class ST_AMH_Servant
- : public virtual POA_Test::AMH_Roundtrip
-{
-public:
- ST_AMH_Servant (CORBA::ORB_ptr orb);
-
- void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- CORBA::ORB_var orb_;
-};
-
-
-/***************************/
-/*** Servant Definition ***/
-
-ST_AMH_Servant::ST_AMH_Servant (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_OS::sleep (1);
- ACE_DEBUG ((LM_DEBUG, "Recieved Timestamp # %d \n", calls_received));
- calls_received++;
-
- ACE_UNUSED_ARG (send_time);
- ACE_UNUSED_ARG (_tao_rh);
-
- // When _tao_rh destructor is called, it shouldn't send anything to
- // the client as well
-}
-
-
-/*** Server Declaration ***/
-
-/**
- Class that performs all 'dirty' initialisation work that is common to
- all the AMH servers and 'hides' all the common ORB functions.
- */
-class ST_AMH_Server
-{
-public:
- ST_AMH_Server (int *argc, char **argv);
- virtual ~ST_AMH_Server ();
-
- /// ORB inititalisation stuff
- int start_orb_and_poa (void);
-
- /// register the servant with the poa
- virtual void register_servant (ST_AMH_Servant *servant);
-
- /// orb-perform_work () abstraction
- virtual void run_event_loop ();
-
- /// do post-run cleanup. This is necessary here because the servant
- /// supplied to regiser_servant happens to be allocated on the
- /// stack, and done after the instance of ST_AMH_Server is
- /// created. This leads to the servant being destroyed before this
- /// class's destructor. And alternative solution would be allocate
- /// the servant on the stack and rely on the reference count to
- /// delete it.
- virtual void cleanup ();
-
-public:
- /// Accesor method (for servants) to the initialised ORB
- CORBA::ORB_ptr orb () { return this->orb_.in (); }
-
-protected:
- int *argc_;
- char **argv_;
- char *ior_output_file_;
- CORBA::ORB_var orb_;
- PortableServer::POA_var root_poa_;
-
-private:
- /// Write servant IOR to file specified with the '-o' option
- int write_ior_to_file (CORBA::String_var ior);
-};
-
-
-
-/*** Server Declaration ***/
-
-ST_AMH_Server::ST_AMH_Server (int* argc, char **argv)
- : argc_ (argc)
- , argv_ (argv)
-{
- this->ior_output_file_ = const_cast<char*> ("test.ior");
-}
-
-ST_AMH_Server::~ST_AMH_Server ()
-{
-}
-
-void
-ST_AMH_Server::cleanup ()
-{
- ACE_TRY_NEW_ENV
- {
- this->root_poa_->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-
-}
-
-int
-ST_AMH_Server::start_orb_and_poa (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_ = CORBA::ORB_init (*(this->argc_),
- this->argv_,
- "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- this->root_poa_ = PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-ST_AMH_Server::register_servant (ST_AMH_Servant *servant)
-{
- ACE_TRY_NEW_ENV
- {
- Test::Roundtrip_var roundtrip =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- (void) this->write_ior_to_file (ior);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-}
-
-void
-ST_AMH_Server::run_event_loop ()
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- ACE_Time_Value period (0, 11000);
- while (1)
- {
- this->orb_->perform_work (&period);
- ACE_TRY_CHECK;
-
- // when all calls from client have been recieved, exit
- if (calls_received == num_calls )
- return;
- }
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {}
- ACE_ENDTRY;
-}
-
-int
-ST_AMH_Server::write_ior_to_file (CORBA::String_var ior)
-{
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ST_AMH_Server::ior_output_file_,
- "w");
- if (output_file == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ST_AMH_Server::ior_output_file_));
- return -1;
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc, argv) != 0)
- return 1;
-
- ST_AMH_Server amh_server (&argc, argv);
-
- amh_server.start_orb_and_poa ();
-
- ST_AMH_Servant servant (amh_server.orb ());
-
- amh_server.register_servant (&servant);
-
- amh_server.run_event_loop ();
-
- amh_server.cleanup ();
-
- return 0;
-}
diff --git a/TAO/tests/AMI/.cvsignore b/TAO/tests/AMI/.cvsignore
deleted file mode 100644
index 92a316986cf..00000000000
--- a/TAO/tests/AMI/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-client
-server
-simple_client
diff --git a/TAO/tests/AMI/AMI.mpc b/TAO/tests/AMI/AMI.mpc
deleted file mode 100644
index 894442827ba..00000000000
--- a/TAO/tests/AMI/AMI.mpc
+++ /dev/null
@@ -1,23 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging, ami {
- Source_Files {
- ami_test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): messaging, taoexe, portableserver, ami {
- after += *Server
- Source_Files {
- client.cpp
- }
-}
-
-project(*Simple Client): messaging, taoexe, portableserver, ami {
- after += *Server
- Source_Files {
- simple_client.cpp
- }
-}
diff --git a/TAO/tests/AMI/README b/TAO/tests/AMI/README
deleted file mode 100644
index 04117a71d7d..00000000000
--- a/TAO/tests/AMI/README
+++ /dev/null
@@ -1,39 +0,0 @@
-# $Id$
-
-Description:
-This is a simple test for AMI callback model.
-
-Note:
-Use TAO_HAS_CORBA_MESSAGING
-and TAO_HAS_AMI_CALLBACK
-to compile TAO. This enables the AMI code in it.
-
-Use -GC on the TAO IDL compiler to generate code for AMI callbacks.
-
-Usage:
-=====
-$ server -o ior
-$ simple_client -ORBSvcConf muxed.conf -k file://ior -i 10
-
-simple-client:
-=============
-
-$ simple_client -k file://test_ior [-i <niterations] [-x] [-d] \
- -ORBSvcConf {muxed.conf,
- exclusive.conf}
-
--d Enable debug messages.
--i Number of iterations.
--k IOR.
--x Call shutdown method.
-
-Issues <i> number of asynchronous requests. Then it issues a
-synchronous request, which collects the replies.
-
-If you choose Muxed Transport configuration, then the synchronous
-request will collect all the asynchronous replies also, since the
-replies will arrive in order. In the Exclusive Transport, however,
-the synchronous request might not collect all the AMI replies.
-Instead, it might return as soon as its reply arrives.
-
-
diff --git a/TAO/tests/AMI/ami_test.idl b/TAO/tests/AMI/ami_test.idl
deleted file mode 100644
index ffdc66d63d5..00000000000
--- a/TAO/tests/AMI/ami_test.idl
+++ /dev/null
@@ -1,39 +0,0 @@
-
-//=============================================================================
-/**
- * @file ami_test.idl
- *
- * $Id$
- *
- * IDL description of the AMI Test interface
- *
- *
- * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-
-module A
- {
- exception DidTheRightThing {
- long id;
- string whatDidTheRightThing;
- };
-
- interface AMI_Test
- {
- long foo (out long out_l,
- in long in_l,
- in string in_str)
- raises (DidTheRightThing);
-
- attribute long yadda;
-
- oneway void shutdown ();
-
- void inout_arg_test (inout string str);
- };
-
- };
diff --git a/TAO/tests/AMI/ami_test_i.cpp b/TAO/tests/AMI/ami_test_i.cpp
deleted file mode 100644
index 313677c07a1..00000000000
--- a/TAO/tests/AMI/ami_test_i.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-
-//=============================================================================
-/**
- * @file ami_test_i.cpp
- *
- * $Id$
- *
- * Implementation of the AMI Test interface.
- *
- *
- * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "ami_test_i.h"
-#include "tao/debug.h"
-
-ACE_RCSID(AMI, ami_test_i, "$Id$")
-
-AMI_Test_i::AMI_Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- number_ ((CORBA::Long) 931232),
- yadda_ ((CORBA::Long) 140474)
-{
-}
-
-CORBA::Long
-AMI_Test_i::foo (CORBA::Long_out out_l,
- CORBA::Long in_l,
- const char* in_str
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- A::DidTheRightThing))
-{
- out_l = 931233;
-
- //if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "%N:%l:(%P:%t):AMI_Test_i::foo: %d %s\n",
- in_l,
- in_str));
-
- if (in_l == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Throwing Exception: A::DidTheRightThing\n"));
- ACE_THROW_RETURN (A::DidTheRightThing(), 0);
- }
-
- return 931234;
-}
-
-
-
-void
-AMI_Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
-
-
-CORBA::Long
-AMI_Test_i::yadda (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "%N:%l:(%P:%t):AMI_Test_i::(get_)yadda\n"));
- return yadda_;
-}
-
-
-void
-AMI_Test_i::yadda (CORBA::Long yadda
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "%N:%l:(%P:%t):AMI_Test_i::(set_)yadda\n"));
- yadda_ = yadda;
-}
-
-void
-AMI_Test_i::inout_arg_test (char *&
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No action, this operation is to test code generation for INOUT
- // args in AMI operations.
-}
-
diff --git a/TAO/tests/AMI/ami_test_i.h b/TAO/tests/AMI/ami_test_i.h
deleted file mode 100644
index 66ce22677fe..00000000000
--- a/TAO/tests/AMI/ami_test_i.h
+++ /dev/null
@@ -1,62 +0,0 @@
-
-//=============================================================================
-/**
- * @file ami_test_i.h
- *
- * $Id$
- *
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#ifndef TAO_AMI_TEST_I_H
-#define TAO_AMI_TEST_I_H
-
-#include "ami_testS.h"
-
-/**
- * @class AMI_Test_i
- *
- * @brief AMI Test implementation
- *
- * Implements the AMI_Test interface in test.idl
- */
-class AMI_Test_i : public POA_A::AMI_Test
-{
-public:
- /// ctor
- AMI_Test_i (CORBA::ORB_ptr orb);
-
- // The AMI_Test methods.
- CORBA::Long foo (CORBA::Long_out out_l,
- CORBA::Long in_l,
- const char* in_str
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- A::DidTheRightThing));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::Long yadda (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void yadda (CORBA::Long yadda
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void inout_arg_test (char *& str
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
- CORBA::Long number_;
-
- CORBA::Long yadda_;
-};
-
-
-#endif /* TAO_AMI_TEST_I_H */
diff --git a/TAO/tests/AMI/client.cpp b/TAO/tests/AMI/client.cpp
deleted file mode 100644
index dfebe21b163..00000000000
--- a/TAO/tests/AMI/client.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-
-//=============================================================================
-/**
- * @file client.cpp
- *
- * $Id$
- *
- * A client which uses the AMI callback model.
- *
- *
- * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ami_testS.h"
-
-ACE_RCSID (AMI,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-int nthreads = 5;
-int niterations = 5;
-int debug = 0;
-int number_of_replies = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "dk:n:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd':
- debug = 1;
- break;
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-d "
- "-k <ior> "
- "-n <nthreads> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-/**
- * @class Client
- *
- * @brief Run the client thread
- *
- * Use the ACE_Task_Base class to run the client threads.
- */
-class Client : public ACE_Task_Base
-{
-public:
- /// ctor
- Client (A::AMI_Test_ptr server, int niterations);
-
- /// The thread entry point.
- virtual int svc (void);
-
- // private:
- /// Var for the AMI_Test object.
- A::AMI_Test_var ami_test_var_;
-
- /// The number of iterations on each client thread.
- int niterations_;
-
- /// Var for AMI_AMI_Test_ReplyHandler object.
- A::AMI_AMI_TestHandler_var the_handler_var_;
-};
-
-class Handler : public POA_A::AMI_AMI_TestHandler
-{
-public:
- Handler (void) {};
-
- void foo (CORBA::Long result,
- CORBA::Long out_l
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P | %t) : Callback method called: result <%d>, out_arg <%d>\n",
- result,
- out_l));
- }
-
- --number_of_replies;
- };
-
- void foo_excep (::Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
-
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <foo_excep> called: \n"));
- ACE_TRY
- {
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- }
- ACE_ENDTRY;
- ACE_CHECK;
- };
-
- void get_yadda (CORBA::Long result
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <get_yadda> called: result <%d>\n",
- result));
- };
-
- void get_yadda_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <get_yadda_excep> called: \n"));
- };
-
- void set_yadda (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <set_yadda> called: \n"));
- };
-
- void set_yadda_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <set_yadda_excep> called: \n"));
- };
- ~Handler (void) {};
-
- void inout_arg_test (
- const char *
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <set_yadda_excep> called: \n"));
- }
-
- void inout_arg_test_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- }
-};
-
-// ReplyHandler.
-Handler handler;
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- A::AMI_Test_var server =
- A::AMI_Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- // Activate POA to handle the call back.
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Let the client perform the test in a separate thread
-
- Client client (server.in (), niterations);
- if (client.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- // Main thread collects replies. It needs to collect
- // <nthreads*niterations> replies.
- number_of_replies = nthreads *niterations;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) : Entering perform_work loop to receive <%d> replies\n",
- number_of_replies));
- }
-
- // ORB loop.
-
- while (number_of_replies > 0)
- {
- CORBA::Boolean pending =
- orb->work_pending(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (pending)
- {
- orb->perform_work(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) : Exited perform_work loop Received <%d> replies\n",
- (nthreads*niterations) - number_of_replies));
- }
-
-
- client.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "threads finished\n"));
-
- //client.ami_test_var_->shutdown ();
-
- root_poa->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Client::Client (A::AMI_Test_ptr server,
- int niterations)
- : ami_test_var_ (A::AMI_Test::_duplicate (server)),
- niterations_ (niterations)
-{
- the_handler_var_ = handler._this (/* ACE_ENV_SINGLE_ARG_PARAMETER */);
-}
-
-int
-Client::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Long number = 931232;
-
- for (int i = 0; i < this->niterations_; ++i)
- {
- ami_test_var_->sendc_foo (the_handler_var_.in (),
- number,
- "Let's talk AMI."
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P | %t):<%d> Asynchronous methods issued\n",
- niterations));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_Client: exception raised");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/AMI/exclusive.conf b/TAO/tests/AMI/exclusive.conf
deleted file mode 100644
index b269154099f..00000000000
--- a/TAO/tests/AMI/exclusive.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-
-static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBclientconnectionhandler ST"
diff --git a/TAO/tests/AMI/exclusive.conf.xml b/TAO/tests/AMI/exclusive.conf.xml
deleted file mode 100644
index 6724ae56996..00000000000
--- a/TAO/tests/AMI/exclusive.conf.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/AMI/exclusive.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBclientconnectionhandler ST"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/AMI/muxed.conf b/TAO/tests/AMI/muxed.conf
deleted file mode 100644
index a7f2f5f608a..00000000000
--- a/TAO/tests/AMI/muxed.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-
-static Client_Strategy_Factory "-ORBTransportMuxStrategy MUXED -ORBProfileLock null -ORBClientConnectionHandler ST"
diff --git a/TAO/tests/AMI/muxed.conf.xml b/TAO/tests/AMI/muxed.conf.xml
deleted file mode 100644
index 812cb7376db..00000000000
--- a/TAO/tests/AMI/muxed.conf.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/AMI/muxed.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy MUXED -ORBProfileLock null -ORBClientConnectionHandler ST"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/AMI/run_test.pl b/TAO/tests/AMI/run_test.pl
deleted file mode 100755
index 8b43bbe69a4..00000000000
--- a/TAO/tests/AMI/run_test.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$client_conf = PerlACE::LocalFile ("muxed$PerlACE::svcconf_ext");
-
-$debug_level = '0';
-$iterations = '1';
-
-foreach $i (@ARGV) {
- if ($i eq '-mux') {
- $client_conf = PerlACE::LocalFile ("muxed$PerlACE::svcconf_ext");
- }
- elsif ($i eq '-debug') {
- $debug_level = '1';
- }
- elsif ($i eq '-exclusive') {
- $client_conf = PerlACE::LocalFile ("exclusive$PerlACE::svcconf_ext");
- }
-}
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBdebuglevel $debug_level -d -o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBdebuglevel $debug_level -d -o $iorfile");
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL = new PerlACE::Process ("simple_client",
- "-ORBsvcconf $client_conf "
- . "-ORBdebuglevel $debug_level"
- . " -k file://$iorfile "
- . " -i $iterations -d");
-
-$client = $CL->SpawnWaitKill (60);
-
-$CL2 = new PerlACE::Process ("simple_client",
- "-ORBsvcconf $client_conf"
- . " -ORBCollocation no"
- . " -ORBdebuglevel $debug_level"
- . " -k file://$iorfile "
- . " -i $iterations -x -d");
-$client2 = $CL2->SpawnWaitKill (60);
-
-$server = $SV->WaitKill (10);
-
-unlink $iorfile;
-
-if ($server != 0 || $client != 0 || $client2 != 0) {
- exit 1;
-}
-
-exit 0;
-
diff --git a/TAO/tests/AMI/server.conf b/TAO/tests/AMI/server.conf
deleted file mode 100644
index faf9c6c874b..00000000000
--- a/TAO/tests/AMI/server.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Server_Strategy_Factory "-ORBconcurrency thread-per-connection"
diff --git a/TAO/tests/AMI/server.conf.xml b/TAO/tests/AMI/server.conf.xml
deleted file mode 100644
index 8a4700799b4..00000000000
--- a/TAO/tests/AMI/server.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/AMI/server.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Server_Strategy_Factory" params="-ORBconcurrency thread-per-connection"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/AMI/server.cpp b/TAO/tests/AMI/server.cpp
deleted file mode 100644
index b2868cd1e58..00000000000
--- a/TAO/tests/AMI/server.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-
-//=============================================================================
-/**
- * @file server.cpp
- *
- * $Id$
- *
- * Implementation of the server.
- *
- *
- * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "ami_test_i.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(AMI, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'd':
- TAO_debug_level++;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- AMI_Test_i ami_test_i (orb.in ());
-
- A::AMI_Test_var ami_test_var =
- ami_test_i._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (ami_test_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/AMI/simple_client.cpp b/TAO/tests/AMI/simple_client.cpp
deleted file mode 100644
index 2a22d5164ed..00000000000
--- a/TAO/tests/AMI/simple_client.cpp
+++ /dev/null
@@ -1,325 +0,0 @@
-
-//=============================================================================
-/**
- * @file simple_client.cpp
- *
- * $Id$
- *
- * A very simple client which uses the AMI callback model.
- *
- *
- * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-#include "ami_testS.h"
-
-ACE_RCSID (AMI,
- simple_client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 5;
-int shutdown_flag = 0;
-int debug = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "dk:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd':
- debug = 1;
- break;
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'x':
- shutdown_flag = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "-x "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Handler : public POA_A::AMI_AMI_TestHandler
-{
-public:
- /// Constructor.
- Handler (void) {};
-
- /// Destructor.
- ~Handler (void) {};
-
- void foo (CORBA::Long ami_return_val,
- CORBA::Long out_l
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <foo> called: result <%d>, out_arg <%d>\n",
- ami_return_val,
- out_l));
- }
- };
-
- void foo_excep (::Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
-
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <foo_excep> called: \n"
- "Testing proper exception handling ...\n"));
- ACE_TRY
- {
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (A::DidTheRightThing, ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "... exception received successfully\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "ERROR");
- ACE_ERROR ((LM_ERROR,
- "... caught the wrong exception -> ERROR\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
- };
-
-
- void get_yadda (CORBA::Long result
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <get_yadda> called: result <%d>\n",
- result));
- };
-
- void get_yadda_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <get_yadda_excep> called: \n"));
- };
-
- void set_yadda (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <set_yadda> called: \n"));
- };
-
- void set_yadda_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <set_yadda_excep> called: \n"));
- };
-
- void inout_arg_test (
- const char *
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <set_yadda_excep> called: \n"));
- }
-
- void inout_arg_test_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- }
-};
-
-int
-main (int argc, char *argv[])
-{
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object_var =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa_var =
- PortableServer::POA::_narrow (object_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager_var =
- poa_var->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager_var->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // We reuse the object_var smart pointer!
- object_var = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- A::AMI_Test_var ami_test_var =
- A::AMI_Test::_narrow (object_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ami_test_var.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- // Instantiate the ReplyHandler and register that with the POA.
- Handler handler;
- A::AMI_AMI_TestHandler_var the_handler_var =
- handler._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Try out sending asynchronous messages without a reply handler
- // registered. Things fail if we get an exception.
-
- ami_test_var->sendc_foo (A::AMI_AMI_TestHandler::_nil (),
- 0,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Trigger the DidTheRightThing exception on the server side
- // by sending 0 to it.
- ACE_DEBUG ((LM_DEBUG,
- "Sending asynch message\n"));
-
- ami_test_var->sendc_foo (the_handler_var.in (),
- 0,
- "Let's talk AMI."
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Long l = 931247;
-
- for (ssize_t ni = 0; ni < niterations; ni++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Sending asynch message: %d\n",
- ni));
-
- ami_test_var->sendc_foo (the_handler_var.in (),
- l,
- "Let's talk AMI."
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Begin test of attributes
- ami_test_var->sendc_get_yadda (the_handler_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ami_test_var->sendc_set_yadda (the_handler_var.in (),
- 4711
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ami_test_var->sendc_get_yadda (the_handler_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // End test of attributes
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "<%d> Asynchronous methods issued\n",
- niterations));
- }
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Issuing a synchronous method to collect the AMI replies\n"));
- }
-
- //while (orb->work_pending())
- // orb->perform_work ();
-
-
- CORBA::Long number = ami_test_var->foo (l,
- l,
- "Let's talk SMI."
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Received the following number: %d\n",
- number));
- }
-
- if (shutdown_flag)
- {
- ami_test_var->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_var->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/AMI_Buffering/.cvsignore b/TAO/tests/AMI_Buffering/.cvsignore
deleted file mode 100644
index 5c0ae7e0d7e..00000000000
--- a/TAO/tests/AMI_Buffering/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-admin
-client
-server
diff --git a/TAO/tests/AMI_Buffering/AMI_Buffering.cpp b/TAO/tests/AMI_Buffering/AMI_Buffering.cpp
deleted file mode 100644
index aaaaf5b0cd2..00000000000
--- a/TAO/tests/AMI_Buffering/AMI_Buffering.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// $Id$
-//
-#include "AMI_Buffering.h"
-
-ACE_RCSID(AMI_Buffering, AMI_Buffering, "$Id$")
-
-AMI_Buffering::AMI_Buffering (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_Admin_ptr admin)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- admin_ (Test::AMI_Buffering_Admin::_duplicate (admin)),
- nest_ (0),
- max_nest_ (0),
- must_shutdown_ (false)
-{
-}
-
-AMI_Buffering::Nest_Guard::Nest_Guard (AMI_Buffering &a)
- :target_(a)
-{
- ++target_.nest_;
- if (target_.nest_ > target_.max_nest_)
- target_.max_nest_ = target_.nest_;
-}
-
-AMI_Buffering::Nest_Guard::~Nest_Guard (void)
-{
- --target_.nest_;
-}
-
-void
-AMI_Buffering::receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- AMI_Buffering::Nest_Guard ng(*this);
- this->admin_->request_received (the_payload.length () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG,"(%P|%t) DEBUG: AMI_Buffering::receive_data"));
- }
- ACE_ENDTRY;
-
- this->try_shutdown(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-AMI_Buffering::flush (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-AMI_Buffering::sync (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->admin_->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-AMI_Buffering::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->must_shutdown_ = true;
- this->try_shutdown(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-AMI_Buffering::try_shutdown(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (!this->must_shutdown_ || this->nest_ > 0)
- return;
- if (this->max_nest_ > 1)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) max nesting level: %d\n", max_nest_));
- this->admin_->shutdown(ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/AMI_Buffering/AMI_Buffering.h b/TAO/tests/AMI_Buffering/AMI_Buffering.h
deleted file mode 100644
index 57b8390347c..00000000000
--- a/TAO/tests/AMI_Buffering/AMI_Buffering.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef AMI_BUFFERING_H
-#define AMI_BUFFERING_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::AMI_Buffering interface
-class AMI_Buffering
- : public virtual POA_Test::AMI_Buffering
-{
-public:
- /// Constructor
- AMI_Buffering (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_Admin_ptr admin);
-
- // = The skeleton methods
- virtual void receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void sync (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// internal implementation of shutdown. This
- void try_shutdown (ACE_ENV_SINGLE_ARG_DECL);
-
- class Nest_Guard
- {
- public:
- Nest_Guard (AMI_Buffering &);
- ~Nest_Guard (void);
- private:
- AMI_Buffering &target_;
- };
-
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-
- /// Report request progress to this interface
- Test::AMI_Buffering_Admin_var admin_;
-
- /// nesting depth count for receive_data processing
- int nest_;
-
- /// maximum nesting depth reached during run
- int max_nest_;
-
- /// flag indicating that a shutdown is required as soon
- /// as the nest count reaches 0.
- bool must_shutdown_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* AMI_BUFFERING_H */
diff --git a/TAO/tests/AMI_Buffering/AMI_Buffering.mpc b/TAO/tests/AMI_Buffering/AMI_Buffering.mpc
deleted file mode 100644
index a4156b9a83f..00000000000
--- a/TAO/tests/AMI_Buffering/AMI_Buffering.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, ami {
- Source_Files {
- AMI_Buffering.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, ami {
- after += *Server
- exename = client
- Source_Files {
- Client_Task.cpp
- Reply_Handler.cpp
- client.cpp
- }
-}
-
-project(*Admin): taoserver, ami {
- after += *Client
- exename = admin
- Source_Files {
- AMI_Buffering_Admin.cpp
- admin.cpp
- }
-}
diff --git a/TAO/tests/AMI_Buffering/AMI_Buffering_Admin.cpp b/TAO/tests/AMI_Buffering/AMI_Buffering_Admin.cpp
deleted file mode 100644
index d196dc0674d..00000000000
--- a/TAO/tests/AMI_Buffering/AMI_Buffering_Admin.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// $Id$
-//
-#include "AMI_Buffering_Admin.h"
-
-ACE_RCSID(AMI_Buffering, AMI_Buffering_Admin, "$Id$")
-
-AMI_Buffering_Admin::AMI_Buffering_Admin (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , request_count_ (0)
- , bytes_received_count_ (0)
-{
-}
-
-CORBA::ULong
-AMI_Buffering_Admin::request_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->request_count_;
-}
-
-CORBA::ULong
-AMI_Buffering_Admin::bytes_received_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->bytes_received_count_;
-}
-
-void
-AMI_Buffering_Admin::request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->request_count_++;
- this->bytes_received_count_ += payload_length;
-}
-
-void
-AMI_Buffering_Admin::flush (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-AMI_Buffering_Admin::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/AMI_Buffering/AMI_Buffering_Admin.h b/TAO/tests/AMI_Buffering/AMI_Buffering_Admin.h
deleted file mode 100644
index 904b4253ec5..00000000000
--- a/TAO/tests/AMI_Buffering/AMI_Buffering_Admin.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef AMI_BUFFERING_ADMIN_H
-#define AMI_BUFFERING_ADMIN_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::AMI_Buffering_Admin interface
-class AMI_Buffering_Admin
- : public virtual POA_Test::AMI_Buffering_Admin
-{
-public:
- /// Constructor
- AMI_Buffering_Admin (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual CORBA::ULong request_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong bytes_received_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-
- /// Keep track of the number of requests received
- CORBA::ULong request_count_;
-
- /// Keep track of the number of requests received
- CORBA::ULong bytes_received_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* AMI_BUFFERING_H */
diff --git a/TAO/tests/AMI_Buffering/Client_Task.cpp b/TAO/tests/AMI_Buffering/Client_Task.cpp
deleted file mode 100644
index 6f49c529d36..00000000000
--- a/TAO/tests/AMI_Buffering/Client_Task.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(AMI_Buffering, Client_Task, "$Id$")
-
-Client_Task::Client_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , terminate_loop_ (0)
-{
-}
-
-void
-Client_Task::terminate_loop (void)
-{
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- this->terminate_loop_ = 1;
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- while (1)
- {
- // run the even loop for 1 second...
- ACE_Time_Value tv (1, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
- if (this->terminate_loop_ != 0)
- break;
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/AMI_Buffering/Client_Task.h b/TAO/tests/AMI_Buffering/Client_Task.h
deleted file mode 100644
index 31f6e44ee7e..00000000000
--- a/TAO/tests/AMI_Buffering/Client_Task.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef AMI_BUFFERING_CLIENT_TASK_H
-#define AMI_BUFFERING_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (CORBA::ORB_ptr orb);
-
- /// Terminate the loop
- void terminate_loop (void);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-
- /// A mutex, synchronize access to the termination flag
- TAO_SYNCH_MUTEX mutex_;
-
- /// Termination flag, set to 1 when the client wants this task to
- /// exit
- int terminate_loop_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* AMI_BUFFERING_CLIENT_TASK_H */
diff --git a/TAO/tests/AMI_Buffering/README b/TAO/tests/AMI_Buffering/README
deleted file mode 100644
index 7ab74c58127..00000000000
--- a/TAO/tests/AMI_Buffering/README
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
-
-@page AMI_Buffering Test README File
-
- A regression test for AMI buffering. The test verifies
-that the TAO::BufferingConstraint policies are respected by the
-ORB. Three separate tests are possible:
-
-- TAO::BUFFER_MESSAGE_COUNT: The buffer should not be flushed until
- enough messages are in the queue.
-
-- TAO::BUFFER_TIMEOUT: The buffer should not be flushed unless the
- specified interval has expired.
-
-- TAO::BUFFER_MESSAGE_BYTES: The buffer should not be flushed until
- enough bytes are in the queue.
-
- To run the test use run_test.pl script:
-
-$ ./run_test.pl
-
- the nightly regression builds impose severe constraints on the
-maximum time allowed for a single test. Three separate scripts are
-used to stay within those bounds:
-
-$ ./run_message_count.pl
-$ ./run_timeout.pl
-$ ./run_message_bytes.pl
-
- each script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/AMI_Buffering/Reply_Handler.cpp b/TAO/tests/AMI_Buffering/Reply_Handler.cpp
deleted file mode 100644
index 7c8a210d9d3..00000000000
--- a/TAO/tests/AMI_Buffering/Reply_Handler.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// $Id$
-//
-#include "Reply_Handler.h"
-
-ACE_RCSID(AMI_Buffering, Reply_Handler, "$Id$")
-
-Reply_Handler::Reply_Handler (void)
-{
-}
-
-void
-Reply_Handler::receive_data (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Reply_Handler::receive_data_excep (::Messaging::ExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "receive_data: ");
- }
- ACE_ENDTRY;
-}
-
-void
-Reply_Handler::sync (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Reply_Handler::sync_excep (::Messaging::ExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "sync: ");
- }
- ACE_ENDTRY;
-}
-
-void
-Reply_Handler::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Reply_Handler::shutdown_excep (::Messaging::ExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "shutdown: ");
- }
- ACE_ENDTRY;
-}
diff --git a/TAO/tests/AMI_Buffering/Reply_Handler.h b/TAO/tests/AMI_Buffering/Reply_Handler.h
deleted file mode 100644
index 9d73cbcc70d..00000000000
--- a/TAO/tests/AMI_Buffering/Reply_Handler.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef REPLY_HANDLER_H
-#define REPLY_HANDLER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the AMI_AMI_BufferingHandler interface
-class Reply_Handler
- : public virtual POA_Test::AMI_AMI_BufferingHandler
-{
-public:
- /// Constructor
- Reply_Handler (void);
-
- // = The skeleton methods
- virtual void receive_data (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void receive_data_excep (::Messaging::ExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void sync (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void sync_excep (::Messaging::ExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown_excep (::Messaging::ExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#include /**/ "ace/post.h"
-#endif /* REPLY_HANDLER_H */
diff --git a/TAO/tests/AMI_Buffering/Test.idl b/TAO/tests/AMI_Buffering/Test.idl
deleted file mode 100644
index 5c757ea0a1b..00000000000
--- a/TAO/tests/AMI_Buffering/Test.idl
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A sequence of octets to generate bigger messages
- typedef sequence<octet> Payload;
-
- /// Clients use this interface to send oneway requests
- interface AMI_Buffering
- {
- /// A simple operation to test the number of requests received.
- void receive_data (in Payload the_payload);
-
- /// An empty operation to force a flush in the ORB queues
- oneway void flush ();
-
- /// Synchronize the state with the Admin object.
- /**
- * Once flush() has been invoked (with the correct buffering
- * policies) we must use sync() to ensure that both the main
- * server and the Admin servers are in sync.
- */
- void sync ();
-
- /// Shutdown the server
- void shutdown ();
- };
-
- /// Clients use this interface to query the number of oneway
- /// requests received.
- interface AMI_Buffering_Admin
- {
- /// Number of oneway requests received
- unsigned long request_count ();
-
- /// Number of bytes received
- unsigned long bytes_received_count ();
-
- /// The Oneway_Buffering interface uses this method to report any
- /// request received.
- void request_received (in unsigned long payload_length);
-
- /// An empty operation to force a flush in the ORB queues
- void flush ();
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- void shutdown ();
- };
-};
diff --git a/TAO/tests/AMI_Buffering/admin.cpp b/TAO/tests/AMI_Buffering/admin.cpp
deleted file mode 100644
index 9c883a1d3f5..00000000000
--- a/TAO/tests/AMI_Buffering/admin.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "AMI_Buffering_Admin.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(AMI_Buffering, admin, "$Id$")
-
-const char *ior_output_file = "admin.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- AMI_Buffering_Admin *AMI_buffering_admin_impl;
- ACE_NEW_RETURN (AMI_buffering_admin_impl,
- AMI_Buffering_Admin (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(AMI_buffering_admin_impl);
-
- Test::AMI_Buffering_Admin_var AMI_buffering_admin =
- AMI_buffering_admin_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (AMI_buffering_admin.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) admin - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in admin:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/AMI_Buffering/client.cpp b/TAO/tests/AMI_Buffering/client.cpp
deleted file mode 100644
index eb5819492ca..00000000000
--- a/TAO/tests/AMI_Buffering/client.cpp
+++ /dev/null
@@ -1,890 +0,0 @@
-// $Id$
-
-#include "Reply_Handler.h"
-#include "Client_Task.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/TAOC.h"
-#include "tao/AnyTypeCode/TAOA.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(AMI_Buffering, client, "$Id$")
-
-const char *server_ior = "file://server.ior";
-const char *admin_ior = "file://admin.ior";
-int iterations = 200;
-
-int run_message_count_test = 0;
-int run_timeout_test = 0;
-int run_timeout_reactive_test = 0;
-int run_buffer_size_test = 0;
-
-const int PAYLOAD_LENGTH = 1024;
-const int BUFFERED_MESSAGES_COUNT = 50;
-const unsigned int TIMEOUT_MILLISECONDS = 25;
-const int BUFFER_SIZE = 64 * PAYLOAD_LENGTH;
-
-/// Allow a larger timeout to occur due to scheduler differences
-const unsigned int TIMEOUT_TOLERANCE = 20 * TIMEOUT_MILLISECONDS;
-
-/// Check that no more than 10% of the messages are not sent.
-const double LIVENESS_TOLERANCE = 0.9;
-
-/// Limit the depth of the liveness test, avoid blowing up the stack
-/// on the server
-const int LIVENESS_MAX_DEPTH = 256;
-
-/// Factor in GIOP overhead in the buffer size test
-const double GIOP_OVERHEAD = 0.9;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:a:i:ctbr");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
-
- case 'a':
- admin_ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'c':
- run_message_count_test = 1;
- break;
-
- case 't':
- run_timeout_test = 1;
- break;
-
- case 'b':
- run_buffer_size_test = 1;
- break;
-
- case 'r':
- run_timeout_reactive_test = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <server_ior> "
- "-a <admin_ior> "
- "-i <iterations> "
- "<-c|-t|-b|-r> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-run_message_count (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL);
-int
-run_timeout (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_timeout_reactive (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr oneway_buffering,
- Test::AMI_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_buffer_size (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-main (int argc, char *argv[])
-{
- int test_failed = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::AMI_Buffering_var ami_buffering =
- Test::AMI_Buffering::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ami_buffering.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::AMI_Buffering reference <%s>\n",
- server_ior),
- 1);
- }
-
- tmp =
- orb->string_to_object(admin_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::AMI_Buffering_Admin_var ami_buffering_admin =
- Test::AMI_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ami_buffering_admin.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::AMI_Buffering_Admin reference <%s>\n",
- admin_ior),
- 1);
- }
-
- Client_Task client_task (orb.in ());
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- if (run_message_count_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running message count flushing test\n"));
- test_failed =
- run_message_count (orb.in (),
- ami_buffering.in (),
- ami_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_timeout_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running timeout flushing test\n"));
- test_failed =
- run_timeout (orb.in (),
- ami_buffering.in (),
- ami_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_timeout_reactive_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running timeout (reactive) flushing test\n"));
- test_failed =
- run_timeout_reactive (orb.in (),
- ami_buffering.in (),
- ami_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_buffer_size_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running buffer size flushing test\n"));
- test_failed =
- run_buffer_size (orb.in (),
- ami_buffering.in (),
- ami_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: No test was configured\n"));
- }
-
- client_task.terminate_loop ();
-
- client_task.thr_mgr ()->wait ();
-
- ami_buffering->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return test_failed;
-}
-
-int
-configure_policies (CORBA::ORB_ptr orb,
- const TAO::BufferingConstraint &buffering_constraint,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_out flusher
- ACE_ENV_ARG_DECL)
-{
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_NONE;
-
- CORBA::Any buffering_as_any;
- buffering_as_any <<= buffering_constraint;
-
- CORBA::PolicyList policies (2); policies.length (2);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- policies[1] =
- orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO::BufferingConstraint flush_constraint;
- flush_constraint.mode = TAO::BUFFER_FLUSH;
- flush_constraint.message_count = 0;
- flush_constraint.message_bytes = 0;
- flush_constraint.timeout = 0;
-
- buffering_as_any <<= flush_constraint;
- policies.length (1);
- policies[0] =
- orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- object =
- ami_buffering->_set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- flusher =
- Test::AMI_Buffering::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-void
-sync_server (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr flusher
- ACE_ENV_ARG_DECL)
-{
- // Get back in sync with the server...
- flusher->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- flusher->sync (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Drain responses from the queue
- ACE_Time_Value tv (0, 100000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-run_liveness_test (CORBA::ORB_ptr orb,
- Test::AMI_AMI_BufferingHandler_ptr reply_handler,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_ptr flusher,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG, ".... checking for liveness\n"));
- int test_failed = 0;
-
- // Get back in sync with the server...
- sync_server (orb, flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong send_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int liveness_test_iterations = int(send_count);
- ACE_DEBUG ((LM_DEBUG, " liveness_test_iterations = %d\n",
- liveness_test_iterations));
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- int depth = 0;
- for (int i = 0; i != liveness_test_iterations; ++i)
- {
- ami_buffering->sendc_receive_data (reply_handler,
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Once the system has sent enough messages we don't
- // expect it to fall too far behind, i.e. at least 90% of the
- // messages should be delivered....
- CORBA::ULong expected =
- CORBA::ULong (LIVENESS_TOLERANCE * send_count);
-
- if (receive_count < expected)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d "
- "not enough messages received %u "
- "expected %u\n",
- i, receive_count, expected));
-
- sync_server (orb, flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- if (depth++ == LIVENESS_MAX_DEPTH)
- {
- sync_server (orb, flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- depth = 0;
- }
- }
-
- return test_failed;
-}
-
-int
-run_message_count (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_MESSAGE_COUNT;
- buffering_constraint.message_count = BUFFERED_MESSAGES_COUNT;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = 0;
-
- Test::AMI_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- ami_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- Reply_Handler *reply_handler_impl;
- ACE_NEW_RETURN (reply_handler_impl,
- Reply_Handler,
- 1);
- PortableServer::ServantBase_var owner_transfer(reply_handler_impl);
-
- Test::AMI_AMI_BufferingHandler_var reply_handler =
- reply_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (orb, flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- while (1)
- {
- ami_buffering->sendc_receive_data (reply_handler.in (),
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong iteration_count =
- send_count - initial_receive_count;
- if (receive_count != initial_receive_count)
- {
- if (iteration_count < CORBA::ULong(BUFFERED_MESSAGES_COUNT))
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "message count reached. "
- "Iteration count = %u, Threshold = %u\n",
- i,
- iteration_count, BUFFERED_MESSAGES_COUNT));
- }
- break;
- }
-
- if (iteration_count > 2 * BUFFERED_MESSAGES_COUNT)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "message count threshold. "
- "Iteration count = %u, Threshold = %u\n",
- i,
- iteration_count, BUFFERED_MESSAGES_COUNT));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (orb,
- reply_handler.in (),
- ami_buffering,
- flusher.in (),
- ami_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
- return test_failed;
-}
-
-int
-run_timeout (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = TIMEOUT_MILLISECONDS * 10000;
-
- Test::AMI_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- ami_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- Reply_Handler *reply_handler_impl;
- ACE_NEW_RETURN (reply_handler_impl,
- Reply_Handler,
- 1);
- PortableServer::ServantBase_var owner_transfer(reply_handler_impl);
-
- Test::AMI_AMI_BufferingHandler_var reply_handler =
- reply_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (orb, flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- ACE_Time_Value start = ACE_OS::gettimeofday ();
- while (1)
- {
- ami_buffering->sendc_receive_data (reply_handler.in (),
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
- if (receive_count != initial_receive_count)
- {
- if (elapsed.msec () < TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "timeout expired. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- }
- // terminate the while loop.
- break;
- }
-
- if (elapsed.msec () > TIMEOUT_TOLERANCE)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "timeout threshold. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_TOLERANCE));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (orb,
- reply_handler.in (),
- ami_buffering,
- flusher.in (),
- ami_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
- return test_failed;
-}
-
-int
-run_timeout_reactive (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = TIMEOUT_MILLISECONDS * 10000;
-
- Test::AMI_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- ami_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- Reply_Handler *reply_handler_impl;
- ACE_NEW_RETURN (reply_handler_impl,
- Reply_Handler,
- 1);
- PortableServer::ServantBase_var owner_transfer(reply_handler_impl);
-
- Test::AMI_AMI_BufferingHandler_var reply_handler =
- reply_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (orb, flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
- ACE_Time_Value start = ACE_OS::gettimeofday ();
- for (int j = 0; j != 20; ++j)
- {
- ami_buffering->sendc_receive_data (reply_handler.in (),
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
- }
- while (1)
- {
- CORBA::ULong receive_count =
- ami_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value sleep (0, 10000);
- orb->run (sleep ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
- if (receive_count != initial_receive_count)
- {
- if (elapsed.msec () < TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "timeout expired. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- }
- // terminate the while loop.
- break;
- }
-
- if (elapsed.msec () > TIMEOUT_TOLERANCE)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "timeout threshold. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_TOLERANCE));
- break;
- }
- }
- }
-
-#if 0
- int liveness_test_failed =
- run_liveness_test (orb,
- reply_handler.in (),
- ami_buffering,
- flusher.in (),
- ami_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-#endif /* 0 */
-
-
- return test_failed;
-}
-
-int
-run_buffer_size (CORBA::ORB_ptr orb,
- Test::AMI_Buffering_ptr ami_buffering,
- Test::AMI_Buffering_Admin_ptr ami_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_MESSAGE_BYTES;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = BUFFER_SIZE;
- buffering_constraint.timeout = 0;
-
- Test::AMI_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- ami_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
-
- Reply_Handler *reply_handler_impl;
- ACE_NEW_RETURN (reply_handler_impl,
- Reply_Handler,
- 1);
- PortableServer::ServantBase_var owner_transfer(reply_handler_impl);
-
- Test::AMI_AMI_BufferingHandler_var reply_handler =
- reply_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong bytes_sent = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (orb, flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_bytes_received =
- ami_buffering_admin->bytes_received_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_bytes_received != bytes_sent)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d data lost (%u != %u)\n",
- i, initial_bytes_received, bytes_sent));
- }
-
- while (1)
- {
- ami_buffering->sendc_receive_data (reply_handler.in (),
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- bytes_sent += PAYLOAD_LENGTH;
-
- CORBA::ULong bytes_received =
- ami_buffering_admin->bytes_received_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong payload_delta =
- bytes_sent - initial_bytes_received;
- if (bytes_received != initial_bytes_received)
- {
- // The queue has been flushed, check that enough data
- // has been sent. The check cannot be precise because
- // the ORB counts the GIOP message overhead, in this
- // test we assume the overhead to be less than 10%
-
- if (payload_delta < CORBA::ULong (GIOP_OVERHEAD * BUFFER_SIZE))
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "minimum buffer size was reached. "
- "Sent = %u, Minimum buffer = %u bytes\n",
- i,
- payload_delta, BUFFER_SIZE));
- }
- break;
- }
-
- if (payload_delta > 2 * BUFFER_SIZE)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "buffer size threshold. "
- "Sent = %u, Minimum buffer = %u bytes\n",
- i,
- payload_delta, BUFFER_SIZE));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (orb,
- reply_handler.in (),
- ami_buffering,
- flusher.in (),
- ami_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
- return test_failed;
-}
diff --git a/TAO/tests/AMI_Buffering/run_buffer_size.pl b/TAO/tests/AMI_Buffering/run_buffer_size.pl
deleted file mode 100755
index 9eccd0b7e84..00000000000
--- a/TAO/tests/AMI_Buffering/run_buffer_size.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-b ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/AMI_Buffering/run_message_count.pl b/TAO/tests/AMI_Buffering/run_message_count.pl
deleted file mode 100755
index e25a1eae4fa..00000000000
--- a/TAO/tests/AMI_Buffering/run_message_count.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-c ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/AMI_Buffering/run_test.pl b/TAO/tests/AMI_Buffering/run_test.pl
deleted file mode 100755
index f9d4e94f1e3..00000000000
--- a/TAO/tests/AMI_Buffering/run_test.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-foreach $test_type ("-c", "-t", "-b") {
- unlink $admin_iorfile;
- unlink $server_iorfile;
-
- my $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
- my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
- my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- .$test_type);
-
- $AD->Spawn ();
-
- if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
- }
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- $client = $CL->SpawnWaitKill (300);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-
- $server = $SV->WaitKill (10);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- $admin = $AD->WaitKill (10);
-
- if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
- }
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/AMI_Buffering/run_timeout.pl b/TAO/tests/AMI_Buffering/run_timeout.pl
deleted file mode 100755
index 049e0ab3926..00000000000
--- a/TAO/tests/AMI_Buffering/run_timeout.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-t ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (600);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/AMI_Buffering/run_timeout_reactive.pl b/TAO/tests/AMI_Buffering/run_timeout_reactive.pl
deleted file mode 100755
index f91953726d9..00000000000
--- a/TAO/tests/AMI_Buffering/run_timeout_reactive.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-r ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/AMI_Buffering/server.cpp b/TAO/tests/AMI_Buffering/server.cpp
deleted file mode 100644
index ba5fa487943..00000000000
--- a/TAO/tests/AMI_Buffering/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "AMI_Buffering.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(AMI_Buffering, server, "$Id$")
-
-const char *ior_output_file = "server.ior";
-const char *ior = "file://admin.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::AMI_Buffering_Admin_var admin =
- Test::AMI_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (admin.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil AMI_Buffering_Admin reference <%s>\n",
- ior),
- 1);
- }
-
- AMI_Buffering *AMI_buffering_impl;
- ACE_NEW_RETURN (AMI_buffering_impl,
- AMI_Buffering (orb.in (),
- admin.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(AMI_buffering_impl);
-
- Test::AMI_Buffering_var AMI_buffering =
- AMI_buffering_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (AMI_buffering.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/AMI_Timeouts/.cvsignore b/TAO/tests/AMI_Timeouts/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/AMI_Timeouts/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/AMI_Timeouts/AMI_Timeouts.mpc b/TAO/tests/AMI_Timeouts/AMI_Timeouts.mpc
deleted file mode 100644
index bf72e8baca6..00000000000
--- a/TAO/tests/AMI_Timeouts/AMI_Timeouts.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, ami {
- Source_Files {
- timeout_i.cpp
- timeout_client.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, ami {
- exename = client
- Source_Files {
- timeout_i.cpp
- timeout_client.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/AMI_Timeouts/README b/TAO/tests/AMI_Timeouts/README
deleted file mode 100644
index e7759a0d5f7..00000000000
--- a/TAO/tests/AMI_Timeouts/README
+++ /dev/null
@@ -1,20 +0,0 @@
-# $Id$
-
-Description:
-This is a simple test for AMI callback model in combination with
-timeouts (relative roundtrip timeout policy).
-
-Note:
-Use TAO_HAS_CORBA_MESSAGING
-and TAO_HAS_AMI_CALLBACK
-to compile TAO. This enables the AMI code in it.
-
-Use -GC on the TAO IDL compiler to generate code for AMI callbacks.
-
-Usage:
-=====
-$ server -o ior
-$ client -k file://ior
-
-
-
diff --git a/TAO/tests/AMI_Timeouts/client.cpp b/TAO/tests/AMI_Timeouts/client.cpp
deleted file mode 100644
index e483bc5d871..00000000000
--- a/TAO/tests/AMI_Timeouts/client.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-
-//=============================================================================
-/**
- * @file client.cpp
- *
- * $Id$
- *
- * A client, which uses the AMI callback model and timeouts.
- *
- *
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "timeout_client.h"
-
-#include "tao/debug.h"
-
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (AMI,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-unsigned int msec = 50;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "dk:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd':
- TAO_debug_level++;
- break;
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 't':
- msec = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-d "
- "-k <ior> "
- "-t <timeout in ms> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TimeoutObj_var timeout_var =
- TimeoutObj::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (timeout_var.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- // Activate POA to handle the call back.
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Instantiate reply handler
- TimeoutHandler_i timeoutHandler_i;
-
- AMI_TimeoutObjHandler_var timeoutHandler_var =
- timeoutHandler_i._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Instantiate client
- TimeoutClient client (orb.in (),
- timeout_var.in (),
- timeoutHandler_var.in (),
- &timeoutHandler_i,
- msec);
-
- client.activate ();
-
- // ORB loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); // Fetch responses
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for all the threads to finish before destroying the
- // ORB.
- (void) client.thr_mgr ()->wait ();
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "ORB finished\n"));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/AMI_Timeouts/run_test.pl b/TAO/tests/AMI_Timeouts/run_test.pl
deleted file mode 100755
index 1be52c73e61..00000000000
--- a/TAO/tests/AMI_Timeouts/run_test.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-d -o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-d -o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 20) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (120);
-$server = $SV->TerminateWaitKill (5);
-
-unlink $iorfile;
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/AMI_Timeouts/server.cpp b/TAO/tests/AMI_Timeouts/server.cpp
deleted file mode 100644
index b26f765296d..00000000000
--- a/TAO/tests/AMI_Timeouts/server.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-
-//=============================================================================
-/**
- * @file server.cpp
- *
- * $Id$
- *
- * Implementation of the server running the Timeout object.
- *
- *
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "timeout_client.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (AMI,
- server,
- "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'd':
- TAO_debug_level++;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Timeout_i timeout_i (orb.in ());
-
- TimeoutObj_var timeout_var =
- timeout_i._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (timeout_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Instantiate reply handler
- TimeoutHandler_i timeoutHandler_i;
-
- AMI_TimeoutObjHandler_var timeoutHandler_var =
- timeoutHandler_i._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Instantiate client
- /*
- TimeoutClient* client = new TimeoutClient (orb,
- timeout_var.in (),
- timeoutHandler_var.in (),
- &timeoutHandler_i);
-
- client->activate ();
- */
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- //delete client;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/AMI_Timeouts/svc.conf b/TAO/tests/AMI_Timeouts/svc.conf
deleted file mode 100644
index 644bce82202..00000000000
--- a/TAO/tests/AMI_Timeouts/svc.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-
-static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBclientconnectionhandler MT"
diff --git a/TAO/tests/AMI_Timeouts/svc.conf.xml b/TAO/tests/AMI_Timeouts/svc.conf.xml
deleted file mode 100644
index 5b30b8bd1ad..00000000000
--- a/TAO/tests/AMI_Timeouts/svc.conf.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/AMI_Timeouts/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy EXCLUSIVE -ORBclientconnectionhandler MT"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/AMI_Timeouts/timeout.idl b/TAO/tests/AMI_Timeouts/timeout.idl
deleted file mode 100644
index 64aa8c189c5..00000000000
--- a/TAO/tests/AMI_Timeouts/timeout.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/AMI_Timeouts
-//
-// = FILENAME
-// timeout.idl
-//
-// = DESCRIPTION
-// Interface of the test CORBA object.
-//
-// = AUTHOR
-// Michael Kircher <Michael.Kircher@mchp.siemens.de>
-//
-// ============================================================================
-
-
-interface TimeoutObj {
-
- void sendTimeToWait (in long msec);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/AMI_Timeouts/timeout_client.cpp b/TAO/tests/AMI_Timeouts/timeout_client.cpp
deleted file mode 100644
index 96322b4cf1d..00000000000
--- a/TAO/tests/AMI_Timeouts/timeout_client.cpp
+++ /dev/null
@@ -1,335 +0,0 @@
-//=============================================================================
-/**
- * @file timeout_client.cpp
- *
- * $Id$
- *
- * Tests for proper handling of timeouts with AMI
- *
- *
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-#include "timeout_client.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/PolicyC.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/OS_NS_unistd.h"
-
-TimeoutClient::TimeoutClient (CORBA::ORB_ptr orb,
- TimeoutObj_ptr timeoutObject,
- AMI_TimeoutObjHandler_ptr replyHandlerObject,
- TimeoutHandler_i *timeoutHandler_i,
- unsigned long timeToWait)
-: orb_ (CORBA::ORB::_duplicate (orb))
- , timeoutObject_ (TimeoutObj::_duplicate (timeoutObject))
- , replyHandlerObject_ (AMI_TimeoutObjHandler::_duplicate (replyHandlerObject))
- , timeoutHandler_i_ (timeoutHandler_i)
- , local_reply_excep_counter_ (0)
- , INVOKE_SYNCH (0)
- , INVOKE_ASYNCH (1)
- , timeToWait_ (timeToWait)
-{
-
-}
-
-
-TimeoutClient::~TimeoutClient ()
-{
-
-}
-
-
-
-int
-TimeoutClient::svc ()
-{
- this->initialize ();
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
-
- // Tests timeouts for synchronous
- this->synch_test ();
-
- // Tests AMI timeouts for influences on non-timeout calls
- this->none_test ();
-
- // Tests AMI timeouts for accuracy
- this->accuracy_test ();
-
- // Tests AMI timeouts for influences on non-timeout calls
- this->none_test ();
-
- // shut down remote ORB
- timeoutObject_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (0, 20); // wait for the ORB to deliver the shutdonw
- ACE_OS::sleep (tv);
-
- // shut down local ORB
- orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "TimeoutClient::svc: Done\n\n"));
-
- return 0;
-}
-
-int
-TimeoutClient::initialize ()
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::Object_var object =
- orb_->resolve_initial_references ("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager_ =
- CORBA::PolicyManager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-void
-TimeoutClient::send (CORBA::Boolean async,
- unsigned long local_timeout,
- unsigned long remote_sleep)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Invoking "));
- if (async)
- ACE_DEBUG ((LM_DEBUG,
- "asynch "));
- else
- ACE_DEBUG ((LM_DEBUG,
- "synch "));
-
- ACE_DEBUG ((LM_DEBUG,
- "local: %dms remote: %dms ... ",
- local_timeout,
- remote_sleep));
-
- CORBA::PolicyList policy_list (1);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY_EX (normal)
- {
- if (local_timeout != 0)
- {
- TimeBase::TimeT timeout = 10000 * local_timeout;
-
- CORBA::Any any_orb;
- any_orb <<= timeout;
-
- policy_list.length (1);
- policy_list[0] =
- orb_->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- any_orb
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (normal);
-
- policy_manager_->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (normal);
- }
- else
- {
- policy_list.length (0);
- policy_manager_->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (normal);
- }
-
-
- // Start time measurement at the reply handler
- timeoutHandler_i_->start ();
-
- if (async)
- {
- timeoutObject_->sendc_sendTimeToWait (replyHandlerObject_.in (),
- remote_sleep
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (normal);
- }
- else // synch
- {
- timeoutObject_->sendTimeToWait (remote_sleep
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (normal);
- }
- }
- ACE_CATCH (CORBA::TIMEOUT, timeout)
- {
- local_reply_excep_counter_++;
-
- // Trap this exception and continue...
- ACE_DEBUG ((LM_DEBUG,
- " timeout "));
-
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- // get rid of the policy, you created before.
- ACE_TRY_EX (cleanup)
- {
- if (local_timeout != 0)
- {
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (cleanup);
- }
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG,
- "Error: Unexpected exception\n\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- // wait for responses
- ACE_Time_Value tv (0, (local_timeout + remote_sleep)*2000 + 4000);
- ACE_OS::sleep (tv);
-
- ACE_Time_Value &elapsed_time = timeoutHandler_i_->elapsed_time ();
-
- if (async)
- ACE_DEBUG ((LM_DEBUG,
- " .. needed %dms\n",
- elapsed_time.msec()));
- else
- ACE_DEBUG ((LM_DEBUG,
- " .. done\n"));
-}
-
-
-int
-TimeoutClient::synch_test ()
-{
- ACE_DEBUG ((LM_DEBUG,
- "TimeoutClient::synch_test - Begin\n"));
- timeoutHandler_i_->reset_reply_counter ();
- timeoutHandler_i_->reset_reply_excep_counter ();
- local_reply_excep_counter_ = 0;
-
- this->send (INVOKE_SYNCH,
- 0, // local
- 0); // remote
-
- this->send (INVOKE_SYNCH,
- timeToWait_, // local
- timeToWait_*2); // remote
-
- this->send (INVOKE_SYNCH,
- 0, // local
- 0); // remote
-
- if (timeoutHandler_i_->reply_counter () != 0
- || timeoutHandler_i_->reply_excep_counter () != 0
- || local_reply_excep_counter_ != 1)
- ACE_DEBUG ((LM_DEBUG,
- "**** Error in replies %d %d %d.\n\n",
- timeoutHandler_i_->reply_counter (),
- timeoutHandler_i_->reply_excep_counter (),
- local_reply_excep_counter_));
-
- ACE_DEBUG ((LM_DEBUG,
- "TimeoutClient::synch_test - End\n\n"));
-
- return 0;
-}
-
-int
-TimeoutClient::accuracy_test ()
-{
- ACE_DEBUG ((LM_DEBUG,
- "TimeoutClient::accuracy_test - Begin\n\n"));
-
- timeoutHandler_i_->reset_reply_counter ();
- timeoutHandler_i_->reset_reply_excep_counter ();
- local_reply_excep_counter_ = 0;
-
- this->send (INVOKE_ASYNCH,
- timeToWait_,
- (unsigned long)(timeToWait_*1.5));
-
- this->send (INVOKE_ASYNCH,
- timeToWait_,
- (unsigned long)(timeToWait_*0.5));
-
- if (timeoutHandler_i_->reply_counter () != 1
- || timeoutHandler_i_->reply_excep_counter () != 1
- || local_reply_excep_counter_ != 0)
- ACE_DEBUG ((LM_DEBUG,
- "**** Error in replies %d %d %d.\n\n",
- timeoutHandler_i_->reply_counter (),
- timeoutHandler_i_->reply_excep_counter (),
- local_reply_excep_counter_));
-
- ACE_DEBUG ((LM_DEBUG,
- "TimeoutClient::accuracy_test - End\n\n"));
-
- return 0;
-}
-
-int
-TimeoutClient::none_test ()
-{
- ACE_DEBUG ((LM_DEBUG,
- "TimeoutClient::none_test - Begin\n\n"));
-
- timeoutHandler_i_->reset_reply_counter ();
- timeoutHandler_i_->reset_reply_excep_counter ();
- local_reply_excep_counter_ = 0;
-
- this->send (INVOKE_ASYNCH,
- 0,
- 0);
-
- this->send (INVOKE_ASYNCH,
- timeToWait_,
- timeToWait_+10); // trigger a timeout
-
- this->send (INVOKE_ASYNCH,
- timeToWait_,
- 0);
-
- if (timeoutHandler_i_->reply_counter () != 2
- || timeoutHandler_i_->reply_excep_counter () != 1
- || local_reply_excep_counter_ != 0)
- ACE_DEBUG ((LM_DEBUG,
- "**** Error in replies %d %d %d.\n\n",
- timeoutHandler_i_->reply_counter (),
- timeoutHandler_i_->reply_excep_counter (),
- local_reply_excep_counter_));
-
- ACE_DEBUG ((LM_DEBUG,
- "TimeoutClient::none_test - End\n\n"));
-
- return 0;
-}
diff --git a/TAO/tests/AMI_Timeouts/timeout_client.h b/TAO/tests/AMI_Timeouts/timeout_client.h
deleted file mode 100644
index 126be343504..00000000000
--- a/TAO/tests/AMI_Timeouts/timeout_client.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/AMI_Timeouts
-//
-// = FILENAME
-// timeout_client.h
-//
-// = DESCRIPTION
-// Tests timeouts with AMI.
-//
-// = AUTHOR
-// Michael Kircher <Michael.Kircher@mchp.siemens.de>
-//
-// ============================================================================
-
-
-#include "ace/Task.h"
-
-#include "timeout_i.h"
-
-class TimeoutClient
-: public ACE_Task_Base
-{
-public:
- TimeoutClient (CORBA::ORB_ptr orb,
- TimeoutObj_ptr timeoutObject,
- AMI_TimeoutObjHandler_ptr replyHandlerObject,
- TimeoutHandler_i *timeoutHandler_i,
- unsigned long timeToWait);
-
- ~TimeoutClient ();
-
-
-private:
- // Initialize the context of this class.
- int initialize ();
-
- // Run in a separate thread.
- virtual int svc (void );
-
- // Wrapps complex invocations logic.
- void send (CORBA::Boolean async,
- unsigned long local_timeout,
- unsigned long remote_sleep);
-
- // Test if the synchronous timeouts still work.
- int synch_test ();
-
- // Test the accuracy of the timeouts.
- int accuracy_test ();
-
- // Test if the timeout functionaltiy disturbs non-timeout invocations
- int none_test ();
-
-private:
- CORBA::ORB_var orb_;
-
- // A CORBA object reference to the target object.
- TimeoutObj_var timeoutObject_;
-
- // A CORBA object reference to the reply handler
- AMI_TimeoutObjHandler_var replyHandlerObject_;
-
- // A pointer to the actual C++ reply handler implementation
- TimeoutHandler_i *timeoutHandler_i_;
-
- // Remember the policy manager.
- CORBA::PolicyManager_var policy_manager_;
-
- // Count test local exceptions
- unsigned short local_reply_excep_counter_;
-
- const CORBA::Boolean INVOKE_SYNCH;
-
- const CORBA::Boolean INVOKE_ASYNCH;
-
- unsigned long timeToWait_;
-};
diff --git a/TAO/tests/AMI_Timeouts/timeout_i.cpp b/TAO/tests/AMI_Timeouts/timeout_i.cpp
deleted file mode 100644
index ff9fab96bd8..00000000000
--- a/TAO/tests/AMI_Timeouts/timeout_i.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/AMI_Timeouts
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// Implements the timeout CORBA Object and its reply handler.
-//
-// = AUTHOR
-// Michael Kircher <Michael.Kircher@mchp.siemens.de>
-//
-// ============================================================================
-
-#include "timeout_i.h"
-#include "ace/OS_NS_unistd.h"
-
-Timeout_i::Timeout_i (CORBA::ORB_ptr orb)
-{
- orb_ = CORBA::ORB::_duplicate (orb);
-}
-
-Timeout_i::~Timeout_i ()
-{
-}
-
-void
-Timeout_i::sendTimeToWait (CORBA::Long msec
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- //ACE_DEBUG ((LM_DEBUG,
- // "Timeout_i::sendTimeToWait: invoked with msec = %d\n\n",
- // msec));
-
- if (msec != 0)
- {
- // ACE_DEBUG ((LM_DEBUG,
- // "Timeout_i::sendTimeToWait: sleeping\n\n"));
-
- ACE_Time_Value tv (0, msec * 1000);
- ACE_OS::sleep (tv);
- }
-}
-
-void
-Timeout_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- orb_->shutdown ();
- //ACE_DEBUG ((LM_DEBUG,
- // "Timeout_i::shutdown: shut down ORB\n\n"));
-}
-
-// Reply Handler implementation
-
-TimeoutHandler_i::TimeoutHandler_i ()
-: reply_counter_ (0)
-, reply_excep_counter_ (0)
-{
- timer_.reset ();
- timer_.start ();
- timer_.stop ();
-}
-
-TimeoutHandler_i::~TimeoutHandler_i ()
-{
-}
-
-void
-TimeoutHandler_i::sendTimeToWait (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "reply"));
- reply_counter_++;
- timer_.stop ();
-}
-
-void
-TimeoutHandler_i::sendTimeToWait_excep (::Messaging::ExceptionHolder *excep_holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- timer_.stop ();
-
- ACE_TRY
- {
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::TIMEOUT, timeout)
- {
- ACE_DEBUG ((LM_DEBUG,
- "timeout"));
- reply_excep_counter_++;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "Error: Unexpected exception"));
- }
- ACE_ENDTRY;
-}
-
-void
-TimeoutHandler_i::reset_reply_counter ()
-{
- reply_counter_ = 0;
-}
-
-void
-TimeoutHandler_i::reset_reply_excep_counter ()
-{
- reply_excep_counter_ = 0;
-}
-
-unsigned short
-TimeoutHandler_i::reply_counter ()
-{
- return reply_counter_;
-}
-
-unsigned short
-TimeoutHandler_i::reply_excep_counter ()
-{
- return reply_excep_counter_;
-}
-
-void
-TimeoutHandler_i::start ()
-{
- timer_.reset ();
- timer_.start ();
-}
-
-ACE_Time_Value &
-TimeoutHandler_i::elapsed_time ()
-{
- timer_.elapsed_time (elapsed_time_);
- return elapsed_time_;
-}
diff --git a/TAO/tests/AMI_Timeouts/timeout_i.h b/TAO/tests/AMI_Timeouts/timeout_i.h
deleted file mode 100644
index d4082ac05d2..00000000000
--- a/TAO/tests/AMI_Timeouts/timeout_i.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/AMI_Timeouts
-//
-// = FILENAME
-// timeout_i.h
-//
-// = DESCRIPTION
-// Implements the CORBA object.
-//
-// = AUTHOR
-// Michael Kircher <Michael.Kircher@mchp.siemens.de>
-//
-// ============================================================================
-
-#ifndef TIMEOUT_I_H
-#define TIMEOUT_I_H
-
-#include "ace/High_Res_Timer.h"
-
-#include "timeoutS.h"
-
-class Timeout_i
-: public POA_TimeoutObj
-{
-public:
- Timeout_i (CORBA::ORB_ptr orb);
-
- ~Timeout_i ();
-
- virtual void sendTimeToWait (CORBA::Long msec
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- CORBA::ORB_var orb_;
-};
-
-class TimeoutHandler_i
-: public POA_AMI_TimeoutObjHandler
-{
-public:
- TimeoutHandler_i ();
-
- ~TimeoutHandler_i ();
-
- virtual void sendTimeToWait (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void sendTimeToWait_excep (
- ::Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void reset_reply_counter ();
-
- void reset_reply_excep_counter ();
-
- unsigned short reply_counter ();
-
- unsigned short reply_excep_counter ();
-
- /// Start the time measurement
- void start ();
-
- /// Return the elapsed time
- ACE_Time_Value &elapsed_time ();
-
-private:
- unsigned short reply_counter_;
-
- unsigned short reply_excep_counter_;
-
- ACE_High_Res_Timer timer_;
-
- ACE_Time_Value elapsed_time_;
-};
-
-#endif /* TIMEOUT_I_H */
diff --git a/TAO/tests/Abstract_Interface/.cvsignore b/TAO/tests/Abstract_Interface/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Abstract_Interface/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Abstract_Interface/Abstract_Interface.mpc b/TAO/tests/Abstract_Interface/Abstract_Interface.mpc
deleted file mode 100644
index cc0059d58c7..00000000000
--- a/TAO/tests/Abstract_Interface/Abstract_Interface.mpc
+++ /dev/null
@@ -1,41 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*client) : taoclient, valuetype {
- idlflags += -Sc
-
- IDL_Files {
- test.idl
- }
-
- Source_Files {
- client.cpp
- testC.cpp
- }
-
- Header_Files {
- testC.h
- }
-}
-
-project(*server) : taoserver, valuetype {
- after += *client
- idlflags += -Sc
-
- IDL_Files {
- test.idl
- }
-
- Source_Files {
- server.cpp
- test_i.cpp
- testC.cpp
- testS.cpp
- }
-
- Header_Files {
- test_i.h
- testC.h
- testS.h
- }
-}
diff --git a/TAO/tests/Abstract_Interface/README b/TAO/tests/Abstract_Interface/README
deleted file mode 100644
index f4607cafe2a..00000000000
--- a/TAO/tests/Abstract_Interface/README
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-
-Description:
-
-This code contains some simple tests of abstract interfaces.
-
-Note:
-
-The test for passing state with a valuetype is based on the code
-in TAO/tests/OBV/Forward. A simple valuetype tree is constructed
-by defining valuetypes that can contain other valuetypes as a root
-or as left and right branches. All nodes also contain a string name.
-The tree is constructed on the server side and the root is passed back to the
-client in an OUT argument as an abstract interface. The valuetype
-is extracted, and the contents of the tree are displayed.
-
-The other two tests are for operations of an interface passed as an
-abstract interface. A derived interface is passed to the client in
-an OUT argument as an abstract interface which is the parent of the
-derived interface's base class. The base class operation is called
-directly on the abstract interface by the client. Then the interface
-itself is extracted and cast to the derived type. Finally, both the
-base class and the derived class operations are called by the client.
-
-In the final test, an operation called on the abstract interface
-is made to throw a user exception deliberately to test exception
-handling.
-
-Usage:
-
-The server will put the passer object's IOR into a file with a default
-name known to the client. However, the filename may be changed with:
-
-$ server -o <filename>
-
-in which case the client should be run as follows:
-
-$ client -k file://<filename>
-
-Other client command line options:
-
--d Enable test output for debugging
--s Test the passing of state only
--o Test operations only
--e Test exception handling only
-
-The last three options are mutually exclusive and will override
-any previous test selection options. The default behavior is to run
-all three tests. \ No newline at end of file
diff --git a/TAO/tests/Abstract_Interface/client.cpp b/TAO/tests/Abstract_Interface/client.cpp
deleted file mode 100644
index 0a26fb84775..00000000000
--- a/TAO/tests/Abstract_Interface/client.cpp
+++ /dev/null
@@ -1,340 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (Abstract_Interface,
- client,
- "$Id$")
-
-const char *ior_input_file = "file://test.ior";
-int debug = 0;
-
-enum test_select
-{
- TEST_STATE,
- TEST_OPERATION,
- TEST_EXCEPTION,
- TEST_ALL
-};
-
-test_select which_test = TEST_ALL;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:dsoe");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior_input_file = get_opts.optarg;
- break;
- case 'd':
- debug = 1;
- break;
- case 's':
- which_test = TEST_STATE;
- break;
- case 'o':
- which_test = TEST_OPERATION;
- break;
- case 'e':
- which_test = TEST_EXCEPTION;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <iorfile>",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-void
-dump_node (BaseNode* bn,
- int indent)
-{
- if (bn == 0)
- {
- return;
- }
-
- // This is ugly I know
- int i = indent;
- for (; i != 0; --i) ACE_DEBUG ((LM_DEBUG, " "));
-
- StringNode* sn = StringNode::_downcast (bn);
-
- if (debug)
- {
- if (sn != 0)
- {
- ACE_DEBUG ((LM_DEBUG, "%x <StringNode> %s\n",
- bn,
- sn->name ()));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "%x <BaseNode> \n",
- bn));
- }
- }
-
- dump_node (bn->left (),
- indent + 1);
- dump_node (bn->right (),
- indent + 1);
-}
-
-void
-dump_tree (TreeController *tc)
-{
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) start tree dump <%x>\n",
- tc));
- }
-
- dump_node (tc->root (),
- 1);
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) end tree dump <%x>\n",
- tc));
- }
-}
-
-void
-test_state (base_ptr abs)
-{
- CORBA::ValueBase_var vbase = abs->_to_value ();
- TreeController *tc = TreeController::_downcast (vbase.in ());
- dump_tree (tc);
-}
-
-void
-test_operation (base_ptr abs
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var retval = abs->base_op ("base_op"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- retval.in ()));
- }
-
- CORBA::Object_var obj = abs->_to_object ();
-
- foo_var concrete = foo::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- retval = concrete->foo_op ("foo_op"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- retval.in ()));
- }
-
- retval = concrete->base_op ("base_op"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- retval.in ()));
- }
-}
-
-void
-test_exception (base_ptr abs
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var retval = abs->base_op ("bad_name"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- retval.in ()));
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- CORBA::String_var retval;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- CORBA::Object_var obj =
- orb->string_to_object (ior_input_file
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (obj.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "string_to_object failed.\n"),
- -1);
- }
-
- passer_var objref = passer::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (objref.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "_narrow failed.\n"),
- -1);
- }
-
- base_var package = base::_nil ();
-
- if (which_test == TEST_STATE || which_test == TEST_ALL)
- {
- // Create and register factory for BaseNode.
- BaseNode_init *bn_factory = 0;
- ACE_NEW_RETURN (bn_factory,
- BaseNode_init,
- 1);
-
- orb->register_value_factory (bn_factory->tao_repository_id (),
- bn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- bn_factory->_remove_ref (); // release ownership
-
- // Create and register factory for TreeController.
- TreeController_init *tc_factory = 0;
- ACE_NEW_RETURN (tc_factory,
- TreeController_init,
- 1);
-
- orb->register_value_factory (tc_factory->tao_repository_id (),
- tc_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- tc_factory->_remove_ref (); // release ownership
-
- // Create and register factory for StringNode.
- StringNode_init *sn_factory = 0;
- ACE_NEW_RETURN (sn_factory,
- StringNode_init,
- 1);
-
- orb->register_value_factory (sn_factory->tao_repository_id (),
- sn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- sn_factory->_remove_ref (); // release ownership
-
- objref->pass_state (package.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (package.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "pass_state() returned null OUT arg\n"),
- -1);
- }
-
- test_state (package.in ());
- }
-
- if (which_test != TEST_STATE)
- {
- objref->pass_ops (package.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (package.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "pass_ops() returned null OUT arg\n"),
- -1);
- }
- }
-
- if (which_test == TEST_OPERATION || which_test == TEST_ALL)
- {
- test_operation (package.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (which_test == TEST_EXCEPTION || which_test == TEST_ALL)
- {
- which_test = TEST_EXCEPTION;
- test_exception (package.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (BadInput, ex)
- {
- if (which_test != TEST_EXCEPTION)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client: exception caught - ");
-
- return 1;
- }
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- ex.message.in ()));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client: exception caught - ");
-
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Abstract_Interface/run_test.pl b/TAO/tests/Abstract_Interface/run_test.pl
deleted file mode 100755
index 2c44e9a4c2f..00000000000
--- a/TAO/tests/Abstract_Interface/run_test.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$debug = "";
-$which_test = "";
-
-foreach $i (@ARGV) {
- if ($i eq "-d") {
- $debug = $i;
- }
- else {
- $which_test = $i;
- }
-}
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-$SV = new PerlACE::Process ("server",
- "-ORBDottedDecimalAddresses 1 "
- . " -o $iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL = new PerlACE::Process ("client",
- " -k file://$iorfile "
- . " $debug "
- . " $which_test");
-
-$client = $CL->SpawnWaitKill (20);
-$server = $SV->WaitKill (20);
-
-unlink $iorfile;
-
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
-
diff --git a/TAO/tests/Abstract_Interface/server.cpp b/TAO/tests/Abstract_Interface/server.cpp
deleted file mode 100644
index 6a3c9034587..00000000000
--- a/TAO/tests/Abstract_Interface/server.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Abstract_Interface,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.optarg;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create and register factory for BaseNode.
- BaseNode_init *bn_factory = 0;
- ACE_NEW_RETURN (bn_factory,
- BaseNode_init,
- 1);
-
- orb->register_value_factory (bn_factory->tao_repository_id (),
- bn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- bn_factory->_remove_ref (); // release ownership
-
- // Create and register factory for TreeController.
- TreeController_init *tc_factory = 0;
- ACE_NEW_RETURN (tc_factory,
- TreeController_init,
- 1);
-
- orb->register_value_factory (tc_factory->tao_repository_id (),
- tc_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- tc_factory->_remove_ref (); // release ownership
-
- // Create and register factory for StringNode.
- StringNode_init *sn_factory = 0;
- ACE_NEW_RETURN (sn_factory,
- StringNode_init,
- 1);
-
- orb->register_value_factory (sn_factory->tao_repository_id (),
- sn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- sn_factory->_remove_ref (); // release ownership
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
- }
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- passer_i servant;
- passer_var server =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Activated as <%s>\n",
- ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Can't open output file for writing IOR: %s",
- ior_output_file),
- 1);
- }
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (10);
- orb->run (tv
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Destroy the POA, waiting until the destruction terminates
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Server: exception caught - ");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Abstract_Interface/test.idl b/TAO/tests/Abstract_Interface/test.idl
deleted file mode 100644
index 0b7bf4f636f..00000000000
--- a/TAO/tests/Abstract_Interface/test.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-exception BadInput
-{
- string message;
-};
-
-abstract interface base
-{
- string base_op (in string inarg)
- raises (BadInput);
-};
-
-interface foo : base
-{
- string foo_op (in string inarg)
- raises (BadInput);
-};
-
-interface passer
-{
- void pass_ops (out base outarg);
- void pass_state (out base outarg);
-};
-
-valuetype BaseNode
-{
- public BaseNode left;
- public BaseNode right;
-};
-
-valuetype StringNode : BaseNode
-{
- public string name;
-};
-
-valuetype TreeController supports base
-{
- public BaseNode root;
-};
-
-
diff --git a/TAO/tests/Abstract_Interface/test_i.cpp b/TAO/tests/Abstract_Interface/test_i.cpp
deleted file mode 100644
index a3e9072788b..00000000000
--- a/TAO/tests/Abstract_Interface/test_i.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_string.h"
-
-
-ACE_RCSID (Abstract_Interface,
- test_i,
- "$Id$")
-
-
-char *
-foo_i::foo_op (const char * inarg
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- BadInput
- ))
-{
- CORBA::String_var retval = CORBA::string_dup ("bad");
-
- if (ACE_OS::strcmp (inarg, "foo_op") == 0)
- {
- retval = CORBA::string_dup ("good");
- }
- else
- {
- ACE_THROW_RETURN (BadInput ("expected \"foo_op\"\n"),
- retval._retn ());
- }
-
- return retval._retn ();
-}
-
-char *
-foo_i::base_op (const char * inarg
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- BadInput
- ))
-{
- CORBA::String_var retval = CORBA::string_dup ("bad");
-
- if (ACE_OS::strcmp (inarg, "base_op") == 0)
- {
- retval = CORBA::string_dup ("good");
- }
- else
- {
- ACE_THROW_RETURN (BadInput ("expected \"base_op\"\n"),
- retval._retn ());
- }
-
- return retval._retn ();
-}
-
-void
-passer_i::pass_ops (base_out outarg
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- foo_i *servant = 0;
- ACE_NEW (servant,
- foo_i);
- PortableServer::ServantBase_var safety (servant);
- outarg = servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-passer_i::pass_state (base_out outarg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- TreeController_var tc;
- ACE_NEW (tc.inout (),
- OBV_TreeController);
-
- // Create the root node.
- StringNode_var sn;
- ACE_NEW (sn.inout (),
- OBV_StringNode);
- sn->name ((const char *) "RootNode");
- tc->root (sn.in ());
-
- // Create the left leaf.
- StringNode_var l_dummy;
- ACE_NEW (l_dummy.inout (),
- OBV_StringNode);
- l_dummy->name ((const char *) "LeftNode");
- sn->left (l_dummy.in ());
-
- // Create the right leaf.
- StringNode_var r_dummy;
- ACE_NEW (r_dummy.inout (),
- OBV_StringNode);
- r_dummy->name ((const char *) "RightNode");
- sn->right (r_dummy.in ());
-
- outarg = tc._retn ();
-}
diff --git a/TAO/tests/Abstract_Interface/test_i.h b/TAO/tests/Abstract_Interface/test_i.h
deleted file mode 100644
index b9af23803aa..00000000000
--- a/TAO/tests/Abstract_Interface/test_i.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// $Id$
-
-#ifndef TAO_TEST_I_H
-#define TAO_TEST_I_H
-
-#include "testS.h"
-
-class foo_i : public virtual POA_foo
-{
- virtual char * foo_op (const char * inarg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- BadInput
- ));
-
- virtual char * base_op (const char * inarg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- BadInput
- ));
-};
-
-class passer_i : public virtual POA_passer
-{
- virtual void pass_ops (base_out outarg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual void pass_state (base_out outarg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-};
-
-#endif /* TAO_TEST_I_H */
diff --git a/TAO/tests/AlternateIIOP/README b/TAO/tests/AlternateIIOP/README
deleted file mode 100644
index da08371ff0e..00000000000
--- a/TAO/tests/AlternateIIOP/README
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-
-@page AlternateIIOP Test README File
-
- This test uses the binaries from the Hello test, but builds an
-IOR that contains multiple endpoints. The "hostname_in_ior" option is
-used to add two unreachable endpoints along with a third that is
-successful.
-
-- The ior file for the test, altiiop.ior is not unlinked at the end of
-the test to allow for manual inspection using
-$TAO_ROOT/utils/catior/catior.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
diff --git a/TAO/tests/AlternateIIOP/run_test.pl b/TAO/tests/AlternateIIOP/run_test.pl
deleted file mode 100755
index e39c7c44821..00000000000
--- a/TAO/tests/AlternateIIOP/run_test.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("altiiop.ior");
-unlink $iorfile;
-$status = 0;
-@bogus_eps = ("-orbendpoint iiop://localhost:10200/hostname_in_ior=bogus.com",
- "-orbendpoint iiop://localhost:10202/hostname_in_ior=bogus.com");
-$valid_ep = "-orbendpoint iiop://localhost:10201";
-
-$SV_ALT_IIOP = new PerlACE::Process ("../Hello/server", "-o $iorfile -ORBUseSharedProfile 1 ",
- "$bogus_eps[0] $valid_ep $bogus_eps[1]");
-$CL_ALT_IIOP = new PerlACE::Process ("../Hello/client", " -k file://$iorfile");
-$SV_ALT_IIOP->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL_ALT_IIOP->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV_ALT_IIOP->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Any/Recursive/Hello.cpp b/TAO/tests/Any/Recursive/Hello.cpp
deleted file mode 100644
index 4ad14983990..00000000000
--- a/TAO/tests/Any/Recursive/Hello.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-
-
-ACE_RCSID (Recursive,
- Hello,
- "$Id$")
-
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Any *
-Hello::get_any (CORBA::Any const & the_any
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any * retval = 0;
-
- ACE_NEW_THROW_EX (retval,
- CORBA::Any (the_any),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (retval);
-
- return retval;
-}
-
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Any/Recursive/Hello.h b/TAO/tests/Any/Recursive/Hello.h
deleted file mode 100644
index 948d883b625..00000000000
--- a/TAO/tests/Any/Recursive/Hello.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Hello.h
- *
- * $Id$
- *
- * Header file for recursive type Any insertion and extraction test.
- *
- * @author Ossama Othman
- */
-//=============================================================================
-
-
-#ifndef HELLO_H
-#define HELLO_H
-
-#include "TestS.h"
-
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
-
- /// Constructor
- Hello (CORBA::ORB_ptr orb);
-
- // Return the any provide as an "in" argument.
- virtual CORBA::Any * get_any (CORBA::Any const & the_any
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// The ORB which will be shutdown by Hello::shutdown().
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* HELLO_H */
diff --git a/TAO/tests/Any/Recursive/NonRecursive.idl b/TAO/tests/Any/Recursive/NonRecursive.idl
deleted file mode 100644
index 1ebde843dab..00000000000
--- a/TAO/tests/Any/Recursive/NonRecursive.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-//
-// Non-recursive types for compile-time testing.
-
-module Foo
-{
- struct Nested
- {
- boolean z;
- };
-};
-
-module Bar
-{
- typedef Foo::Nested Nested;
-
- struct Baz
- {
- Nested one;
- Nested two;
- };
-};
diff --git a/TAO/tests/Any/Recursive/README b/TAO/tests/Any/Recursive/README
deleted file mode 100644
index 374abe6ed40..00000000000
--- a/TAO/tests/Any/Recursive/README
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Id$
-
-/**
-
-@page Recursive Any Test README File
-
-This test determines whether insertion and extraction of recursive
-types into and from a CORBA::Any, respectively, works. Properly
-functioning insertion and exctraction of recursive types depends on
-working recursive TypeCode support, which is indirectly tested by this
-test as well.
-
-To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
-the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Any/Recursive/RecursiveHello.mpc b/TAO/tests/Any/Recursive/RecursiveHello.mpc
deleted file mode 100644
index 739a66df566..00000000000
--- a/TAO/tests/Any/Recursive/RecursiveHello.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-//
-// $Id$
-
-project(*Server): taoserver, valuetype {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, valuetype, typecodefactory, ifr_client {
- after += *Server
-
- Source_Files {
- TestC.cpp
- NonRecursiveC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Any/Recursive/Test.idl b/TAO/tests/Any/Recursive/Test.idl
deleted file mode 100644
index d1d5e447c36..00000000000
--- a/TAO/tests/Any/Recursive/Test.idl
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- exception Recursive_Type_In_Any_Test_Failed {};
- exception Demarshaling_From_Any_Failed {};
-
- struct RecursiveStruct;
- typedef sequence<RecursiveStruct> RecursiveStructSeq;
-
- struct RecursiveStruct
- {
- RecursiveStructSeq recursive_structs;
- long i;
- RecursiveStructSeq recursive_structs_second;
- };
-
- // --------------------------
-
- union RecursiveUnion;
- typedef sequence<RecursiveUnion> RecursiveUnionSeq;
-
- union RecursiveUnion switch (short)
- {
- case 0:
- RecursiveUnionSeq recursive_unions;
- case 1:
- short a;
- case 2:
- RecursiveUnionSeq recursive_unions_second;
- default:
- long i;
- };
-
- union RecursiveUnionNoDefault;
- typedef sequence<RecursiveUnionNoDefault> RecursiveUnionSeqNoDefault;
-
- union RecursiveUnionNoDefault switch (short)
- {
- case 0:
- RecursiveUnionSeqNoDefault recursive_unions;
- case 1:
- short a;
- case 2:
- RecursiveUnionSeqNoDefault recursive_unions_second;
- };
-
- // --------------------------
-
- // --------------------------
-
- enum VSort {
- UNKNOWN_TYPE,
- RECURSIVE_TYPE,
- LONG_STYPE,
- BOOL_STYPE
- };
-
- union VSortRecursiveUnion;
- typedef sequence<VSortRecursiveUnion> VSortRecursiveUnionSeq;
- union VSortRecursiveUnion switch (VSort)
- {
- case RECURSIVE_TYPE:
- VSortRecursiveUnionSeq recursive_unions;
- case LONG_STYPE:
- long i;
- };
-
- // --------------------------
-
- union EnumUnion switch (VSort)
- {
- case BOOL_STYPE:
- boolean a;
- case LONG_STYPE:
- long i;
- };
-
- // --------------------------
-
- valuetype IndirectlyRecursiveValuetype;
- typedef sequence<IndirectlyRecursiveValuetype>
- IndirectlyRecursiveValuetypeSeq;
-
- valuetype IndirectlyRecursiveValuetype
- {
- public IndirectlyRecursiveValuetypeSeq recursive_valuetypes;
- };
-
- // --------------------------
-
- valuetype DirectlyRecursiveValuetype
- {
- public DirectlyRecursiveValuetype recursive_valuetype;
- public DirectlyRecursiveValuetype recursive_valuetype_second;
- };
-
- // --------------------------
-
- /// Simple test interface.
- interface Hello
- {
- /// Return the any provided as the "in" argument.
- any get_any (in any the_any);
-
- /// Shutdown the server ORB.
- oneway void shutdown ();
- };
-
-};
diff --git a/TAO/tests/Any/Recursive/client.cpp b/TAO/tests/Any/Recursive/client.cpp
deleted file mode 100644
index 6bb78f5ed62..00000000000
--- a/TAO/tests/Any/Recursive/client.cpp
+++ /dev/null
@@ -1,486 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/IFR_Client/IFR_BaseC.h"
-#include "tao/TypeCodeFactory/TypeCodeFactory_Loader.h"
-
-#include "ace/Get_Opt.h"
-
-#include <algorithm>
-#include <functional>
-
-
-ACE_RCSID (Recursive,
- client,
- "$Id$")
-
-
-const char * ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- case 'h':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Successful command line parsing.
- return 0;
-}
-
-template<typename T> void dump (T *); // Forward declaration.
-
-template<>
-void
-dump<Test::RecursiveStruct> (Test::RecursiveStruct * data)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Test::RecursiveStruct\n"
- "%d\n"
- "%u\n"
- "%d\n"
- "%d\n",
- data->i,
- data->recursive_structs.length (),
- data->recursive_structs[0].i,
- data->recursive_structs[1].i));
-}
-
-template<>
-void
-dump<Test::RecursiveUnion> (Test::RecursiveUnion * data)
-{
- ACE_DEBUG ((LM_DEBUG, "Test::RecursiveUnion\n"));
-
- switch (data->_d ())
- {
- case 0:
- {
- Test::RecursiveUnionSeq const & seq = data->recursive_unions ();
-
- ACE_DEBUG ((LM_DEBUG,
- "%u\n"
- "%d\n"
- "%u\n",
- seq.length (),
- seq[0].i (),
- seq[1].recursive_unions ().length ()));
- }
- break;
- default:
- ACE_DEBUG ((LM_DEBUG,
- "%d\n",
- data->i ()));
- break;
- }
-}
-
-template<typename T>
-void
-perform_invocation (Test::Hello_ptr hello,
- CORBA::Any const & the_any
- ACE_ENV_ARG_DECL)
-{
- // Execute more than once to help verify that mutable recursive
- // TypeCode state is managed correctly.
- for (unsigned int n = 0; n < 2; ++n)
- {
- CORBA::Any_var my_any =
- hello->get_any (the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- T * my_foo = 0;
- if (!(my_any.in () >>= my_foo))
- ACE_THROW (Test::Demarshaling_From_Any_Failed ());
-
-// ACE_DEBUG ((LM_DEBUG, "Data dump:\n"));
-// dump<T> (my_foo);
-
- CORBA::TypeCode_var the_tc = the_any.type ();
- CORBA::TypeCode_var my_tc = my_any->type ();
-
- CORBA::Boolean const equal_tc =
- the_tc->equal (my_tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!equal_tc)
- ACE_THROW (Test::Recursive_Type_In_Any_Test_Failed ());
-
- CORBA::Boolean const equiv_tc =
- the_tc->equivalent (my_tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!equiv_tc)
- ACE_THROW (Test::Recursive_Type_In_Any_Test_Failed ());
- }
-}
-
-void
-recursive_struct_test (CORBA::ORB_ptr /* orb */,
- Test::Hello_ptr hello
- ACE_ENV_ARG_DECL)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing recursive struct test\n"));
-
- Test::RecursiveStruct foo;
-
- foo.recursive_structs.length (2);
- foo.recursive_structs[0].i = 37;
- foo.recursive_structs[1].i = 11034;
- foo.i = 12;
-
- CORBA::Any the_any;
- the_any <<= foo;
-
- ::perform_invocation<Test::RecursiveStruct> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-recursive_union_test (CORBA::ORB_ptr /* orb */,
- Test::Hello_ptr hello
- ACE_ENV_ARG_DECL)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing recursive union test\n"));
-
- Test::RecursiveUnion foo;
- Test::EnumUnion foo_enum;
- static CORBA::Long const test_long = 238901;
- CORBA::Any the_any;
-
- // First simple case, just an union with an enum as discriminator
- foo_enum.i (test_long);
- the_any <<= foo_enum;
-
- ::perform_invocation<Test::EnumUnion> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Non-recursive member case.
- foo.i (test_long);
-
- the_any <<= foo;
-
- ::perform_invocation<Test::RecursiveUnion> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Recursive member case.
- Test::RecursiveUnionSeq seq;
- seq.length (2);
- seq[0].i (37);
- seq[1].recursive_unions (Test::RecursiveUnionSeq ());
-
- foo.recursive_unions (seq);
-
- the_any <<= foo;
-
- ::perform_invocation<Test::RecursiveUnion> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Recursive member case with no default member
- Test::RecursiveUnionSeqNoDefault seqnodefault;
- seqnodefault.length (2);
- seqnodefault[0].a (37);
- seqnodefault[1].recursive_unions (Test::RecursiveUnionSeqNoDefault ());
-
- Test::RecursiveUnionNoDefault foonodefault;
- foonodefault.recursive_unions (seqnodefault);
-
- the_any <<= foonodefault;
-
- ::perform_invocation<Test::RecursiveUnionNoDefault> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Recursive member case with enum .
- Test::VSortRecursiveUnionSeq vsortseq;
- vsortseq.length (2);
- vsortseq[0].i (37);
- vsortseq[1].recursive_unions (Test::VSortRecursiveUnionSeq ());
-
- Test::VSortRecursiveUnion vsort_foo;
- vsort_foo.recursive_unions (vsortseq);
-
- the_any <<= vsort_foo;
-
- ::perform_invocation<Test::VSortRecursiveUnion> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-indirectly_recursive_valuetype_test (CORBA::ORB_ptr /* orb */,
- Test::Hello_ptr /* hello */
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing indirectly recursive valuetype test\n"));
-
- ACE_DEBUG ((LM_WARNING,
- " Currently unimplemented.\n"));
-}
-
-void
-directly_recursive_valuetype_test (CORBA::ORB_ptr /* orb */,
- Test::Hello_ptr /* hello */
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing directly recursive valuetype test\n"));
-
- ACE_DEBUG ((LM_WARNING,
- " Currently unimplemented.\n"));
-}
-
-#if TAO_HAS_MINIMUM_CORBA == 0
-
-void
-recursive_struct_typecodefactory_test (CORBA::ORB_ptr orb,
- Test::Hello_ptr hello
- ACE_ENV_ARG_DECL)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing recursive struct via TypeCodeFactory test\n"));
-
- Test::RecursiveStruct foo;
-
- foo.recursive_structs.length (2);
- foo.recursive_structs[0].i = 37;
- foo.recursive_structs[1].i = 11034;
- foo.i = 12;
-
- CORBA::Any the_any;
- the_any <<= foo;
-
- CORBA::TypeCode_var recursive_tc =
- orb->create_recursive_tc ("IDL:Test/RecursiveStruct:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var seq_tc =
- orb->create_sequence_tc (0,
- recursive_tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::StructMemberSeq members (3);
- members.length (3);
- members[0].name = "recursive_structs";
- members[0].type = seq_tc;
- members[1].name = "i";
- members[1].type = CORBA::TypeCode::_duplicate (CORBA::_tc_long);
- members[2].name = "recursive_structs_second";
- members[2].type = seq_tc;
-
- CORBA::TypeCode_var struct_tc =
- orb->create_struct_tc ("IDL:Test/RecursiveStruct:1.0",
- "RecursiveStruct",
- members
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Reset the underlying TypeCode to the one we just created with the
- // TypeCodeFactory.
- the_any.type (struct_tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ::perform_invocation<Test::RecursiveStruct> (hello,
- the_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-recursive_union_typecodefactory_test (CORBA::ORB_ptr /* orb */,
- Test::Hello_ptr /* hello */
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing recursive union via TypeCodeFactory test\n"));
-
- ACE_DEBUG ((LM_WARNING,
- " Currently unimplemented.\n"));
-}
-
-void
-indirectly_recursive_valuetype_typecodefactory_test (
- CORBA::ORB_ptr /* orb */,
- Test::Hello_ptr /* hello */
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing indirectly recursive valuetype via "
- "TypeCodeFactory test\n"));
-
- ACE_DEBUG ((LM_WARNING,
- " Currently unimplemented.\n"));
-}
-
-void
-directly_recursive_valuetype_typecodefactory_test (CORBA::ORB_ptr /* orb */,
- Test::Hello_ptr /* hello */
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG ((LM_INFO,
- "Executing directly recursive valuetype via "
- "TypeCodeFactory test\n"));
-
- ACE_DEBUG ((LM_WARNING,
- " Currently unimplemented.\n"));
-}
-
-#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
-
-
-/**
- * @struct Caller
- *
- * @brief Test method invocation functor.
- *
- * Test method invocation functor.
- */
-template <typename T>
-struct Caller : public std::unary_function<T, void>
-{
- /// Constructor.
- Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
- : orb (CORBA::ORB::_duplicate (o))
- , hello (Test::Hello::_duplicate (h))
- , success (true)
- {
- }
-
- /// Function call operator overload.
- void operator() (T f)
- {
- ACE_DECLARE_NEW_ENV;
- ACE_TRY
- {
- f (orb.in (),
- hello.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception thrown:");
-
- success = false;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-
- CORBA::ORB_var orb;
- Test::Hello_var hello;
- bool success;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- typedef void (*test_func) (CORBA::ORB_ptr,
- Test::Hello_ptr
- ACE_ENV_ARG_DECL);
-
- static test_func const tests[] =
- {
- recursive_struct_test
- , recursive_union_test
- , indirectly_recursive_valuetype_test
- , directly_recursive_valuetype_test
-#if TAO_HAS_MINIMUM_CORBA == 0
- , recursive_struct_typecodefactory_test
- , recursive_union_typecodefactory_test
- , indirectly_recursive_valuetype_typecodefactory_test
- , directly_recursive_valuetype_typecodefactory_test
-#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
- };
-
- static size_t const test_count = sizeof (tests) / sizeof (test_func);
-
- // Have some fun with the STL. :-)
- Caller<test_func> c =
- std::for_each (tests,
- tests + test_count,
- Caller<test_func> (orb.in (),
- hello.in ()));
-
- if (!c.success)
- ACE_TRY_THROW (Test::Recursive_Type_In_Any_Test_Failed ());
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Any/Recursive/run_test.pl b/TAO/tests/Any/Recursive/run_test.pl
deleted file mode 100755
index a3715338fd2..00000000000
--- a/TAO/tests/Any/Recursive/run_test.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-print STDERR "\n\n==== Running Recursive Type in Any test\n";
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Any/Recursive/server.cpp b/TAO/tests/Any/Recursive/server.cpp
deleted file mode 100644
index 177aad4d1d8..00000000000
--- a/TAO/tests/Any/Recursive/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional/.cvsignore b/TAO/tests/BiDirectional/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/BiDirectional/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/BiDirectional/BiDirectional.mpc b/TAO/tests/BiDirectional/BiDirectional.mpc
deleted file mode 100644
index 55e22534e4a..00000000000
--- a/TAO/tests/BiDirectional/BiDirectional.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, anytypecode, minimum_corba, bidir_giop {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, anytypecode, minimum_corba, bidir_giop {
- exename = client
- after += *Server
- Source_Files {
- test_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/BiDirectional/README b/TAO/tests/BiDirectional/README
deleted file mode 100644
index ea17bd32f25..00000000000
--- a/TAO/tests/BiDirectional/README
+++ /dev/null
@@ -1,20 +0,0 @@
-# $Id$
-
-This is a test that exercises the birectional GIOP connection
-implementation in TAO. Start the server like this
-
-$ server -o <file.ior> -i <no_iterations>
-$ client -k file://<file.ior> -x
-
-The server starts up writing the IOR to the file. The client then
-starts up, creates its own object and passes the reference to the
-server. Then it invokes a method on the server to indicate that it is
-ready for callback. The server then callsback the client on the same
-connection <no_iterations> times. If the server creates a new
-connection the server would crash itself.
-
-
-
-
-
-
diff --git a/TAO/tests/BiDirectional/client.cpp b/TAO/tests/BiDirectional/client.cpp
deleted file mode 100644
index d775aabc942..00000000000
--- a/TAO/tests/BiDirectional/client.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(BiDirectional, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-void do_nothing (void)
-{
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
-
- Callback_i callback_impl (orb.in ());
-
- Callback_var callback =
- callback_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Send the calback object to the server
- server->callback_object (callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // A method to kickstart callbacks from the server
- CORBA::Long r =
- server->test_method (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d ",
- r));
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional/run_test.pl b/TAO/tests/BiDirectional/run_test.pl
deleted file mode 100755
index ee4c91cce64..00000000000
--- a/TAO/tests/BiDirectional/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior -i 100");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/BiDirectional/run_test_ipv6.pl b/TAO/tests/BiDirectional/run_test_ipv6.pl
deleted file mode 100755
index c422afa3a00..00000000000
--- a/TAO/tests/BiDirectional/run_test_ipv6.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior -i 100 -ORBConnectIPV6Only 1");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -i 100 -ORBConnectIPV6Only 1");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -ORBConnectIPV6Only 1");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/BiDirectional/server.cpp b/TAO/tests/BiDirectional/server.cpp
deleted file mode 100644
index 02f3a672f43..00000000000
--- a/TAO/tests/BiDirectional/server.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(BiDirectional, server, "$Id$")
-
-const char *ior_output_file = 0;
-int no_iterations = 10;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'i':
- no_iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-i <no_iterations>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in (),
- no_iterations);
-
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("simple_server");
-
- child_poa->activate_object_with_id (id.in (),
- &server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- child_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- int retval = 0;
- while (retval == 0)
- {
- // Just process one upcall. We know that we would get the
- // clients IOR in that call.
- CORBA::Boolean pending =
- orb->work_pending(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (pending)
- {
- orb->perform_work(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Now that hopefully we have the clients IOR, just start
- // making remote calls to the client.
- retval = server_impl.call_client (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional/test.idl b/TAO/tests/BiDirectional/test.idl
deleted file mode 100644
index 47ede657b9a..00000000000
--- a/TAO/tests/BiDirectional/test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-interface Callback
-{
- oneway void shutdown ();
- // A safe way to shutdown the client, using either clean shutdowns
- // or "catastrophic failures".
-
- void callback_method ();
- // A simple remote call
-
-};
-
-interface Simple_Server
-{
- long test_method (in boolean do_callback);
- // Just call a method on the server,
-
- void callback_object (in Callback cb);
- // send the callback object to the server
-
- oneway void shutdown ();
- // A safe way to shutdown the server, it is a oneway function so we
- // will never get a COMM_FAILURE error
-};
diff --git a/TAO/tests/BiDirectional/test_i.cpp b/TAO/tests/BiDirectional/test_i.cpp
deleted file mode 100644
index 88c345394db..00000000000
--- a/TAO/tests/BiDirectional/test_i.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "tao/Thread_Lane_Resources.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(BiDirectional, test_i, "$Id$")
-
-void
-Callback_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Performing clean shutdown\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Callback_i::callback_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Callback method called \n"));
-}
-
-
-// ****************************************************************
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (do_callback)
- {
- this->flag_ = 1;
- }
-
- return 0;
-}
-
-void
-Simple_Server_i::callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Store the callback object
- this->callback_ = Callback::_duplicate (callback);
-}
-
-int
-Simple_Server_i::call_client (ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->flag_)
- {
- for (int times = 0; times < this->no_iterations_; ++times)
- {
- this->callback_->callback_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // If the cache size has gotten larger this indicates that
- // the connection isn't being shared properly, i.e., a new
- // connection was created, so we'll abort.
- if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) The cache has grown, aborting ..\n"));
-
- ACE_OS::abort ();
- }
- }
-
- this->callback_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- this->flag_ = 0;
-
- return 1;
- }
-
- return 0;
-}
-
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/BiDirectional/test_i.h b/TAO/tests/BiDirectional/test_i.h
deleted file mode 100644
index d66809ff118..00000000000
--- a/TAO/tests/BiDirectional/test_i.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/BiDirectional
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_BIDIRECTIONAL_TEST_I_H
-#define TAO_BIDIRECTIONAL_TEST_I_H
-
-#include "testS.h"
-
-class Callback_i : public POA_Callback
-{
- // = TITLE
- // A callback object to the "client"
- //
- // = DESCRIPTION
- // To test that the server can call the client on the same
- // connection that was established by the client
- //
-public:
- Callback_i (CORBA::ORB_ptr orb);
- // ctor
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Safe way to shutdown
-
- void callback_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // The callback method
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-
-};
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb, int no_iterations);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- int call_client (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- int flag_;
- // Flag to indicate, whether we are ready for a remote call.
-
- Callback_var callback_;
- // Callback Object
-
- int no_iterations_;
- // Number of times the callback needs to be called
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_BIDIRECTIONAL_TEST_I_H */
diff --git a/TAO/tests/BiDirectional/test_i.i b/TAO/tests/BiDirectional/test_i.i
deleted file mode 100644
index 799be9fdcbe..00000000000
--- a/TAO/tests/BiDirectional/test_i.i
+++ /dev/null
@@ -1,17 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Callback_i::Callback_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb,
- int no_iterations)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- flag_ (0),
- callback_ (0),
- no_iterations_ (no_iterations)
-{
-}
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc b/TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc
deleted file mode 100644
index abcf650df1b..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/BiDir_DelayedUpcall.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, minimum_corba, bidir_giop {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver, minimum_corba, bidir_giop {
- after += *Server
- Source_Files {
- test_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/README b/TAO/tests/BiDirectional_DelayedUpcall/README
deleted file mode 100644
index 60497253309..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/README
+++ /dev/null
@@ -1,6 +0,0 @@
-# $Id$
-
-This test is similar to the $TAO_ROOT/tests/BiDirectional test. The
-only difference being that the server after it has received the upcall
-it does a bit delayed a bunch of remote calls do the client again
-
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/client.cpp b/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
deleted file mode 100644
index a6b00269d1b..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/High_Res_Timer.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(BiDirectional, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-void do_nothing (void)
-{
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Callback_i *callback_impl = 0;
- ACE_NEW_THROW_EX (callback_impl,
- Callback_i (orb.in ()),
- CORBA::NO_MEMORY ());
-
- PortableServer::ServantBase_var owner_transfer(callback_impl);
-
- Callback_var callback =
- callback_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Send the calback object to the server
- server->callback_object (callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Call the client that will make remote calls to us again, but
- // not directly, but delayed for a second or so.
- CORBA::Long r =
- server->test_method (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d ",
- r));
- }
-
- // Run now the ORB for 5 seconds
- ACE_Time_Value run_time (5);
- orb->run (run_time ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Shutdown the server
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/run_test.pl b/TAO/tests/BiDirectional_DelayedUpcall/run_test.pl
deleted file mode 100755
index ee4c91cce64..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior -i 100");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/server.cpp b/TAO/tests/BiDirectional_DelayedUpcall/server.cpp
deleted file mode 100644
index ef4c284f576..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/server.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(BiDirectional, server, "$Id$")
-
-const char *ior_output_file = 0;
-int no_iterations = 10;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'i':
- no_iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-i <no_iterations>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i *server_impl = 0;
-
- ACE_NEW_THROW_EX (server_impl,
- Simple_Server_i (orb.in (),
- no_iterations),
- CORBA::NO_MEMORY ());
-
- PortableServer::ServantBase_var owner_transfer (server_impl);
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("simple_server");
-
- child_poa->activate_object_with_id (id.in (),
- server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- child_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Run the event loop
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test.idl b/TAO/tests/BiDirectional_DelayedUpcall/test.idl
deleted file mode 100644
index 47ede657b9a..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-interface Callback
-{
- oneway void shutdown ();
- // A safe way to shutdown the client, using either clean shutdowns
- // or "catastrophic failures".
-
- void callback_method ();
- // A simple remote call
-
-};
-
-interface Simple_Server
-{
- long test_method (in boolean do_callback);
- // Just call a method on the server,
-
- void callback_object (in Callback cb);
- // send the callback object to the server
-
- oneway void shutdown ();
- // A safe way to shutdown the server, it is a oneway function so we
- // will never get a COMM_FAILURE error
-};
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp b/TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp
deleted file mode 100644
index fceb705f1cc..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test_i.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "tao/Thread_Lane_Resources.h"
-#include "ace/Reactor.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(BiDirectional_NestedUpcall, test_i, "$Id$")
-
-void
-Callback_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Performing clean shutdown\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Callback_i::callback_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Callback method called \n"));
-}
-
-
-// ****************************************************************
-
-int
-Simple_Server_i::handle_timeout (const ACE_Time_Value &,
- const void *)
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("About to make a remote call in the Upcall \n")));
-
- for (int times = 0;
- times < this->no_iterations_;
- ++times)
- {
- this->callback_->callback_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) The cache has grown, aborting ..\n"));
-
- ACE_OS::abort ();
- }
- }
-
- this->callback_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return 0;
-}
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (do_callback)
- {
- // Scheduling ourselves for doing the callbacks
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Scheduling for callback\n")));
-
- if (this->orb_->orb_core ()->reactor ()->schedule_timer (this,
- 0,
- ACE_Time_Value (1)) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Can't schedule timers, aborting ..\n"));
-
- ACE_OS::abort ();
- }
- }
-
- return 0;
-}
-
-void
-Simple_Server_i::callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Store the callback object
- this->callback_ = Callback::_duplicate (callback);
-}
-
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (false ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test_i.h b/TAO/tests/BiDirectional_DelayedUpcall/test_i.h
deleted file mode 100644
index c09b83fe688..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test_i.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/BiDirectional
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_BIDIRECTIONAL_TEST_I_H
-#define TAO_BIDIRECTIONAL_TEST_I_H
-
-#include "testS.h"
-#include "ace/Event_Handler.h"
-
-class Callback_i : public virtual POA_Callback
-{
- // = TITLE
- // A callback object to the "client"
- //
- // = DESCRIPTION
- // To test that the server can call the client on the same
- // connection that was established by the client
- //
-public:
- Callback_i (CORBA::ORB_ptr orb);
- // ctor
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Safe way to shutdown
-
- void callback_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // The callback method
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-class Simple_Server_i : public virtual POA_Simple_Server, ACE_Event_Handler
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb, int no_iterations);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual int handle_timeout (const ACE_Time_Value &current_time,
- const void *act = 0);
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- int flag_;
- // Flag to indicate, whether we are ready for a remote call.
-
- Callback_var callback_;
- // Callback Object
-
- int no_iterations_;
- // Number of times the callback needs to be called
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_BIDIRECTIONAL_TEST_I_H */
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/test_i.i b/TAO/tests/BiDirectional_DelayedUpcall/test_i.i
deleted file mode 100644
index 799be9fdcbe..00000000000
--- a/TAO/tests/BiDirectional_DelayedUpcall/test_i.i
+++ /dev/null
@@ -1,17 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Callback_i::Callback_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb,
- int no_iterations)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- flag_ (0),
- callback_ (0),
- no_iterations_ (no_iterations)
-{
-}
diff --git a/TAO/tests/BiDirectional_MultipleORB/.cvsignore b/TAO/tests/BiDirectional_MultipleORB/.cvsignore
deleted file mode 100644
index 96882f0dbca..00000000000
--- a/TAO/tests/BiDirectional_MultipleORB/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-destroy
diff --git a/TAO/tests/BiDirectional_MultipleORB/README b/TAO/tests/BiDirectional_MultipleORB/README
deleted file mode 100644
index 2d26bcc817e..00000000000
--- a/TAO/tests/BiDirectional_MultipleORB/README
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id$
-
-This is a test that creates a birectional GIOP policy for a POA and then
-attempts to repeat this, after destructing and re-creating the ORB. This used to
-fail by breaking an assertion, because the second ORB was tryig to register a policy
-validator object instance, which lingered since the time the first ORB was created.
-
-The validators are chained in a linked list, and any attempt to register a new one,
-which already points to another, is considered an error:
-
-ACE_ASSERT: (24189|4143901376) file Policy_Validator.cpp, line 28 assertion failed for 'validator->next_ == 0'.Aborting...
-
-In other instances it broke with SEGV, when trying to access an previously deleted
-bi-dir policy validator.
-
-For additional detail reffer to RT4667 and RT4672.
-
-Start the test like this:
-
-$ destroy
-
-It should complete ok
-
diff --git a/TAO/tests/BiDirectional_MultipleORB/destroy.cpp b/TAO/tests/BiDirectional_MultipleORB/destroy.cpp
deleted file mode 100644
index d4b0af3a3b9..00000000000
--- a/TAO/tests/BiDirectional_MultipleORB/destroy.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/BiDir_Multiple_ORB
-//
-// = FILENAME
-// destroy.cpp
-//
-// = DESCRIPTION
-// Modified ORB destruction test.
-//
-// = AUTHOR
-// Andrew Schnable <Andrew.Schnable@veritas.com>
-// Iliyan Jeliazkov <jeliazkov_i@ociweb.com>
-//
-//=========================================================================
-
-#include "tao/corba.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-
-ACE_RCSID(BiDir_Multiple_ORB, destroy, "$Id$")
-
-int
-test_with_bidir_poa (int argc,
- char **argv,
- const char *orb_name,
- int destroy_orb)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, orb_name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (destroy_orb)
- {
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception raised");
- ACE_CHECK_RETURN (-1);
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- int result = 0;
-
- for (int i=0; i<10; i++)
- {
- result = test_with_bidir_poa (argc, argv, "poa_1", 1);
- ACE_ASSERT (result == 0);
-
- result = test_with_bidir_poa (argc, argv, "poa_2", 1);
- ACE_ASSERT (result == 0);
- }
- ACE_DEBUG ((LM_DEBUG, "Completed OK\n"));
- return result;
-}
diff --git a/TAO/tests/BiDirectional_MultipleORB/destroy.mpc b/TAO/tests/BiDirectional_MultipleORB/destroy.mpc
deleted file mode 100644
index b8dd7761667..00000000000
--- a/TAO/tests/BiDirectional_MultipleORB/destroy.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoserver, anytypecode, bidir_giop {
- exename = destroy
- Source_Files {
- destroy.cpp
- }
-}
-
diff --git a/TAO/tests/BiDirectional_MultipleORB/run_test.pl b/TAO/tests/BiDirectional_MultipleORB/run_test.pl
deleted file mode 100755
index cf56e4473d7..00000000000
--- a/TAO/tests/BiDirectional_MultipleORB/run_test.pl
+++ /dev/null
@@ -1,21 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$CL = new PerlACE::Process ("destroy");
-
-$client = $CL->SpawnWaitKill (10);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/BiDirectional_NestedUpcall/.cvsignore b/TAO/tests/BiDirectional_NestedUpcall/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc b/TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc
deleted file mode 100644
index abcf650df1b..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/BiDir_NestedUpcall.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, minimum_corba, bidir_giop {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver, minimum_corba, bidir_giop {
- after += *Server
- Source_Files {
- test_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/BiDirectional_NestedUpcall/README b/TAO/tests/BiDirectional_NestedUpcall/README
deleted file mode 100644
index c40ad7424fd..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/README
+++ /dev/null
@@ -1,7 +0,0 @@
-# $Id$
-
-This test is similar to the $TAO_ROOT/tests/BiDirectional test. The
-only difference being that the server as a part of the upcall sends a
-bunch of remote calls, to show some nested upcall behaviour.
-
-
diff --git a/TAO/tests/BiDirectional_NestedUpcall/client.cpp b/TAO/tests/BiDirectional_NestedUpcall/client.cpp
deleted file mode 100644
index 184e7ebda37..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/client.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/High_Res_Timer.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(BiDirectional, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-void do_nothing (void)
-{
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Callback_i *callback_impl = 0;
- ACE_NEW_THROW_EX (callback_impl,
- Callback_i (orb.in ()),
- CORBA::NO_MEMORY ());
-
- PortableServer::ServantBase_var owner_transfer(callback_impl);
-
- Callback_var callback =
- callback_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Send the calback object to the server
- server->callback_object (callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Call the client that will make remote calls
-
- CORBA::Long r =
- server->test_method (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d ",
- r));
- }
-
- // Shutdown the server
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional_NestedUpcall/run_test.pl b/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
deleted file mode 100755
index 8137e525c9f..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::Process ("server", "-o test.ior -i 100");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/BiDirectional_NestedUpcall/server.cpp b/TAO/tests/BiDirectional_NestedUpcall/server.cpp
deleted file mode 100644
index ef4c284f576..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/server.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(BiDirectional, server, "$Id$")
-
-const char *ior_output_file = 0;
-int no_iterations = 10;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'i':
- no_iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-i <no_iterations>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i *server_impl = 0;
-
- ACE_NEW_THROW_EX (server_impl,
- Simple_Server_i (orb.in (),
- no_iterations),
- CORBA::NO_MEMORY ());
-
- PortableServer::ServantBase_var owner_transfer (server_impl);
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("simple_server");
-
- child_poa->activate_object_with_id (id.in (),
- server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- child_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Run the event loop
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/BiDirectional_NestedUpcall/test.idl b/TAO/tests/BiDirectional_NestedUpcall/test.idl
deleted file mode 100644
index 47ede657b9a..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-interface Callback
-{
- oneway void shutdown ();
- // A safe way to shutdown the client, using either clean shutdowns
- // or "catastrophic failures".
-
- void callback_method ();
- // A simple remote call
-
-};
-
-interface Simple_Server
-{
- long test_method (in boolean do_callback);
- // Just call a method on the server,
-
- void callback_object (in Callback cb);
- // send the callback object to the server
-
- oneway void shutdown ();
- // A safe way to shutdown the server, it is a oneway function so we
- // will never get a COMM_FAILURE error
-};
diff --git a/TAO/tests/BiDirectional_NestedUpcall/test_i.cpp b/TAO/tests/BiDirectional_NestedUpcall/test_i.cpp
deleted file mode 100644
index d4caa76da5e..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/test_i.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "tao/Thread_Lane_Resources.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(BiDirectional_NestedUpcall, test_i, "$Id$")
-
-void
-Callback_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Performing clean shutdown\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Callback_i::callback_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Callback method called \n"));
-}
-
-
-// ****************************************************************
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (do_callback)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("About to make a remote call in the Upcall \n")));
-
- for (int times = 0;
- times < this->no_iterations_;
- ++times)
- {
- this->callback_->callback_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) The cache has grown, aborting ..\n"));
-
- ACE_OS::abort ();
- }
- }
- }
-
- return 0;
-}
-
-void
-Simple_Server_i::callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Store the callback object
- this->callback_ = Callback::_duplicate (callback);
-}
-
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/BiDirectional_NestedUpcall/test_i.h b/TAO/tests/BiDirectional_NestedUpcall/test_i.h
deleted file mode 100644
index 08795309e7a..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/test_i.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/BiDirectional
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_BIDIRECTIONAL_TEST_I_H
-#define TAO_BIDIRECTIONAL_TEST_I_H
-
-#include "testS.h"
-
-class Callback_i : public virtual POA_Callback
-{
- // = TITLE
- // A callback object to the "client"
- //
- // = DESCRIPTION
- // To test that the server can call the client on the same
- // connection that was established by the client
- //
-public:
- Callback_i (CORBA::ORB_ptr orb);
- // ctor
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Safe way to shutdown
-
- void callback_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // The callback method
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-class Simple_Server_i : public virtual POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb, int no_iterations);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Boolean do_callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void callback_object (Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- int flag_;
- // Flag to indicate, whether we are ready for a remote call.
-
- Callback_var callback_;
- // Callback Object
-
- int no_iterations_;
- // Number of times the callback needs to be called
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_BIDIRECTIONAL_TEST_I_H */
diff --git a/TAO/tests/BiDirectional_NestedUpcall/test_i.i b/TAO/tests/BiDirectional_NestedUpcall/test_i.i
deleted file mode 100644
index 799be9fdcbe..00000000000
--- a/TAO/tests/BiDirectional_NestedUpcall/test_i.i
+++ /dev/null
@@ -1,17 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Callback_i::Callback_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb,
- int no_iterations)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- flag_ (0),
- callback_ (0),
- no_iterations_ (no_iterations)
-{
-}
diff --git a/TAO/tests/Big_AMI/Big_AMI.mpc b/TAO/tests/Big_AMI/Big_AMI.mpc
deleted file mode 100644
index 2493ddfb825..00000000000
--- a/TAO/tests/Big_AMI/Big_AMI.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging, ami {
- Source_Files {
- ami_test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, messaging, ami {
- exename = client
- after += *Server
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Big_AMI/README b/TAO/tests/Big_AMI/README
deleted file mode 100644
index 425c477cee9..00000000000
--- a/TAO/tests/Big_AMI/README
+++ /dev/null
@@ -1,18 +0,0 @@
-# $Id$
-
-Description:
-This is a simple test for testing big AMI calls.
-
-At the moment we do very huge AMI calls, then the send
-could block at transport level. At that moment the data we want
-to send if buffered and we should return control to the application
-without waiting until all data is send. We test this by doing
-several big AMI calls and check whether we didn't receive any
-replies, the replies should return at the moment we just run
-the ORB but not between the AMI calls themselves.
-
-This problem will not appear on fast systems that have client
-and server locally, it will appear when client and server are
-on different boxes but that is something we don't test with our
-normal builds.
-
diff --git a/TAO/tests/Big_AMI/ami_test.idl b/TAO/tests/Big_AMI/ami_test.idl
deleted file mode 100644
index 990a202cda5..00000000000
--- a/TAO/tests/Big_AMI/ami_test.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-
-//=============================================================================
-/**
- * @file ami_test.idl
- *
- * $Id$
- *
- * IDL description of the AMI Test interface
- *
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-
-module A
- {
- /// The message type, just used to send a lot of data on each
- /// request
- typedef sequence<octet> Payload;
-
- interface AMI_Test
- {
- long foo (out long out_l,
- in long in_l,
- in string in_str,
- in Payload the_payload);
-
- oneway void shutdown ();
- };
- };
diff --git a/TAO/tests/Big_AMI/ami_test_i.cpp b/TAO/tests/Big_AMI/ami_test_i.cpp
deleted file mode 100644
index 60f2c7559f3..00000000000
--- a/TAO/tests/Big_AMI/ami_test_i.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-
-//=============================================================================
-/**
- * @file ami_test_i.cpp
- *
- * $Id$
- *
- * Implementation of the AMI Test interface.
- *
- *
- * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "ami_test_i.h"
-#include "tao/debug.h"
-
-ACE_RCSID(AMI, ami_test_i, "$Id$")
-
-AMI_Test_i::AMI_Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Long
-AMI_Test_i::foo (CORBA::Long_out out_l,
- CORBA::Long in_l,
- const char* in_str,
- const A::Payload &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- out_l = 931233;
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "%N:%l:(%P:%t):AMI_Test_i::foo: %d %s\n",
- in_l,
- in_str));
-
- return 931234;
-}
-
-void
-AMI_Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/Big_AMI/ami_test_i.h b/TAO/tests/Big_AMI/ami_test_i.h
deleted file mode 100644
index d61bf0db80f..00000000000
--- a/TAO/tests/Big_AMI/ami_test_i.h
+++ /dev/null
@@ -1,47 +0,0 @@
-
-//=============================================================================
-/**
- * @file ami_test_i.h
- *
- * $Id$
- *
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#ifndef TAO_AMI_TEST_I_H
-#define TAO_AMI_TEST_I_H
-
-#include "ami_testS.h"
-
-/**
- * @class AMI_Test_i
- *
- * @brief AMI Test implementation
- *
- * Implements the AMI_Test interface in test.idl
- */
-class AMI_Test_i : public POA_A::AMI_Test
-{
-public:
- /// ctor
- AMI_Test_i (CORBA::ORB_ptr orb);
-
- // The AMI_Test methods.
- CORBA::Long foo (CORBA::Long_out out_l,
- CORBA::Long in_l,
- const char* in_str,
- const A::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-
-#endif /* TAO_AMI_TEST_I_H */
diff --git a/TAO/tests/Big_AMI/client.cpp b/TAO/tests/Big_AMI/client.cpp
deleted file mode 100644
index 23391b5b797..00000000000
--- a/TAO/tests/Big_AMI/client.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-
-//=============================================================================
-/**
- * @file client.cpp
- *
- * $Id$
- *
- * A very simple client which uses the AMI callback model.
- *
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-//=============================================================================
-
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-#include "ami_testS.h"
-
-ACE_RCSID (AMI,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 5;
-int shutdown_flag = 0;
-int debug = 1;
-CORBA::ULong payload_size = 128000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "db:k:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd':
- debug = 1;
- break;
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'x':
- shutdown_flag = 1;
- break;
- case 'b':
- payload_size = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "-b <payload size> "
- "-x "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Handler : public POA_A::AMI_AMI_TestHandler
-{
-public:
- /// Constructor.
- Handler (void) : reply_count_ (0) {};
-
- /// Destructor.
- ~Handler (void) {};
-
- /// Get the reply count
- long reply_count (void) const
- {
- return reply_count_.value ();
- }
-
- void foo (CORBA::Long ami_return_val,
- CORBA::Long out_l
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ++reply_count_;
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <foo> called: result <%d>, out_arg <%d>\n",
- ami_return_val,
- out_l));
- }
- };
-
- void foo_excep (::Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ++reply_count_;
-
- ACE_DEBUG ((LM_DEBUG,
- "Callback method <foo_excep> called: \n"
- "Testing proper exception handling ...\n"));
- ACE_TRY
- {
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG,
- "... caught the wrong exception -> ERROR\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
- };
-
-private:
- ACE_Atomic_Op <TAO_SYNCH_MUTEX, long> reply_count_;
-};
-
-int
-main (int argc, char *argv[])
-{
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object_var =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa_var =
- PortableServer::POA::_narrow (object_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager_var =
- poa_var->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager_var->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // We reuse the object_var smart pointer!
- object_var = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- A::AMI_Test_var ami_test_var =
- A::AMI_Test::_narrow (object_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ami_test_var.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- // Instantiate the ReplyHandler and register that with the POA.
- Handler handler;
- A::AMI_AMI_TestHandler_var the_handler_var =
- handler._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Long l = 931247;
- A::Payload payload (payload_size);
- payload.length (payload_size);
-
- for (CORBA::ULong j = 0; j != payload_size; ++j)
- {
- payload[j] = j % 256;
- }
-
- for (ssize_t ni = 0; ni < niterations; ni++)
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Sending asynch message: %d\n",
- ni));
- }
-
- ami_test_var->sendc_foo (the_handler_var.in (),
- l,
- "Let's talk AMI.",
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // We are just sending all requests, but we shouldn't get any replies
- // until we run the orb or do a real synchronous call, so check whether
- // we didn't get any reply until this moment
- if (handler.reply_count () > 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Got a reply during sending asynchronous calls\n"),
- 1);
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "<%d> Asynchronous methods issued\n",
- niterations));
- }
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Issuing a synchronous method to collect the AMI replies\n"));
- }
-
- CORBA::Long number = ami_test_var->foo (l,
- l,
- "Let's talk SMI.",
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Received the following number: %d\n",
- number));
- }
-
- if (shutdown_flag)
- {
- ami_test_var->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_var->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Big_AMI/run_test.pl b/TAO/tests/Big_AMI/run_test.pl
deleted file mode 100755
index 94adacdeef7..00000000000
--- a/TAO/tests/Big_AMI/run_test.pl
+++ /dev/null
@@ -1,52 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$debug_level = '0';
-$iterations = '10';
-$payload = '256000';
-
-foreach $i (@ARGV) {
- if ($i eq '-debug') {
- $debug_level = '1';
- }
-}
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBdebuglevel $debug_level -d -o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBdebuglevel $debug_level -d -o $iorfile");
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -i $iterations -x -b $payload");
-
-$client = $CL->SpawnWaitKill (60);
-$server = $SV->WaitKill (10);
-
-unlink $iorfile;
-
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
-
diff --git a/TAO/tests/Big_AMI/server.cpp b/TAO/tests/Big_AMI/server.cpp
deleted file mode 100644
index b2868cd1e58..00000000000
--- a/TAO/tests/Big_AMI/server.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-
-//=============================================================================
-/**
- * @file server.cpp
- *
- * $Id$
- *
- * Implementation of the server.
- *
- *
- * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
- * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
- */
-//=============================================================================
-
-
-#include "ami_test_i.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(AMI, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'd':
- TAO_debug_level++;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- AMI_Test_i ami_test_i (orb.in ());
-
- A::AMI_Test_var ami_test_var =
- ami_test_i._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (ami_test_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Big_Oneways/.cvsignore b/TAO/tests/Big_Oneways/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Big_Oneways/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Big_Oneways/Big_Oneways.mpc b/TAO/tests/Big_Oneways/Big_Oneways.mpc
deleted file mode 100644
index 5cf458a0b1e..00000000000
--- a/TAO/tests/Big_Oneways/Big_Oneways.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Coordinator.cpp
- Session_Control.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver {
- after += *Server
- Source_Files {
- Peer.cpp
- Session.cpp
- Session_Task.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Big_Oneways/Coordinator.cpp b/TAO/tests/Big_Oneways/Coordinator.cpp
deleted file mode 100644
index 6b6b332a9cc..00000000000
--- a/TAO/tests/Big_Oneways/Coordinator.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// $Id$
-//
-#include "Coordinator.h"
-
-ACE_RCSID(Big_Oneways, Coordinator, "$Id$")
-
-Coordinator::Coordinator (CORBA::ULong peer_count)
- : peers_ (0)
- , peer_count_ (0)
- , peer_max_ (peer_count)
-{
- ACE_NEW (this->peers_, Test::Peer_var[this->peer_max_]);
-}
-
-Coordinator::~Coordinator (void)
-{
- delete[] this->peers_;
-}
-
-int
-Coordinator::has_all_peers (void) const
-{
- return this->peer_count_ == this->peer_max_;
-}
-
-void
-Coordinator::create_session_list (Test::Session_Control_ptr session_control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- Test::Session_List &session_list
- ACE_ENV_ARG_DECL)
-{
- session_list.length (this->peer_count_);
- CORBA::ULong count = 0;
- for (Test::Peer_var *i = this->peers_;
- i != this->peers_ + this->peer_count_;
- ++i)
- {
- session_list[count++] =
- (*i)->create_session (session_control,
- payload_size,
- thread_count,
- message_count,
- this->peer_count_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-Coordinator::shutdown_all_peers (ACE_ENV_SINGLE_ARG_DECL)
-{
- for (Test::Peer_var *i = this->peers_;
- i != this->peers_ + this->peer_count_;
- ++i)
- {
- ACE_TRY
- {
- (*i)->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Coordinator::shutdown, ignored");
- }
- ACE_ENDTRY;
- }
-}
-
-void
-Coordinator::add_peer (Test::Peer_ptr peer
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->peer_count_ >= this->peer_max_)
- return;
-
- this->peers_[this->peer_count_++] =
- Test::Peer::_duplicate (peer);
-}
diff --git a/TAO/tests/Big_Oneways/Coordinator.h b/TAO/tests/Big_Oneways/Coordinator.h
deleted file mode 100644
index 7879e47752a..00000000000
--- a/TAO/tests/Big_Oneways/Coordinator.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_COORDINATOR_H
-#define BIG_ONEWAYS_COORDINATOR_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Coordinator interface
-class Coordinator
- : public virtual POA_Test::Coordinator
-{
-public:
- /// Constructor
- Coordinator (CORBA::ULong peer_count);
-
-
- /// Check if all the peers have registered already
- int has_all_peers (void) const;
-
- /// Check a session on each peer
- void create_session_list (Test::Session_Control_ptr session_control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- Test::Session_List &session_list
- ACE_ENV_ARG_DECL);
-
- /// Shutdown all the peers
- void shutdown_all_peers (ACE_ENV_SINGLE_ARG_DECL);
-
- // = The skeleton methods
- virtual void add_peer (Test::Peer_ptr peer
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- /// Protected Destructor, call _remove_ref() instead
- virtual ~Coordinator (void);
-
-private:
- /// Store a reference to each peer
- Test::Peer_var *peers_;
-
- /// Current number of elements in the array
- size_t peer_count_;
-
- /// Array's capacity
- size_t peer_max_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_COORDINATOR_H */
diff --git a/TAO/tests/Big_Oneways/Peer.cpp b/TAO/tests/Big_Oneways/Peer.cpp
deleted file mode 100644
index b93f0e3f7b2..00000000000
--- a/TAO/tests/Big_Oneways/Peer.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// $Id$
-//
-#include "Peer.h"
-#include "Session.h"
-
-ACE_RCSID(Big_Oneways, Peer, "$Id$")
-
-Peer::Peer (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Peer::~Peer (void)
-{
-}
-
-Test::Session_ptr
-Peer::create_session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Session *session_impl = 0;
- ACE_NEW_THROW_EX (session_impl,
- Session (control,
- payload_size,
- thread_count,
- message_count,
- peer_count),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (Test::Session::_nil ());
- PortableServer::ServantBase_var transfer_ownership (session_impl);
-
- return session_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Peer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Peer::shutdown, waiting for threads\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Peer::shutdown, shutting down ORB\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Big_Oneways/Peer.h b/TAO/tests/Big_Oneways/Peer.h
deleted file mode 100644
index 2a142889512..00000000000
--- a/TAO/tests/Big_Oneways/Peer.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_PEER_H
-#define BIG_ONEWAYS_PEER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Peer interface
-class Peer
- : public virtual POA_Test::Peer
-{
-public:
- /// Constructor
- Peer (CORBA::ORB_ptr orb);
-
- /// Destructor
- virtual ~Peer (void);
-
- // = The skeleton methods
- virtual Test::Session_ptr create_session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Keep a pointer to the ORB to shutdown cleanly
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_PEER_H */
diff --git a/TAO/tests/Big_Oneways/README b/TAO/tests/Big_Oneways/README
deleted file mode 100644
index ed389e9009c..00000000000
--- a/TAO/tests/Big_Oneways/README
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
-
-@page Big_Oneways Test README File
-
- This is a stress test for the non-blocking I/O features in the
-ORB. The test connects multiple peer processes together. Each
-process sends messages to all its peers, using multiple threads to
-generate the messages. Without non-blocking I/O the system soon
-deadlocks.
-
- This is part of the regression testsuite for:
-
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=132
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Big_Oneways/Session.cpp b/TAO/tests/Big_Oneways/Session.cpp
deleted file mode 100644
index e6f77c212c6..00000000000
--- a/TAO/tests/Big_Oneways/Session.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-//
-// $Id$
-//
-#include "Session.h"
-#include "tao/debug.h"
-
-ACE_RCSID(Big_Oneways, Session, "$Id$")
-
-Session::Session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count)
- : control_ (Test::Session_Control::_duplicate (control))
- , running_ (0)
- , payload_size_ (payload_size)
- , thread_count_ (thread_count)
- , message_count_ (message_count)
- , active_thread_count_ (0)
- , expected_messages_ (thread_count * message_count * (peer_count - 1))
- , task_ (this)
- , barrier_ (thread_count + 1)
-{
-}
-
-Session::~Session (void)
-{
-}
-
-int
-Session::svc (void)
-{
- this->barrier_.wait ();
- CORBA::ULong i = 0;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Use the same payload over and over
- Test::Payload payload (this->payload_size_);
- payload.length (this->payload_size_);
-
- for (CORBA::ULong j = 0; j != this->payload_size_; ++j)
- {
- payload[j] = j % 256;
- }
-
- // Get the number of peers just once.
- CORBA::ULong session_count =
- this->other_sessions_.length ();
-
- this->validate_connections (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (; i != this->message_count_; ++i)
- {
-#if 0
- if (i % 500 == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session::svc, "
- "sending message %d\n",
- i));
- }
-#endif /* 0 */
- for (CORBA::ULong j = 0; j != session_count; ++j)
- {
- this->other_sessions_[j]->receive_payload (payload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
-
- {
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
- this->active_thread_count_--;
- if (this->more_work ())
- {
- return 0;
- }
- }
- this->terminate (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Session::svc, "
- "send %d messages out of %d\n",
- i, message_count_));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Session::svc - ");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-void
-Session::validate_connections (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::ULong session_count =
- this->other_sessions_.length ();
- for (CORBA::ULong i = 0; i != 100; ++i)
- {
- for (CORBA::ULong j = 0; j != session_count; ++j)
- {
- ACE_TRY
- {
- this->other_sessions_[j]->ping (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
- }
- }
-}
-
-void
-Session::start (const Test::Session_List &other_sessions
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Already_Running,
- Test::No_Peers))
-{
- if (other_sessions.length () == 0)
- ACE_THROW (Test::No_Peers ());
-
- {
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- if (this->running_)
- ACE_THROW (Test::Already_Running ());
-
- this->other_sessions_ = other_sessions;
-
- for (CORBA::ULong i = 0; i != this->thread_count_; ++i)
- {
- // Increase the reference count because the new thread will have
- // access to this object....
- ACE_TRY
- {
- this->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (this->task_.activate (
- THR_NEW_LWP | THR_JOINABLE, 1, 1) == -1)
- {
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- this->running_ = 1;
- this->active_thread_count_++;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Session::start, ignored");
- }
- ACE_ENDTRY;
- }
-
- if (this->active_thread_count_ != this->thread_count_)
- return;
- }
-
- this->validate_connections (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->barrier_.wait ();
-
- if (this->running_ != 0)
- return;
-
- /// None of the threads are running, this session is useless at
- /// this point, report the problem and destroy the local objects
- this->terminate (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Session::ping (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Session::receive_payload (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (the_payload.length () != this->payload_size_)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session::receive_payload, "
- "unexpected payload size (%d != %d)\n",
- the_payload.length (), this->payload_size_));
- }
-
- {
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- this->expected_messages_--;
-
-#if 0
- int verbose = 0;
- verbose = this->expected_messages_ % 500 == 0;
- if (this->expected_messages_ < 500)
- verbose = (this->expected_messages_ % 100 == 0);
- if (this->expected_messages_ < 100)
- verbose = (this->expected_messages_ % 10 == 0);
- if (this->expected_messages_ < 5)
- verbose = 1;
-
- if (verbose)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session::receive_payload, "
- "%d messages to go\n",
- this->expected_messages_));
- }
-#endif /* 0 */
-
- if (this->more_work ())
- return;
- }
- this->terminate (1 ACE_ENV_ARG_PARAMETER);
-}
-
-
-void
-Session::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Make sure local resources are released
-
- PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var oid =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-Session::more_work (void) const
-{
- if (this->expected_messages_ > 0
- || this->active_thread_count_ > 0
- || this->running_ == 0)
- return 1;
-
- return 0;
-}
-
-void
-Session::terminate (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- // Make sure that global resources are released
- ACE_TRY_EX(GLOBAL)
- {
- this->control_->session_finished (success
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX(GLOBAL);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Session::terminate, ignored");
- }
- ACE_ENDTRY;
-
-}
diff --git a/TAO/tests/Big_Oneways/Session.h b/TAO/tests/Big_Oneways/Session.h
deleted file mode 100644
index ef408f81679..00000000000
--- a/TAO/tests/Big_Oneways/Session.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef BIG_ONEWAYS_SESSION_H
-#define BIG_ONEWAYS_SESSION_H
-
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-#include "Session_Task.h"
-
-#if defined(ACE_HAS_THREADS)
-# include "ace/Barrier.h"
-#else
-# include "ace/Null_Barrier.h"
-#endif /* ACE_HAS_THREADS */
-
-/// Implement the Test::Session interface
-class Session
- : public virtual POA_Test::Session
-{
-public:
- /// Constructor
- Session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count);
-
- /// Destructor
- virtual ~Session (void);
-
- /// Run one of the experiment threads
- int svc (void);
-
- // = The skeleton methods
- virtual void start (const Test::Session_List &other_sessions
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Already_Running,
- Test::No_Peers));
-
- virtual void ping (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_payload (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Helper function used to report any problems and destroy local
- /// resources
- void terminate (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (());
-
- /// Return 1 if all the work in this session has been completed
- int more_work (void) const;
-
- /// Make sure that all threads have connections avaiable to the
- /// other sessions.
- void validate_connections (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// Synchronize the internal state
- ACE_SYNCH_MUTEX mutex_;
-
- /// Keep a reference to the Session_Control, this is used to report
- /// when the test finishes.
- Test::Session_Control_var control_;
-
- /// Keep track of wether the test is running.
- int running_;
-
- /// The other session objects participating in the test
- Test::Session_List other_sessions_;
-
- /// Size of each message
- CORBA::ULong payload_size_;
-
- /// Number of threads
- CORBA::ULong thread_count_;
-
- /// Number of messages to send
- CORBA::ULong message_count_;
-
- /// The number of threads currently running, when this reaches 0 the
- /// session destroys itself.
- CORBA::ULong active_thread_count_;
-
- /// Number of messages expected
- CORBA::ULong expected_messages_;
-
- /// Helper class to run svc() in a separate thread
- Session_Task task_;
-
- /// Barrier to start all threads simultaenously
-#if defined(ACE_HAS_THREADS)
- typedef ACE_Thread_Barrier Barrier;
-#else
- typedef ACE_Null_Barrier Barrier;
-#endif /* ACE_HAS_THREADS */
- Barrier barrier_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* BIG_ONEWAYS_SESSION_H */
diff --git a/TAO/tests/Big_Oneways/Session_Control.cpp b/TAO/tests/Big_Oneways/Session_Control.cpp
deleted file mode 100644
index 12f3c2d7566..00000000000
--- a/TAO/tests/Big_Oneways/Session_Control.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// $Id$
-//
-#include "Session_Control.h"
-
-ACE_RCSID(Big_Oneways, Session_Control, "$Id$")
-
-Session_Control::Session_Control (CORBA::ULong session_count)
- : session_count_ (session_count)
- , success_ (1)
-{
-}
-
-int
-Session_Control::all_sessions_finished (void) const
-{
- return this->session_count_ == 0;
-}
-
-Session_Control::~Session_Control (void)
-{
- if (this->session_count_ == 0 && this->success_)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session_Control::~Session_control, "
- "good, all sessions did finish\n"));
- }
- else if (session_count_ != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session_Control::~Session_control, "
- "%d sessions did not finish\n",
- this->session_count_));
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session_Control::~Session_control, "
- "some sessions failed\n"));
- }
-}
-
-void
-Session_Control::session_finished (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- if (this->session_count_ == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session_Control::session_finished, "
- "unexpected callback\n"));
- }
- if (success == 0)
- this->success_ = 0;
-
- this->session_count_--;
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session_Control::session_finished, "
- "%d sessions to go\n",
- this->session_count_));
- if (session_count_ == 0)
- {
- PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var oid =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
-}
diff --git a/TAO/tests/Big_Oneways/Session_Control.h b/TAO/tests/Big_Oneways/Session_Control.h
deleted file mode 100644
index 2f0232be6d8..00000000000
--- a/TAO/tests/Big_Oneways/Session_Control.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_SESSION_CONTROL_H
-#define BIG_ONEWAYS_SESSION_CONTROL_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Session_Control interface
-class Session_Control
- : public virtual POA_Test::Session_Control
-{
-public:
- /// Constructor
- /**
- * @param session_count Number of session objects in the experiment.
- */
- Session_Control (CORBA::ULong session_count);
-
- /// Destructor
- virtual ~Session_Control (void);
-
- /// Return 1 when all sessions have finished
- int all_sessions_finished (void) const;
-
- // = The skeleton methods
- virtual void session_finished (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Synchronize the internal state
- ACE_SYNCH_MUTEX mutex_;
-
- /// The type of test
- CORBA::ULong session_count_;
-
- /// Set to falso if any session reported a failure
- CORBA::Boolean success_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_SESSION_CONTROL_H */
diff --git a/TAO/tests/Big_Oneways/Session_Task.cpp b/TAO/tests/Big_Oneways/Session_Task.cpp
deleted file mode 100644
index bd992a66e5d..00000000000
--- a/TAO/tests/Big_Oneways/Session_Task.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// $Id$
-//
-
-#include "Session_Task.h"
-#include "Session.h"
-
-ACE_RCSID(Big_Oneways, Session_Task, "$Id$")
-
-Session_Task::Session_Task (Session *session)
- : session_ (session)
-{
-}
-
-int
-Session_Task::svc (void)
-{
- return this->session_->svc ();
-}
diff --git a/TAO/tests/Big_Oneways/Session_Task.h b/TAO/tests/Big_Oneways/Session_Task.h
deleted file mode 100644
index 6f73ee069b0..00000000000
--- a/TAO/tests/Big_Oneways/Session_Task.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_SESSION_TASK_H
-#define BIG_ONEWAYS_SESSION_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Session;
-
-/// Implement a Task to run the experiments using multiple threads.
-class Session_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Session_Task (Session *session);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the test interface
- Session *session_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_SESSION_TASK_H */
diff --git a/TAO/tests/Big_Oneways/Test.idl b/TAO/tests/Big_Oneways/Test.idl
deleted file mode 100644
index 60065cf85fc..00000000000
--- a/TAO/tests/Big_Oneways/Test.idl
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /// The message type, just used to send a lot of data on each
- /// request
- typedef sequence<octet> Payload;
-
- /// A session is a single instance of the test
- interface Session;
- typedef sequence<Session> Session_List;
-
- /// A session control is used to determine if all the Session in an
- /// experiment have finished.
- /**
- * @param success If false then the session failed, the experiment
- * is successful only if all sessions finish successfully
- */
- interface Session_Control
- {
- void session_finished (in boolean success);
- };
-
- /// A Peer is used to create sessions
- interface Peer
- {
- /// Create a new session
- /**
- * @param payload_size The size of each message
- * @param thread_count The number of threads that each session
- * must create
- * @param message_count How many messages does each thread send.
- */
- Session create_session (in Session_Control control,
- in unsigned long payload_size,
- in unsigned long thread_count,
- in unsigned long message_count,
- in unsigned long peer_count);
-
- /// Shutdown the peer
- oneway void shutdown ();
- };
-
- /// The Session already has an experiment running.
- exception Already_Running {};
-
- /// The experiment requires at least two Sessions
- exception No_Peers {};
-
- interface Session
- {
- /// Start the test, send messages to all the peers
- /**
- * @param other_sessions The list of sessions participating in the
- * experiment, this list must not include the session
- * receiving the start() call.
- */
- void start (in Session_List other_sessions)
- raises (Already_Running, No_Peers);
-
- /// Ping the session, used to validate all connections
- void ping ();
-
- /// Receive the payload
- oneway void receive_payload (in Payload the_payload);
-
- /// Destroy the Session object
- void destroy ();
- };
-
- interface Coordinator
- {
- /// Add a new peer.
- /**
- * The coordinator starts the test by calling <send_oneways> on
- * all peers. How does it decide to do that is application
- * specific.
- */
- void add_peer (in Peer the_peer);
- };
-};
diff --git a/TAO/tests/Big_Oneways/client.cpp b/TAO/tests/Big_Oneways/client.cpp
deleted file mode 100644
index 13465fab43c..00000000000
--- a/TAO/tests/Big_Oneways/client.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// $Id$
-
-#include "Peer.h"
-#include "ace/Get_Opt.h"
-#include "ace/Thread_Manager.h"
-
-ACE_RCSID(Big_Oneways, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic got a nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Coordinator_var coordinator =
- Test::Coordinator::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (coordinator.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
- Peer *peer_impl = 0;
- ACE_NEW_RETURN (peer_impl,
- Peer (orb.in ()),
- 1);
- PortableServer::ServantBase_var peer_owner_transfer(peer_impl);
-
- Test::Peer_var peer =
- peer_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- coordinator->add_peer (peer.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for all the threads.
- ACE_Thread_Manager::instance ()->wait ();
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Big_Oneways/run_test.pl b/TAO/tests/Big_Oneways/run_test.pl
deleted file mode 100755
index 45175d43e98..00000000000
--- a/TAO/tests/Big_Oneways/run_test.pl
+++ /dev/null
@@ -1,88 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-use Getopt::Std;
-
-local ($opt_i, $opt_b);
-
-if (!getopts ('i:b:')) {
- print "Usage: run_test.pl [-b payload_size] [-i iterations]\n";
- exit 1;
-}
-
-my $server_args = " -p 3";
-if (defined $opt_i) {
- $server_args .= " -i ".$opt_i;
-}
-if (defined $opt_b) {
- $server_args .= " -b ".$opt_b;
-}
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-$status = 0;
-unlink $iorfile;
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior $server_args");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile $server_args");
-}
-$CL1 = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn ();
-$CL2->Spawn ();
-$CL3->Spawn ();
-
-$client1 = $CL1->WaitKill (300);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-$client2 = $CL2->WaitKill (300);
-
-if ($client2 != 0) {
- print STDERR "ERROR: client 2 returned $client2\n";
- $status = 1;
-}
-
-$client3 = $CL3->WaitKill (300);
-
-if ($client3 != 0) {
- print STDERR "ERROR: client 3 returned $client3\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Big_Oneways/server.cpp b/TAO/tests/Big_Oneways/server.cpp
deleted file mode 100644
index 9aa9d7a7522..00000000000
--- a/TAO/tests/Big_Oneways/server.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-// $Id$
-
-#include "Coordinator.h"
-#include "Session_Control.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Big_Oneways, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-CORBA::ULong peer_count = 4;
-CORBA::ULong payload_size = 1024;
-CORBA::ULong message_count = 1000;
-CORBA::ULong thread_count = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:p:b:i:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'p':
- peer_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'b':
- payload_size = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'i':
- message_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'n':
- thread_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-p <peer_count> "
- "-b <payload_size> "
- "-i <message_count> "
- "-n <thread_count> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic got a nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Coordinator *coordinator_impl = 0;
- ACE_NEW_RETURN (coordinator_impl,
- Coordinator (peer_count),
- 1);
-
- Test::Coordinator_var coordinator =
- coordinator_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (coordinator.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Waiting for peers . . . "));
- for (int i = 0;
- i != 60 && !coordinator_impl->has_all_peers ();
- ++i)
- {
- ACE_Time_Value tv (1, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_DEBUG ((LM_DEBUG, "done.\n"));
-
- if (!coordinator_impl->has_all_peers ())
- {
- ACE_ERROR ((LM_DEBUG,
- "ERROR: timeout, some peers failed to register\n"));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG, "Building session list . . . "));
-
- Session_Control *session_control_impl = 0;
- ACE_NEW_RETURN (session_control_impl,
- Session_Control (peer_count),
- 1);
-
- Test::Session_Control_var session_control =
- session_control_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Session_List session_list;
- coordinator_impl->create_session_list (session_control.in (),
- payload_size,
- thread_count,
- message_count,
- session_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (session_list.length () == peer_count);
-
- ACE_DEBUG ((LM_DEBUG, "done.\n"));
- ACE_DEBUG ((LM_DEBUG, "Giving start signal . . . "));
-
- CORBA::ULong j;
- for (j = 0; j != peer_count; ++j)
- {
- // Make a copy of the sessions, excluding the j-th element
- Test::Session_List other_sessions (peer_count - 1);
- other_sessions.length (peer_count - 1);
- CORBA::ULong count = 0;
- for (CORBA::ULong k = 0; k != peer_count; ++k)
- {
- if (k == j)
- continue;
- other_sessions[count++] =
- Test::Session::_duplicate (session_list[k]);
- }
-
- session_list[j]->start (other_sessions
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
-
- ACE_DEBUG ((LM_DEBUG ,"done\n"));
- ACE_DEBUG ((LM_DEBUG, "Waiting for sessions to finish. . . \n"));
- for (int k = 0;
- k != 300 && !session_control_impl->all_sessions_finished ();
- ++k)
- {
- ACE_Time_Value tv (1, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (!session_control_impl->all_sessions_finished ())
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: timeout waiting for sessions\n"));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG, "All sessions finished, destroy session list . . .\n"));
-
- for (j = 0; j != peer_count; ++j)
- {
- session_list[j]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
-
- ACE_DEBUG ((LM_DEBUG, "Shutdown all peers . . .\n"));
-
- coordinator_impl->shutdown_all_peers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Shutdown poa and orb . . .\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Big_Reply/.cvsignore b/TAO/tests/Big_Reply/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Big_Reply/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Big_Reply/Big_Reply.mpc b/TAO/tests/Big_Reply/Big_Reply.mpc
deleted file mode 100644
index 648403b35a4..00000000000
--- a/TAO/tests/Big_Reply/Big_Reply.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- after += *Client
- Source_Files {
- Big_Reply_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- Source_Files {
- TestC.cpp
- Client_Task.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Big_Reply/Big_Reply_i.cpp b/TAO/tests/Big_Reply/Big_Reply_i.cpp
deleted file mode 100644
index 40b9cca6846..00000000000
--- a/TAO/tests/Big_Reply/Big_Reply_i.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-//$Id$
-#include "Big_Reply_i.h"
-
-Big_Reply_i::Big_Reply_i (CORBA::ORB_ptr orb,
- CORBA::ULong len)
- : orb_ (orb),
- length_ (len)
-{
-}
-
-Big_Reply_i::~Big_Reply_i (void)
-{
- // no-op
-}
-
-Test::Octet_Seq *
-Big_Reply_i::get_big_reply (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Test::Octet_Seq_var reply_mesg =
- new Test::Octet_Seq (this->length_);
-
- reply_mesg->length (this->length_);
-
- return reply_mesg._retn ();
-}
-
-void
-Big_Reply_i::ping (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Big_Reply_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/Big_Reply/Big_Reply_i.h b/TAO/tests/Big_Reply/Big_Reply_i.h
deleted file mode 100644
index 8e580b23939..00000000000
--- a/TAO/tests/Big_Reply/Big_Reply_i.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// ===================================================================
-/**
- * @file Big_Reply_i.h
- *
- * $Id$
- *
- * @author Balachandran Natarajan <bala@cs.wustl.edu>
- **/
-// ===================================================================
-
-#ifndef TAO_TESTS_BIG_REPLY_I_H
-#define TAO_TESTS_BIG_REPLY_I_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Big_Reply interface
-/**
- * Simply return a Big_Reply
- */
-
-class Big_Reply_i
- : public virtual POA_Test::Big_Reply
-{
-public:
- /// Constructor
- Big_Reply_i (CORBA::ORB_ptr orb,
- CORBA::ULong length);
-
- ///Destructor
- virtual ~Big_Reply_i (void);
-
- // = The skeleton methods
- virtual Test::Octet_Seq *get_big_reply (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void ping (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Our local ORB ptr
- CORBA::ORB_ptr orb_;
-
- /// Length of the reply sequence
- CORBA::ULong length_;
-
- /// The reply message
- Test::Octet_Seq_var reply_message_;
-
-};
-
-#include /**/ "ace/post.h"
-
-#endif /*TAO_TESTS_BIG_REPLY_I_H*/
diff --git a/TAO/tests/Big_Reply/Client_Task.cpp b/TAO/tests/Big_Reply/Client_Task.cpp
deleted file mode 100644
index 63693d3240f..00000000000
--- a/TAO/tests/Big_Reply/Client_Task.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Big_Reply_ptr reply_gen,
- int event_count,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , reply_gen_ (Test::Big_Reply::_duplicate (reply_gen))
- , event_count_ (event_count)
-
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- // Make the connections ..
- this->validate_connection ();
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- // Now get the big replies..
- ACE_TRY
- {
- for (int i = 0; i != this->event_count_; ++i)
- {
- Test::Octet_Seq_var dummy =
- this->reply_gen_->get_big_reply (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception Caught \n");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
-
-void
-Client_Task::validate_connection (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Validating connection ..\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- // Try to setup a connection to the remote server, ignoring all the
- // exceptions that are expected (see bug 189 on why it is so). We
- // could use a a validate_connection for it . But we want this test
- // to work with Minimum CORBA builds too..
- for (int i = 0; i != 100; ++i)
- {
- ACE_TRY
- {
-
- this->reply_gen_->ping (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {}
- ACE_ENDTRY;
- }
-}
diff --git a/TAO/tests/Big_Reply/Client_Task.h b/TAO/tests/Big_Reply/Client_Task.h
deleted file mode 100644
index a619e7b8d5f..00000000000
--- a/TAO/tests/Big_Reply/Client_Task.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_REPLY_CLIENT_TASK_H
-#define BIG_REPLY_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Big_Reply_ptr receiver,
- CORBA::Long event_count,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
-
- /// Validate the connection
- void validate_connection (void);
-
-private:
-
- /// Reference to the test interface
- Test::Big_Reply_var reply_gen_;
-
- /// Number of remote calls
- int event_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_REPLY_CLIENT_TASK_H */
diff --git a/TAO/tests/Big_Reply/README b/TAO/tests/Big_Reply/README
deleted file mode 100644
index cc4ea07c8c9..00000000000
--- a/TAO/tests/Big_Reply/README
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-
-@page Muxing Test README File
-
- A stress test for receiving large replies. This test is a part
- of the bug 575 test suite. One of the problems that users have
- faced in a reactive configuration is that the clients have not
- been able to receive large replies from the server. This test
- actually tests that feature. This test will not work till we
- check in bug 575 fixes.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Big_Reply/Test.idl b/TAO/tests/Big_Reply/Test.idl
deleted file mode 100644
index 442d6a746be..00000000000
--- a/TAO/tests/Big_Reply/Test.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-//$Id$
-module Test
-{
-
- typedef sequence<octet> Octet_Seq;
-
- interface Big_Reply
- {
- /// Receive a big reply
- Octet_Seq get_big_reply ();
-
- /// Ping message
- void ping ();
-
- /// Shudown the remote ORB
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Big_Reply/client.cpp b/TAO/tests/Big_Reply/client.cpp
deleted file mode 100644
index 05651121792..00000000000
--- a/TAO/tests/Big_Reply/client.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Muxing, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Big_Reply_var reply_gen =
- Test::Big_Reply::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (reply_gen.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
-
- Client_Task client_task (reply_gen.in (),
- 10,
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Got all the replies...\n"));
-
- // Request the server to shutdown
- reply_gen->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Big_Reply/run_test.pl b/TAO/tests/Big_Reply/run_test.pl
deleted file mode 100755
index 3ff43b31c90..00000000000
--- a/TAO/tests/Big_Reply/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL->Spawn (60);
-
-$client = $CL->WaitKill (60);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Big_Reply/server.cpp b/TAO/tests/Big_Reply/server.cpp
deleted file mode 100644
index b09fbd74a0b..00000000000
--- a/TAO/tests/Big_Reply/server.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Big_Reply_i.h"
-#include "ace/OS_NS_stdio.h"
-
-
-ACE_RCSID(Big_Reply, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-// We can change this value if wanted..
-const CORBA::ULong data_size = 4000000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:s:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-i <no_iterations>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DEBUG ((LM_DEBUG, "Starting server\n"));
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Big_Reply_i *big_reply_gen;
-
- ACE_NEW_RETURN (big_reply_gen,
- Big_Reply_i (orb.in (),
- data_size),
- 1);
-
-
- PortableServer::ServantBase_var big_reply_owner_transfer(big_reply_gen);
-
- Test::Big_Reply_var big_reply =
- big_reply_gen->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (big_reply.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run ();
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "Ending server\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Big_Request_Muxing/.cvsignore b/TAO/tests/Big_Request_Muxing/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Big_Request_Muxing/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc b/TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc
deleted file mode 100644
index 5d5b10de0c1..00000000000
--- a/TAO/tests/Big_Request_Muxing/Big_Request_Muxing.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Payload_Receiver.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- TestC.cpp
- Client_Task.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Big_Request_Muxing/Client_Task.cpp b/TAO/tests/Big_Request_Muxing/Client_Task.cpp
deleted file mode 100644
index 385bf7f0bc5..00000000000
--- a/TAO/tests/Big_Request_Muxing/Client_Task.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(Big_Request_Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (ACE_Thread_Manager *thr_mgr,
- Test::Payload_Receiver_ptr payload_receiver,
- CORBA::Long event_count,
- CORBA::ULong event_size,
- CORBA::ORB_ptr orb,
- Messaging::SyncScope sync_scope,
- const ACE_CString & ident)
- : ACE_Task_Base (thr_mgr)
- , payload_receiver_ (Test::Payload_Receiver::_duplicate (payload_receiver))
- , event_count_ (event_count)
- , event_size_ (event_size)
- , orb_ (CORBA::ORB::_duplicate (orb))
- , sync_scope_ (sync_scope)
- , done_(false)
- , id_ (ident)
-{
-}
-
-bool
-Client_Task::done(void) const
-{
- return done_;
-}
-
-void
-Client_Task::do_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s sending %d payloads.\n",
- this->id_.c_str(), this->event_count_));
-
- for (int i = 0; i != this->event_count_; ++i)
- {
- this->payload_receiver_->more_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-}
-
-void
-Client_Task::do_sync_none_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s sending %d SYNC_NONE payloads.\n",
- this->id_.c_str(), this->event_count_));
-
- for (int i = 0; i != this->event_count_; ++i)
- {
- this->payload_receiver_->sync_none_more_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG,"(%P|%t) Client_Task %s started\n",this->id_.c_str()));
- Test::Payload payload (this->event_size_);
- payload.length (this->event_size_);
-
- for (CORBA::ULong j = 0; j != payload.length (); ++j)
- payload[j] = (j % 256);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any scope_as_any;
- scope_as_any <<= this->sync_scope_;
-
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
- policy_list[0] =
- this->orb_->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (this->sync_scope_ == Messaging::SYNC_NONE)
- this->do_sync_none_invocations(payload ACE_ENV_SINGLE_ARG_PARAMETER);
- else
- this->do_invocations(payload ACE_ENV_SINGLE_ARG_PARAMETER);
-
- }
- ACE_CATCHANY
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s: ",
- this->id_.c_str()));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
- done_ = true;
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG((LM_DEBUG, "(%P|%t)Client_Task %s finished.\n", this->id_.c_str()));
- done_ = true;
- return 0;
-}
-
-void
-Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_TRY
- {
- Test::Payload payload(0);
- for (int i = 0; i != 100; ++i)
- {
- (void) this->payload_receiver_->more_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY {} ACE_ENDTRY;
-}
diff --git a/TAO/tests/Big_Request_Muxing/Client_Task.h b/TAO/tests/Big_Request_Muxing/Client_Task.h
deleted file mode 100644
index 81c8358c4a2..00000000000
--- a/TAO/tests/Big_Request_Muxing/Client_Task.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_REQUEST_MUXING_CLIENT_TASK_H
-#define BIG_REQUEST_MUXING_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "tao/Messaging/Messaging.h"
-#include "ace/Task.h"
-#include "ace/SString.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (ACE_Thread_Manager *thr_mgr,
- Test::Payload_Receiver_ptr receiver,
- CORBA::Long event_count,
- CORBA::ULong event_size,
- CORBA::ORB_ptr orb,
- Messaging::SyncScope sync_scope,
- const ACE_CString& ident);
-
- /// Thread entry point
- int svc (void);
-
- bool done(void) const;
-
-private:
- /// Make sure that all threads have connections available to
- /// workaround bug 189
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL);
-
- void do_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL);
- void do_sync_none_invocations(Test::Payload& payload ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// Reference to the test interface
- Test::Payload_Receiver_var payload_receiver_;
-
- /// Total number of events
- CORBA::Long event_count_;
-
- /// Size of each message
- CORBA::ULong event_size_;
-
- /// Keep a reference to the ORB, used to initialize the SyncScope
- /// policy
- CORBA::ORB_var orb_;
-
- /// The SyncScope used in this Task
- Messaging::SyncScope sync_scope_;
-
- bool done_;
-
- ACE_CString id_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_REQUEST_MUXING_CLIENT_TASK_H */
diff --git a/TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp b/TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp
deleted file mode 100644
index e3203f20359..00000000000
--- a/TAO/tests/Big_Request_Muxing/Payload_Receiver.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// $Id$
-//
-#include "Payload_Receiver.h"
-
-ACE_RCSID(Big_Request_Muxing, Payload_Receiver, "$Id$")
-
-Payload_Receiver::Payload_Receiver ()
- : message_count_ (0),
- sync_none_message_count_ (0)
-{
-}
-
-void
-Payload_Receiver::more_data (const Test::Payload& payload
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (payload.length() > 0)
- {
- ++this->message_count_;
- }
-}
-
-void
-Payload_Receiver::sync_none_more_data (const Test::Payload& payload
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (payload.length() > 0)
- {
- ++this->sync_none_message_count_;
- }
-}
-
-int
-Payload_Receiver::count(bool sync_none) const
-{
- if (sync_none)
- return sync_none_message_count_.value ();
- else
- return message_count_.value ();
-}
diff --git a/TAO/tests/Big_Request_Muxing/Payload_Receiver.h b/TAO/tests/Big_Request_Muxing/Payload_Receiver.h
deleted file mode 100644
index 130ebba266e..00000000000
--- a/TAO/tests/Big_Request_Muxing/Payload_Receiver.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H
-#define BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Payload_Receiver interface
-/**
- * Simply print count how many bytes were received.
- */
-class Payload_Receiver
- : public virtual POA_Test::Payload_Receiver
-{
-public:
- Payload_Receiver ();
-
- // = The skeleton methods
- virtual void more_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void sync_none_more_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- int count(bool sync_none = false) const;
-
-private:
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, int> message_count_;
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, int> sync_none_message_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_REQUEST_MUXING_PAYLOAD_RECEIVER_H */
diff --git a/TAO/tests/Big_Request_Muxing/README b/TAO/tests/Big_Request_Muxing/README
deleted file mode 100644
index 227c7d2ce71..00000000000
--- a/TAO/tests/Big_Request_Muxing/README
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
-
-@page Big_Request_Muxing Test README File
-
- This is a stress test for the non-blocking I/O features in the
-ORB when used to send oneways and reliable oneways. A client process
-creates multiple threads, each thread sends (large) oneway requests
-with different levels of reliability. The main thread runs the ORB
-event loop. The thread also configures connection muxing in the ORB,
-forcing all the threads to share the same connection. This level of
-concurrency is designed to test as many code sequences in the ORB
-output data as possible.
-
- This is part of the regression testsuite for:
-
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=132
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Big_Request_Muxing/Test.idl b/TAO/tests/Big_Request_Muxing/Test.idl
deleted file mode 100644
index 21068d3d9e4..00000000000
--- a/TAO/tests/Big_Request_Muxing/Test.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- typedef sequence<octet> Payload;
-
- interface Payload_Receiver
- {
- /// Send the data using a twoway operat
- oneway void more_data (in Payload the_payload);
-
- /// operation used with SYNC_NONE clients. This is separated to avoid
- /// error reporting due to dropped messages. Drops are allowed in the
- /// sync_none case.
- oneway void sync_none_more_data (in Payload the_payload);
- };
-};
diff --git a/TAO/tests/Big_Request_Muxing/client.cpp b/TAO/tests/Big_Request_Muxing/client.cpp
deleted file mode 100644
index 321eed0bd4a..00000000000
--- a/TAO/tests/Big_Request_Muxing/client.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "tao/Messaging/Messaging.h"
-
-ACE_RCSID(Muxing, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-// 3 clients with 2 threads each send this many messages.
-// so the server should expect NUM_MSGS * 6 total.
-static const int NUM_MSGS = 100;
-static const int NUM_THRDS = 2;
-static const int MSG_SIZE = 4096;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DEBUG ((LM_DEBUG, "(%P) Starting client\n"));
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Payload_Receiver_var payload_receiver =
- Test::Payload_Receiver::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (payload_receiver.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
- Client_Task task0 (ACE_Thread_Manager::instance (),
- payload_receiver.in (),
- NUM_MSGS,
- MSG_SIZE,
- orb.in (),
- Messaging::SYNC_WITH_TARGET,
- ACE_CString("Sync_With_Target"));
- Client_Task task1 (ACE_Thread_Manager::instance (),
- payload_receiver.in (),
- NUM_MSGS,
- MSG_SIZE,
- orb.in (),
- Messaging::SYNC_WITH_TRANSPORT,
- ACE_CString("Sync_With_Transport"));
- Client_Task task2 (ACE_Thread_Manager::instance (),
- payload_receiver.in (),
- NUM_MSGS,
- MSG_SIZE,
- orb.in (),
- Messaging::SYNC_NONE,
- ACE_CString("Sync_None"));
-
- ACE_DEBUG ((LM_DEBUG, "(%P) Activating threads in client\n"));
- if (task0.activate (THR_NEW_LWP | THR_JOINABLE, NUM_THRDS, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- if (task1.activate (THR_NEW_LWP | THR_JOINABLE, NUM_THRDS, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- if (task2.activate (THR_NEW_LWP | THR_JOINABLE, NUM_THRDS, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- ACE_Time_Value end_time = ACE_OS::gettimeofday() + ACE_Time_Value(10);
- while (ACE_OS::gettimeofday() < end_time)
- {
- ACE_Time_Value tv (0, 100 * 1000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (task0.done() && task1.done() && task2.done())
- break;
- }
-
- ACE_Thread_Manager::instance ()->wait ();
- ACE_DEBUG ((LM_DEBUG, "(%P) Threads finished\n"));
-
- while (orb->work_pending())
- {
- ACE_Time_Value tv(0, 100 * 1000);
- orb->run(tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "(%P) Ending client\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Big_Request_Muxing/run_test.pl b/TAO/tests/Big_Request_Muxing/run_test.pl
deleted file mode 100755
index f0985f7c959..00000000000
--- a/TAO/tests/Big_Request_Muxing/run_test.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -e 800 -n 400");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -e 800 -n 400");
-}
-$CL1 = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", " -k file://$iorfile");
-
-for ($n = 0; $n < 10; ++$n) {
- print "=================================================================\n";
- print "test run $n\n";
- unlink $iorfile;
-
- $SV->Spawn ();
- if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
- }
-
- $CL1->Spawn();
- $CL2->Spawn();
-
- $client1 = $CL1->WaitKill (30);
- if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $CL2->Kill();
- $SV->Kill();
- exit 1;
- }
-
- $client2 = $CL2->WaitKill (30);
- if ($client2 != 0) {
- print STDERR "ERROR: client 2 returned $client2\n";
- $SV->Kill();
- exit 1;
- }
-
- $server = $SV->WaitKill (30);
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
- }
-}
-
-unlink $iorfile;
-
-exit 0;
diff --git a/TAO/tests/Big_Request_Muxing/server.cpp b/TAO/tests/Big_Request_Muxing/server.cpp
deleted file mode 100644
index 6b134f43f55..00000000000
--- a/TAO/tests/Big_Request_Muxing/server.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
-// $Id$
-
-#include "Payload_Receiver.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_sys_time.h"
-
-ACE_RCSID(Big_Request_Muxing, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-static int expected = 400;
-static int sn_expected = 200;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:e:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'e':
- expected = ACE_OS::atoi(get_opts.opt_arg());
- break;
- case 'n':
- sn_expected = ACE_OS::atoi(get_opts.opt_arg());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> [-e <expected>] [-n <expected_sync_none>]"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DEBUG ((LM_DEBUG, "Starting server\n"));
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Payload_Receiver *payload_receiver_impl;
- ACE_NEW_RETURN (payload_receiver_impl,
- Payload_Receiver(),
- 1);
- PortableServer::ServantBase_var receiver_owner_transfer(payload_receiver_impl);
-
- Test::Payload_Receiver_var payload_receiver =
- payload_receiver_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (payload_receiver.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG((LM_DEBUG, "Server waiting for messages...\n"));
-
- ACE_Time_Value start_time = ACE_OS::gettimeofday();
- ACE_Time_Value end_time = start_time + ACE_Time_Value(10);
- int count = payload_receiver_impl->count();
- int sn_count = payload_receiver_impl->count(true);
- bool stalled = false;
- while (payload_receiver_impl->count() < expected ||
- payload_receiver_impl->count(true) < sn_expected)
- {
- int prev_count = count;
- int sn_prev_count = sn_count;
- ACE_Time_Value tv(0, 100 * 1000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- count = payload_receiver_impl->count();
- sn_count = payload_receiver_impl->count(true);
- if ((count < expected && count == prev_count) ||
- (sn_count < sn_expected && sn_count == sn_prev_count))
- {
- if (!stalled)
- {
- stalled = true;
- end_time = ACE_OS::gettimeofday() + ACE_Time_Value(5);
- }
- else if (ACE_OS::gettimeofday() > end_time)
- {
- if (count < expected)
- ACE_DEBUG ((LM_DEBUG,"Clients stalled out after %d messages\n",
- count));
- break;
- }
- }
- else stalled = false;
- }
-
- ACE_Time_Value runtime = ACE_OS::gettimeofday() - start_time;
-
- int result = 0;
-
- if (count != expected)
- {
- // Even though 200 events were sent with SYNC_NONE, we still don't
- // expect TAO to drop any events.
- ACE_ERROR((LM_ERROR, "Error: "));
- result = 1;
- }
-
-
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P) - Server got %d of %d sync messages plus %d sync_none"
- " in %d sec, %d usec\n",
- count, expected, payload_receiver_impl->count(true),
- runtime.sec(), runtime.usec()));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return result;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "Ending server\n"));
-
- return 1;
-}
diff --git a/TAO/tests/Big_Request_Muxing/svc.conf b/TAO/tests/Big_Request_Muxing/svc.conf
deleted file mode 100644
index 9fb75aeb0dd..00000000000
--- a/TAO/tests/Big_Request_Muxing/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# $Id$
-#
-static Client_Strategy_Factory "-ORBTransportMuxStrategy MUXED"
diff --git a/TAO/tests/Big_Request_Muxing/svc.conf.xml b/TAO/tests/Big_Request_Muxing/svc.conf.xml
deleted file mode 100644
index 4fad63264d8..00000000000
--- a/TAO/tests/Big_Request_Muxing/svc.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Big_Request_Muxing/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy MUXED"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Big_Twoways/.cvsignore b/TAO/tests/Big_Twoways/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Big_Twoways/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Big_Twoways/Big_Twoways.mpc b/TAO/tests/Big_Twoways/Big_Twoways.mpc
deleted file mode 100644
index 5cf458a0b1e..00000000000
--- a/TAO/tests/Big_Twoways/Big_Twoways.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Coordinator.cpp
- Session_Control.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver {
- after += *Server
- Source_Files {
- Peer.cpp
- Session.cpp
- Session_Task.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Big_Twoways/Coordinator.cpp b/TAO/tests/Big_Twoways/Coordinator.cpp
deleted file mode 100644
index 6b6b332a9cc..00000000000
--- a/TAO/tests/Big_Twoways/Coordinator.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// $Id$
-//
-#include "Coordinator.h"
-
-ACE_RCSID(Big_Oneways, Coordinator, "$Id$")
-
-Coordinator::Coordinator (CORBA::ULong peer_count)
- : peers_ (0)
- , peer_count_ (0)
- , peer_max_ (peer_count)
-{
- ACE_NEW (this->peers_, Test::Peer_var[this->peer_max_]);
-}
-
-Coordinator::~Coordinator (void)
-{
- delete[] this->peers_;
-}
-
-int
-Coordinator::has_all_peers (void) const
-{
- return this->peer_count_ == this->peer_max_;
-}
-
-void
-Coordinator::create_session_list (Test::Session_Control_ptr session_control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- Test::Session_List &session_list
- ACE_ENV_ARG_DECL)
-{
- session_list.length (this->peer_count_);
- CORBA::ULong count = 0;
- for (Test::Peer_var *i = this->peers_;
- i != this->peers_ + this->peer_count_;
- ++i)
- {
- session_list[count++] =
- (*i)->create_session (session_control,
- payload_size,
- thread_count,
- message_count,
- this->peer_count_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-Coordinator::shutdown_all_peers (ACE_ENV_SINGLE_ARG_DECL)
-{
- for (Test::Peer_var *i = this->peers_;
- i != this->peers_ + this->peer_count_;
- ++i)
- {
- ACE_TRY
- {
- (*i)->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Coordinator::shutdown, ignored");
- }
- ACE_ENDTRY;
- }
-}
-
-void
-Coordinator::add_peer (Test::Peer_ptr peer
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->peer_count_ >= this->peer_max_)
- return;
-
- this->peers_[this->peer_count_++] =
- Test::Peer::_duplicate (peer);
-}
diff --git a/TAO/tests/Big_Twoways/Coordinator.h b/TAO/tests/Big_Twoways/Coordinator.h
deleted file mode 100644
index f229f2d0951..00000000000
--- a/TAO/tests/Big_Twoways/Coordinator.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_COORDINATOR_H
-#define BIG_ONEWAYS_COORDINATOR_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Coordinator interface
-class Coordinator
- : public virtual POA_Test::Coordinator
-{
-public:
- /// Constructor
- Coordinator (CORBA::ULong peer_count);
-
- /// Check if all the peers have registered already
- int has_all_peers (void) const;
-
- /// Check a session on each peer
- void create_session_list (Test::Session_Control_ptr session_control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- Test::Session_List &session_list
- ACE_ENV_ARG_DECL);
-
- /// Shutdown all the peers
- void shutdown_all_peers (ACE_ENV_SINGLE_ARG_DECL);
-
- // = The skeleton methods
- virtual void add_peer (Test::Peer_ptr peer
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- /// Protected destructor, call _remove_ref() to delete
- virtual ~Coordinator (void);
-
-private:
- /// Store a reference to each peer
- Test::Peer_var *peers_;
-
- /// Current number of elements in the array
- size_t peer_count_;
-
- /// Array's capacity
- size_t peer_max_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_COORDINATOR_H */
diff --git a/TAO/tests/Big_Twoways/Peer.cpp b/TAO/tests/Big_Twoways/Peer.cpp
deleted file mode 100644
index b93f0e3f7b2..00000000000
--- a/TAO/tests/Big_Twoways/Peer.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// $Id$
-//
-#include "Peer.h"
-#include "Session.h"
-
-ACE_RCSID(Big_Oneways, Peer, "$Id$")
-
-Peer::Peer (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Peer::~Peer (void)
-{
-}
-
-Test::Session_ptr
-Peer::create_session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Session *session_impl = 0;
- ACE_NEW_THROW_EX (session_impl,
- Session (control,
- payload_size,
- thread_count,
- message_count,
- peer_count),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (Test::Session::_nil ());
- PortableServer::ServantBase_var transfer_ownership (session_impl);
-
- return session_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Peer::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Peer::shutdown, waiting for threads\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Peer::shutdown, shutting down ORB\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Big_Twoways/Peer.h b/TAO/tests/Big_Twoways/Peer.h
deleted file mode 100644
index 2a142889512..00000000000
--- a/TAO/tests/Big_Twoways/Peer.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_PEER_H
-#define BIG_ONEWAYS_PEER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Peer interface
-class Peer
- : public virtual POA_Test::Peer
-{
-public:
- /// Constructor
- Peer (CORBA::ORB_ptr orb);
-
- /// Destructor
- virtual ~Peer (void);
-
- // = The skeleton methods
- virtual Test::Session_ptr create_session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Keep a pointer to the ORB to shutdown cleanly
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_PEER_H */
diff --git a/TAO/tests/Big_Twoways/README b/TAO/tests/Big_Twoways/README
deleted file mode 100644
index ed389e9009c..00000000000
--- a/TAO/tests/Big_Twoways/README
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
-
-@page Big_Oneways Test README File
-
- This is a stress test for the non-blocking I/O features in the
-ORB. The test connects multiple peer processes together. Each
-process sends messages to all its peers, using multiple threads to
-generate the messages. Without non-blocking I/O the system soon
-deadlocks.
-
- This is part of the regression testsuite for:
-
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=132
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Big_Twoways/Session.cpp b/TAO/tests/Big_Twoways/Session.cpp
deleted file mode 100644
index a8aac013d5d..00000000000
--- a/TAO/tests/Big_Twoways/Session.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-//
-// $Id$
-//
-#include "Session.h"
-#include "tao/debug.h"
-
-ACE_RCSID(Big_Oneways, Session, "$Id$")
-
-Session::Session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count)
- : control_ (Test::Session_Control::_duplicate (control))
- , running_ (0)
- , payload_size_ (payload_size)
- , thread_count_ (thread_count)
- , message_count_ (message_count)
- , active_thread_count_ (0)
- , expected_messages_ (thread_count * message_count * (peer_count - 1))
- , task_ (this)
- , barrier_ (thread_count + 1)
-{
-}
-
-Session::~Session (void)
-{
-}
-
-int
-Session::svc (void)
-{
- this->barrier_.wait ();
-
- /// Automatically decrease the reference count at the end of the
- /// thread
- PortableServer::ServantBase_var auto_decrement (this);
- CORBA::ULong i = 0;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Use the same payload over and over
- Test::Payload payload (this->payload_size_);
- payload.length (this->payload_size_);
-
- // Get the number of peers just once.
- CORBA::ULong session_count =
- this->other_sessions_.length ();
-
- for (; i != this->message_count_; ++i)
- {
-#if 0
- if (i % 500 == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session::svc, "
- "sending message %d\n",
- i));
- }
-#endif /* 0 */
- for (CORBA::ULong j = 0; j != session_count; ++j)
- {
- Test::Payload_var received =
- this->other_sessions_[j]->echo_payload (payload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
-
- {
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
- this->active_thread_count_--;
- if (this->more_work ())
- {
- return 0;
- }
- }
- this->terminate (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Session::svc, "
- "send %d messages out of %d\n",
- i, message_count_));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Session::svc - ");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-Session::start (const Test::Session_List &other_sessions
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Already_Running,
- Test::No_Peers))
-{
- if (other_sessions.length () == 0)
- ACE_THROW (Test::No_Peers ());
-
- {
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- if (this->running_)
- ACE_THROW (Test::Already_Running ());
-
- this->other_sessions_ = other_sessions;
-
- for (CORBA::ULong i = 0; i != this->thread_count_; ++i)
- {
- // Increase the reference count because the new thread will have
- // access to this object....
- ACE_TRY
- {
- this->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (this->task_.activate (
- THR_NEW_LWP | THR_JOINABLE, 1, 1) == -1)
- {
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- this->running_ = 1;
- this->active_thread_count_++;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Session::start, ignored");
- }
- ACE_ENDTRY;
- }
-
- if (this->active_thread_count_ != this->thread_count_)
- return;
- }
-
- this->validate_connections (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->barrier_.wait ();
-
- if (this->running_ != 0)
- return;
-
- /// None of the threads are running, this session is useless at
- /// this point, report the problem and destroy the local objects
- this->terminate (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-Test::Payload *
-Session::echo_payload (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (the_payload.length () != this->payload_size_)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session::echo_payload, "
- "unexpected payload size (%d != %d)\n",
- the_payload.length (), this->payload_size_));
- }
-
- Test::Payload_var retval (new Test::Payload (the_payload));
-
- {
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_,
- retval._retn ());
- this->expected_messages_--;
-
- int verbose = 0;
-#if 0
- verbose = this->expected_messages_ % 500 == 0;
- if (this->expected_messages_ < 500)
- verbose = (this->expected_messages_ % 100 == 0);
- if (this->expected_messages_ < 100)
- verbose = (this->expected_messages_ % 10 == 0);
-#endif /* 0 */
- if (this->expected_messages_ < 5)
- verbose = 1;
-
- if (verbose)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session::echo_payload, "
- "%d messages to go\n",
- this->expected_messages_));
- }
- if (this->more_work ())
- return retval._retn ();
- }
- this->terminate (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return retval._retn ();
-}
-
-
-void
-Session::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Make sure local resources are released
-
- PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var oid =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-Session::more_work (void) const
-{
- if (this->expected_messages_ > 0
- || this->active_thread_count_ > 0
- || this->running_ == 0)
- return 1;
-
- return 0;
-}
-
-void
-Session::validate_connections (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- const CORBA::ULong session_count =
- this->other_sessions_.length ();
- for (CORBA::ULong j = 0; j != session_count; ++j)
- {
- ACE_TRY
- {
-#if (TAO_HAS_CORBA_MESSAGING == 1)
- CORBA::PolicyList_var unused;
- this->other_sessions_[j]->_validate_connection (unused
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#else
- (void) this->other_sessions_[j]->_is_a ("Not_An_IDL_Type"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_MESSAGING == 1 */
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
- }
-}
-
-void
-Session::terminate (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- // Make sure that global resources are released
- ACE_TRY_EX(GLOBAL)
- {
- this->control_->session_finished (success
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX(GLOBAL);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Session::terminate, ignored");
- }
- ACE_ENDTRY;
-
-}
diff --git a/TAO/tests/Big_Twoways/Session.h b/TAO/tests/Big_Twoways/Session.h
deleted file mode 100644
index 94f1f349458..00000000000
--- a/TAO/tests/Big_Twoways/Session.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef BIG_TWOWAYS_SESSION_H
-#define BIG_TWOWAYS_SESSION_H
-
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-#include "Session_Task.h"
-
-#if defined(ACE_HAS_THREADS)
-# include "ace/Barrier.h"
-#else
-# include "ace/Null_Barrier.h"
-#endif /* ACE_HAS_THREADS */
-
-/// Implement the Test::Session interface
-class Session
- : public virtual POA_Test::Session
-{
-public:
- /// Constructor
- Session (Test::Session_Control_ptr control,
- CORBA::ULong payload_size,
- CORBA::ULong thread_count,
- CORBA::ULong message_count,
- CORBA::ULong peer_count);
-
- /// Run one of the experiment threads
- int svc (void);
-
- // = The skeleton methods
- virtual void start (const Test::Session_List &other_sessions
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Already_Running,
- Test::No_Peers));
-
- virtual Test::Payload* echo_payload (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- /// Protected destructor, call _remove_ref() to delete
- virtual ~Session (void);
-
-private:
- /// Helper function used to report any problems and destroy local
- /// resources
- void terminate (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (());
-
- /// Return 1 if all the work in this session has been completed
- int more_work (void) const;
-
- /// Validate all the connections
- void validate_connections (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC (());
-
-private:
- /// Synchronize the internal state
- ACE_SYNCH_MUTEX mutex_;
-
- /// Keep a reference to the Session_Control, this is used to report
- /// when the test finishes.
- Test::Session_Control_var control_;
-
- /// Keep track of wether the test is running.
- int running_;
-
- /// The other session objects participating in the test
- Test::Session_List other_sessions_;
-
- /// Size of each message
- CORBA::ULong payload_size_;
-
- /// Number of threads
- CORBA::ULong thread_count_;
-
- /// Number of messages to send
- CORBA::ULong message_count_;
-
- /// The number of threads currently running, when this reaches 0 the
- /// session destroys itself.
- CORBA::ULong active_thread_count_;
-
- /// Number of messages expected
- CORBA::ULong expected_messages_;
-
- /// Helper class to run svc() in a separate thread
- Session_Task task_;
-
- /// Barrier to start all threads simultaenously
-#if defined(ACE_HAS_THREADS)
- typedef ACE_Thread_Barrier Barrier;
-#else
- typedef ACE_Null_Barrier Barrier;
-#endif /* ACE_HAS_THREADS */
- Barrier barrier_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* BIG_TWOWAYS_SESSION_H */
diff --git a/TAO/tests/Big_Twoways/Session_Control.cpp b/TAO/tests/Big_Twoways/Session_Control.cpp
deleted file mode 100644
index 5b5c2e8ee44..00000000000
--- a/TAO/tests/Big_Twoways/Session_Control.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// $Id$
-//
-#include "Session_Control.h"
-
-ACE_RCSID(Big_Oneways, Session_Control, "$Id$")
-
-Session_Control::Session_Control (CORBA::ULong session_count)
- : session_count_ (session_count)
- , success_ (1)
-{
-}
-
-int
-Session_Control::all_sessions_finished (void) const
-{
- return this->session_count_ == 0;
-}
-
-Session_Control::~Session_Control (void)
-{
- if (this->session_count_ == 0 && this->success_)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session_Control::~Session_control, "
- " good, all sessions did finish\n"));
- }
- else if (session_count_ != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session_Control::~Session_control, "
- " %d sessions did not finish\n",
- this->session_count_));
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session_Control::~Session_control, "
- " some sessions failed\n"));
- }
-}
-
-void
-Session_Control::session_finished (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- if (this->session_count_ == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: (%P|%t) Session_Control::session_finished, "
- "unexpected callback\n"));
- }
- if (success == 0)
- this->success_ = 0;
-
- this->session_count_--;
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Session_Control::session_finished, "
- "%d sessions to go\n",
- this->session_count_));
- if (session_count_ == 0)
- {
- PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var oid =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
-}
diff --git a/TAO/tests/Big_Twoways/Session_Control.h b/TAO/tests/Big_Twoways/Session_Control.h
deleted file mode 100644
index 2f0232be6d8..00000000000
--- a/TAO/tests/Big_Twoways/Session_Control.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_SESSION_CONTROL_H
-#define BIG_ONEWAYS_SESSION_CONTROL_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Session_Control interface
-class Session_Control
- : public virtual POA_Test::Session_Control
-{
-public:
- /// Constructor
- /**
- * @param session_count Number of session objects in the experiment.
- */
- Session_Control (CORBA::ULong session_count);
-
- /// Destructor
- virtual ~Session_Control (void);
-
- /// Return 1 when all sessions have finished
- int all_sessions_finished (void) const;
-
- // = The skeleton methods
- virtual void session_finished (CORBA::Boolean success
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Synchronize the internal state
- ACE_SYNCH_MUTEX mutex_;
-
- /// The type of test
- CORBA::ULong session_count_;
-
- /// Set to falso if any session reported a failure
- CORBA::Boolean success_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_SESSION_CONTROL_H */
diff --git a/TAO/tests/Big_Twoways/Session_Task.cpp b/TAO/tests/Big_Twoways/Session_Task.cpp
deleted file mode 100644
index bd992a66e5d..00000000000
--- a/TAO/tests/Big_Twoways/Session_Task.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// $Id$
-//
-
-#include "Session_Task.h"
-#include "Session.h"
-
-ACE_RCSID(Big_Oneways, Session_Task, "$Id$")
-
-Session_Task::Session_Task (Session *session)
- : session_ (session)
-{
-}
-
-int
-Session_Task::svc (void)
-{
- return this->session_->svc ();
-}
diff --git a/TAO/tests/Big_Twoways/Session_Task.h b/TAO/tests/Big_Twoways/Session_Task.h
deleted file mode 100644
index 6f73ee069b0..00000000000
--- a/TAO/tests/Big_Twoways/Session_Task.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BIG_ONEWAYS_SESSION_TASK_H
-#define BIG_ONEWAYS_SESSION_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Session;
-
-/// Implement a Task to run the experiments using multiple threads.
-class Session_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Session_Task (Session *session);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the test interface
- Session *session_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BIG_ONEWAYS_SESSION_TASK_H */
diff --git a/TAO/tests/Big_Twoways/Test.idl b/TAO/tests/Big_Twoways/Test.idl
deleted file mode 100644
index 04255aa1262..00000000000
--- a/TAO/tests/Big_Twoways/Test.idl
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /// The message type, just used to send a lot of data on each
- /// request
- typedef sequence<octet> Payload;
-
- /// A session is a single instance of the test
- interface Session;
- typedef sequence<Session> Session_List;
-
- /// A session control is used to determine if all the Session in an
- /// experiment have finished.
- /**
- * @param success If false then the session failed, the experiment
- * is successful only if all sessions finish successfully
- */
- interface Session_Control
- {
- void session_finished (in boolean success);
- };
-
- /// A Peer is used to create sessions
- interface Peer
- {
- /// Create a new session
- /**
- * @param payload_size The size of each message
- * @param thread_count The number of threads that each session
- * must create
- * @param message_count How many messages does each thread send.
- */
- Session create_session (in Session_Control control,
- in unsigned long payload_size,
- in unsigned long thread_count,
- in unsigned long message_count,
- in unsigned long peer_count);
-
- /// Shutdown the peer
- oneway void shutdown ();
- };
-
- /// The Session already has an experiment running.
- exception Already_Running {};
-
- /// The experiment requires at least two Sessions
- exception No_Peers {};
-
- interface Session
- {
- /// Start the test, send messages to all the peers
- /**
- * @param other_sessions The list of sessions participating in the
- * experiment, this list must not include the session
- * receiving the start() call.
- */
- void start (in Session_List other_sessions)
- raises (Already_Running, No_Peers);
-
- /// Echo back the payload
- Payload echo_payload (in Payload the_payload);
-
- /// Destroy the Session object
- void destroy ();
- };
-
- interface Coordinator
- {
- /// Add a new peer.
- /**
- * The coordinator starts the test by calling <send_oneways> on
- * all peers. How does it decide to do that is application
- * specific.
- */
- void add_peer (in Peer the_peer);
- };
-};
diff --git a/TAO/tests/Big_Twoways/client.cpp b/TAO/tests/Big_Twoways/client.cpp
deleted file mode 100644
index 48013a64c34..00000000000
--- a/TAO/tests/Big_Twoways/client.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// $Id$
-
-#include "Peer.h"
-#include "ace/Get_Opt.h"
-#include "ace/Thread_Manager.h"
-
-ACE_RCSID(Big_Oneways, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic got a nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Coordinator_var coordinator =
- Test::Coordinator::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (coordinator.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
- Peer *peer_impl = 0;
- ACE_NEW_RETURN (peer_impl,
- Peer (orb.in ()),
- 1);
- PortableServer::ServantBase_var peer_owner_transfer(peer_impl);
-
- Test::Peer_var peer =
- peer_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- coordinator->add_peer (peer.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for all the threads.
- ACE_Thread_Manager::instance ()->wait ();
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Big_Twoways/run_test.pl b/TAO/tests/Big_Twoways/run_test.pl
deleted file mode 100755
index 196c4a41088..00000000000
--- a/TAO/tests/Big_Twoways/run_test.pl
+++ /dev/null
@@ -1,92 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-use Getopt::Std;
-
-local ($opt_i, $opt_b);
-
-if (!getopts ('i:b:')) {
- print "Usage: run_test.pl [-b payload_size] [-i iterations]\n";
- exit 1;
-}
-
-my $server_args = " -p 4";
-if (defined $opt_i) {
- $server_args .= " -i ".$opt_i;
-}
-if (defined $opt_b) {
- $server_args .= " -b ".$opt_b;
-}
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-$status = 0;
-unlink $iorfile;
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior $server_args");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile $server_args");
-}
-$CL1 = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL4 = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn ();
-$CL2->Spawn ();
-$CL3->Spawn ();
-$CL4->Spawn ();
-
-$client1 = $CL1->WaitKill (300);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-$client2 = $CL2->WaitKill (300);
-
-if ($client2 != 0) {
- print STDERR "ERROR: client 2 returned $client2\n";
- $status = 1;
-}
-
-$client3 = $CL3->WaitKill (300);
-
-if ($client3 != 0) {
- print STDERR "ERROR: client 3 returned $client3\n";
- $status = 1;
-}
-
-$client4 = $CL4->WaitKill (300);
-
-if ($client4 != 0) {
- print STDERR "ERROR: client 4 returned $client3\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Big_Twoways/server.cpp b/TAO/tests/Big_Twoways/server.cpp
deleted file mode 100644
index 0dcf180b51a..00000000000
--- a/TAO/tests/Big_Twoways/server.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-// $Id$
-
-#include "Coordinator.h"
-#include "Session_Control.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Big_Oneways, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-CORBA::ULong peer_count = 4;
-CORBA::ULong payload_size = 1024;
-CORBA::ULong message_count = 1000;
-CORBA::ULong thread_count = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:p:b:i:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'p':
- peer_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'b':
- payload_size = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'i':
- message_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'n':
- thread_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-p <peer_count> "
- "-b <payload_size> "
- "-i <message_count> "
- "-n <thread_count> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic got a nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Coordinator *coordinator_impl;
- ACE_NEW_RETURN (coordinator_impl,
- Coordinator (peer_count),
- 1);
-
- Test::Coordinator_var coordinator =
- coordinator_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (coordinator.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Waiting for peers . . . "));
- for (int i = 0;
- i != 30 && !coordinator_impl->has_all_peers ();
- ++i)
- {
- ACE_Time_Value tv (1, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_DEBUG ((LM_DEBUG, "done.\n"));
-
- if (!coordinator_impl->has_all_peers ())
- {
- ACE_ERROR ((LM_DEBUG,
- "ERROR: timeout, some peers failed to register\n"));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG, "Building session list . . . "));
-
- Session_Control *session_control_impl;
- ACE_NEW_RETURN (session_control_impl,
- Session_Control (peer_count),
- 1);
-
- Test::Session_Control_var session_control =
- session_control_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Session_List session_list;
- coordinator_impl->create_session_list (session_control.in (),
- payload_size,
- thread_count,
- message_count,
- session_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (session_list.length () == peer_count);
- ACE_DEBUG ((LM_DEBUG, "done.\n"));
-
- ACE_DEBUG ((LM_DEBUG, "Giving start signal . . . "));
- CORBA::ULong j;
- for (j = 0; j != peer_count; ++j)
- {
- // Make a copy of the sessions, excluding the j-th element
- Test::Session_List other_sessions (peer_count - 1);
- other_sessions.length (peer_count - 1);
- CORBA::ULong count = 0;
- for (CORBA::ULong k = 0; k != peer_count; ++k)
- {
- if (k == j)
- continue;
- other_sessions[count++] =
- Test::Session::_duplicate (session_list[k]);
- }
-
- session_list[j]->start (other_sessions
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
-
- ACE_DEBUG ((LM_DEBUG, "done.\n"));
-
- ACE_DEBUG ((LM_DEBUG, "Waiting for sessions . . .\n"));
- for (int k = 0;
- k != 300 && !session_control_impl->all_sessions_finished ();
- ++k)
- {
- ACE_Time_Value tv (1, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (!session_control_impl->all_sessions_finished ())
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: timeout waiting for sessions\n"));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG, "All sessions finished . . . \n"));
-
- for (j = 0; j != peer_count; ++j)
- {
- session_list[j]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
-
- ACE_DEBUG ((LM_DEBUG, "Shutdown all peers . . .\n"));
-
- coordinator_impl->shutdown_all_peers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- coordinator_impl->_remove_ref();
- session_control_impl->_remove_ref();
-
- ACE_DEBUG ((LM_DEBUG, "Shutdown poa and orb . . .\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Blocking_Sync_None/.cvsignore b/TAO/tests/Blocking_Sync_None/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Blocking_Sync_None/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.cpp b/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.cpp
deleted file mode 100644
index 864452afefb..00000000000
--- a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// $Id$
-//
-#include "Blocking_Sync_None.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Blocking_Sync_None, Blocking_Sync_None, "$Id$")
-
-Blocking_Sync_None::Blocking_Sync_None (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Blocking_Sync_None::slow_operation (const Test::Payload &,
- CORBA::ULong sleep_microseconds
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_Time_Value sleep_time (0, sleep_microseconds);
- ACE_OS::sleep (sleep_time);
-}
-
-void
-Blocking_Sync_None::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.h b/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.h
deleted file mode 100644
index 65a0714374f..00000000000
--- a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BLOCKING_SYNC_NONE_H
-#define BLOCKING_SYNC_NONE_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Blocking_Sync_None interface
-class Blocking_Sync_None
- : public virtual POA_Test::Blocking_Sync_None
-{
-public:
- /// Constructor
- Blocking_Sync_None (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void slow_operation (const Test::Payload &the_payload,
- CORBA::ULong sleep_microseconds
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BLOCKING_SYNC_NONE_H */
diff --git a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc b/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc
deleted file mode 100644
index f2870ef39d9..00000000000
--- a/TAO/tests/Blocking_Sync_None/Blocking_Sync_None.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Blocking_Sync_None.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Blocking_Sync_None/README b/TAO/tests/Blocking_Sync_None/README
deleted file mode 100644
index 8f6feb99e07..00000000000
--- a/TAO/tests/Blocking_Sync_None/README
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
-
-@page Blocking_Sync_None Test README File
-
- A regression test for (un)reliable oneways. The test verifies
-that the ORB never blocks a request made with the SYNC_NONE scope
-policy. This is a regression test for:
-
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=858
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if there are no errors.
-
-*/
diff --git a/TAO/tests/Blocking_Sync_None/Test.idl b/TAO/tests/Blocking_Sync_None/Test.idl
deleted file mode 100644
index 46596465827..00000000000
--- a/TAO/tests/Blocking_Sync_None/Test.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- typedef sequence<octet> Payload;
-
- /// An interface to test the SYNC_NONE semantics
- interface Blocking_Sync_None
- {
- /// Receives a potentially big payload, and then
- /// blocks for a user specified time.
- /**
- * If SYNC_NONE is implemented correctly multiple calls to this
- * method should not block. However, if the semantics are wrong
- * the method will block for as long as the previous request sleep
- * time is.
- */
- oneway void slow_operation (in Payload the_payload,
- in unsigned long sleep_microseconds);
-
- /// Shutdown the server
- void shutdown ();
- };
-};
diff --git a/TAO/tests/Blocking_Sync_None/client.cpp b/TAO/tests/Blocking_Sync_None/client.cpp
deleted file mode 100644
index 2bff1936b7b..00000000000
--- a/TAO/tests/Blocking_Sync_None/client.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_sys_time.h"
-
-ACE_RCSID(Blocking_Sync_None, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int iterations = 1000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <iterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Blocking_Sync_None_var blocking_sync_none =
- Test::Blocking_Sync_None::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (blocking_sync_none.in ()))
- ACE_ERROR_RETURN ((LM_DEBUG,
- "ERROR: Nil reference in Blocking_Sync_None reference <%s>\n",
- ior),
- 1);
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_NONE;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const int payload_length = 65536;
- const unsigned int sleep_milliseconds = 20;
- const unsigned int sleep_microseconds = sleep_milliseconds * 1000;
-
- Test::Payload payload(payload_length);
- payload.length (payload_length);
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Test running . . .\n"));
- int blocked_calls = 0;
- for (int i = 0; i != iterations; ++i)
- {
- ACE_Time_Value start = ACE_OS::gettimeofday ();
-
- blocking_sync_none->slow_operation (payload,
- sleep_microseconds
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value elapsed = ACE_OS::gettimeofday ();
- elapsed -= start;
-
- if (elapsed.msec () >= sleep_milliseconds)
- {
- blocked_calls++;
- }
- }
-
- blocking_sync_none->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (blocked_calls > iterations / 20)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: More than 5% (%d) of the calls blocked\n",
- blocked_calls));
- return 1;
- }
-
- if (blocked_calls != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Warning: Some (%d) SYNC_NONE calls blocked\n",
- blocked_calls));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Blocking_Sync_None/run_test.pl b/TAO/tests/Blocking_Sync_None/run_test.pl
deleted file mode 100755
index 51325a4dc56..00000000000
--- a/TAO/tests/Blocking_Sync_None/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Blocking_Sync_None/server.cpp b/TAO/tests/Blocking_Sync_None/server.cpp
deleted file mode 100644
index a774b6cdf83..00000000000
--- a/TAO/tests/Blocking_Sync_None/server.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "Blocking_Sync_None.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Blocking_Sync_None, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Blocking_Sync_None *blocking_sync_none_impl;
- ACE_NEW_RETURN (blocking_sync_none_impl,
- Blocking_Sync_None (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(blocking_sync_none_impl);
-
- Test::Blocking_Sync_None_var blocking_sync_none =
- blocking_sync_none_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (blocking_sync_none.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1020_Basic_Regression/.cvsignore b/TAO/tests/Bug_1020_Basic_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc b/TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc
deleted file mode 100644
index 792a118237c..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Bug_1020_Basic_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Echo_Caller.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- Echo.cpp
- Client_Task.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Client_Task.cpp b/TAO/tests/Bug_1020_Basic_Regression/Client_Task.cpp
deleted file mode 100644
index b29d2a35687..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Client_Task.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Client_Task.h b/TAO/tests/Bug_1020_Basic_Regression/Client_Task.h
deleted file mode 100644
index d7dd17a1a17..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Client_Task.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BUG_1020_BASIC_REGRESSION_CLIENT_TASK_H
-#define BUG_1020_BASIC_REGRESSION_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (CORBA::ORB_ptr orb);
-
- /// Thread entry point
- int svc (void);
-
-private:
-
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BUG_1020_BASIC_REGRESSION_CLIENT_TASK_H*/
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Echo.cpp b/TAO/tests/Bug_1020_Basic_Regression/Echo.cpp
deleted file mode 100644
index fefd938cd40..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Echo.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "Echo.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Bug_1269_Regression, Echo, "$Id$")
-
-Echo::Echo(CORBA::ORB_ptr orb,
- int abort_counter)
- : orb_(CORBA::ORB::_duplicate(orb))
- , abort_counter_ (abort_counter),
- mutex_ ()
-{
-}
-
-void
-Echo::echo_payload (Test::Payload &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_MT (ACE_GUARD (ACE_SYNCH_MUTEX,
- ace_mon,
- this->mutex_));
-
- this->abort_counter_--;
-
- if (this->abort_counter_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, sleeping\n"));
-
- // Sleep for 10 seconds, forcing a flow control of some kind.
- ACE_OS::sleep (5);
-
- // Run the ORB for a while, to generate a short-lived release of
- // the flow control.
- /*ACE_Time_Value tv (0, 10000);
- this->orb_->run (tv);*/
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Echo::echo_payload, aborting\n"));
-
- // Kill the app
- ACE_OS::abort();
- }
-}
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Echo.h b/TAO/tests/Bug_1020_Basic_Regression/Echo.h
deleted file mode 100644
index 8175f5ec3a3..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Echo.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-/**
- * @file Echo.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef BUG_1020_BASIC_REGRESSION_ECHO_H
-#define BUG_1020_BASIC_REGRESSION_ECHO_H
-#include "TestS.h"
-
-class Echo : public POA_Test::Echo
-{
-public:
-
- Echo (CORBA::ORB_ptr orb,
- int abort_counter);
-
- virtual void echo_payload (Test::Payload & data
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
- int abort_counter_;
-
- ACE_SYNCH_MUTEX mutex_;
-};
-
-#endif /* BUG_1020_BASIC_REGRESSION_ECHO_H*/
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.cpp b/TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.cpp
deleted file mode 100644
index b1922f2d3e3..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "Echo_Caller.h"
-#include "Server_Task.h"
-
-ACE_RCSID (Bug_1020_Basic_Regression,
- Echo_Caller,
- "$Id$")
-
-Echo_Caller::Echo_Caller(CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate(orb))
-{
-}
-
-void
-Echo_Caller::start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- Server_Task task (client,
- 32768);
-
- if (task.activate (THR_NEW_LWP | THR_JOINABLE,
- 4,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "Error activating client task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- return;
-}
-
-void
-Echo_Caller::shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Server received shutdown message\n"));
- orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.h b/TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.h
deleted file mode 100644
index f7d2688fabd..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Echo_Caller.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file Echo_Caller.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef BUG_1020_BASIC_REGRESSION_ECHO_CALLER_H
-#define BUG_1020_BASIC_REGRESSION_ECHO_CALLER_H
-#include "TestS.h"
-
-class Echo_Caller : public POA_Test::Echo_Caller
-{
-public:
- Echo_Caller (CORBA::ORB_ptr orb);
-
- virtual void start_task (Test::Echo_ptr client
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* BUG_1020_BASIC_REGRESSION_ECHO_CALLER_H*/
diff --git a/TAO/tests/Bug_1020_Basic_Regression/README b/TAO/tests/Bug_1020_Basic_Regression/README
deleted file mode 100644
index d20377f2685..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/README
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
-
-@page Bug_1020_Basic_Regression Test README File
-
- The simplest possible test BUG 1020 regression for TAO. This
-is a very simple test for TAO.
-
-
- The test does the following
-
-- A server waits for a request from the client
-
-- The client sends a request with a reference to the object that it
- has instantiated and registered with the POA. The client in addiiotn
- creates 4 threads to run the ORB event loop.
-
-- The server on receiving the request in the main thread creates 4
- more threads and starts making invocation on the client using the
- reference it got from the client.
-
-- The client threads after processing a few invocation abort, there by
- crashing the client.
-
-- The server should survive the crash
-
-- The test passes sequence<octet> between client and server in either
- direction with the purpose of ensuring that the tranport gets flow
- controlled.
-
-To run the test
-
-$ ./server -o file_name
-$ while /bin/true; ./client -k file://file_name; done;
-
-The client will run in a loop, crash and get started again. The server
-should just survive
-
-The test doesnt stress the server by having more than one client and
-crashing all of them. There is another test that tests that
-scenario. Hence please dont add that capability to this test.
-
-*/
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Server_Task.cpp b/TAO/tests/Bug_1020_Basic_Regression/Server_Task.cpp
deleted file mode 100644
index 6e68c8b1c98..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "Server_Task.h"
-
-
-ACE_RCSID (Bug_1020_Basic_Regression,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (Test::Echo_ptr echo,
- size_t sz)
- : echo_ (Test::Echo::_duplicate (echo)),
- sz_ (sz)
-
-{
-}
-
-int
-Server_Task::svc (void)
-{
- Test::Payload payload (32768);
- payload.length (32768);
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Send messages till the remote guy crashes
- for (;;)
- {
- this->echo_->echo_payload (payload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- ACE_NOTREACHED (return 0);
-}
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Server_Task.h b/TAO/tests/Bug_1020_Basic_Regression/Server_Task.h
deleted file mode 100644
index d79314ea1af..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Server_Task.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file Server_Task.h
- *
- * $Id$
- *
- * @author Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
- *
- */
-#ifndef BUG_1020_SERVER_TASK_H
-#define BUG_1020_SERVER_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Server_Task : public ACE_Task_Base
-{
-public:
-
- /// Constructor
- Server_Task (Test::Echo_ptr echo,
- size_t sz);
-
- /// The thread entry point.
- virtual int svc (void);
-
-private:
- /// Reference to the test interface
- Test::Echo_var echo_;
-
- /// Size of data that is traded
- size_t sz_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BUG_1020_SERVER_TASK_H*/
diff --git a/TAO/tests/Bug_1020_Basic_Regression/Test.idl b/TAO/tests/Bug_1020_Basic_Regression/Test.idl
deleted file mode 100644
index 6d876f27312..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/Test.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef BUG_1020_TEST_IDL
-#define BUG_1020_TEST_IDL
-
-module Test
-{
- typedef sequence<octet> Payload;
-
- interface Echo
- {
- void echo_payload (inout Payload data);
- };
-
- interface Echo_Caller
- {
- void start_task(in Echo client);
-
- oneway void shutdown();
- };
-};
-
-#endif /* BUG_1020_TEST_IDL */
diff --git a/TAO/tests/Bug_1020_Basic_Regression/client.cpp b/TAO/tests/Bug_1020_Basic_Regression/client.cpp
deleted file mode 100644
index 7deb646b538..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/client.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-// $Id$
-
-#include "Echo.h"
-#include "Client_Task.h"
-#include "tao/Utils/Servant_Var.h"
-#include "ace/Get_Opt.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID (Bug_1020_Basic_Regression,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_TRANSPORT;
-
- CORBA::PolicyList policies(1);
- policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo> impl;
- {
- Echo * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo (orb.in (), 100),
- 1);
- impl = tmp;
- }
-
- Test::Echo_var echo =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (echo.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo_Caller reference <%s>\n",
- ior),
- 1);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task ctask (orb.in ());
-
- server->start_task (echo.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ctask.activate (THR_NEW_LWP | THR_JOINABLE,
- 4,
- 1) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "Error activating client task\n"));
-
- return 1;
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - event loop finished\n"));
-
- // Actually the code here should never be reached.
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1020_Basic_Regression/run_test.pl b/TAO/tests/Bug_1020_Basic_Regression/run_test.pl
deleted file mode 100755
index c712b41efc6..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/run_test.pl
+++ /dev/null
@@ -1,57 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-local $start_time = time();
-local $max_running_time = 300; # 5 minutes
-local $elapsed = time() - $start_time;
-
- print STDERR "elaped is $elapsed\n";
-while($elapsed < $max_running_time) {
- print STDERR "**************************** \n";
- # Start all clients in parallel
- $client = $CL->Spawn ();
-
- # ... wait for the clients to die unless they did not startup,
- # ignore errors because they intentionally crash themselves!
- $CL->WaitKill(30) unless $client < 0;
-
- $elapsed = time() - $start_time;
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1020_Basic_Regression/server.cpp b/TAO/tests/Bug_1020_Basic_Regression/server.cpp
deleted file mode 100644
index 4f62134a66f..00000000000
--- a/TAO/tests/Bug_1020_Basic_Regression/server.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-// $Id$
-
-#include "Echo_Caller.h"
-#include "tao/ORB_Core.h"
-#include "tao/Utils/Servant_Var.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1020_Basic_Regression,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo_Caller> impl;
- {
- Echo_Caller * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo_Caller (orb.in()),
- 1);
- impl = tmp;
- }
-
- Test::Echo_Caller_var server =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1020_Regression/.cvsignore b/TAO/tests/Bug_1020_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1020_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1020_Regression/Bug_1020_Regression.mpc b/TAO/tests/Bug_1020_Regression/Bug_1020_Regression.mpc
deleted file mode 100644
index 02b8056c191..00000000000
--- a/TAO/tests/Bug_1020_Regression/Bug_1020_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- ORB_Task.cpp
- Server_i.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, messaging {
- Source_Files {
- Echo.cpp
- ORB_Task.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1020_Regression/Echo.cpp b/TAO/tests/Bug_1020_Regression/Echo.cpp
deleted file mode 100644
index 3bfcf379a01..00000000000
--- a/TAO/tests/Bug_1020_Regression/Echo.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file Echo.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo.h"
-
-ACE_RCSID(Notify_Crash, Echo, "$Id$")
-
-Echo::Echo(CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-Test::Payload *
-Echo::echo_payload(Test::Payload const &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ACE_Time_Value tick(0, 10000);
- orb_->run(tick);
-
- Test::Payload_var pload(new Test::Payload);
- pload->length(1024);
- return pload._retn();
-}
diff --git a/TAO/tests/Bug_1020_Regression/Echo.h b/TAO/tests/Bug_1020_Regression/Echo.h
deleted file mode 100644
index e6928d28bb0..00000000000
--- a/TAO/tests/Bug_1020_Regression/Echo.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef Echo__h_
-#define Echo__h_
-/**
- * @file Echo.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "TestS.h"
-
-class Echo : public POA_Test::Echo
-{
-public:
- Echo(CORBA::ORB_ptr orb);
-
- virtual Test::Payload * echo_payload (Test::Payload const & data
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* Echo__h_ */
diff --git a/TAO/tests/Bug_1020_Regression/Echo_Callback.cpp b/TAO/tests/Bug_1020_Regression/Echo_Callback.cpp
deleted file mode 100644
index 1719e29eaf2..00000000000
--- a/TAO/tests/Bug_1020_Regression/Echo_Callback.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * @file Echo_Callback.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo_Callback.h"
-
-ACE_RCSID(Notify_Crash, Echo_Callback, "$Id$")
-
-Echo_Callback::Echo_Callback()
-{
-}
-
-void
-Echo_Callback::echo_payload(Test::Payload const &
- TAO_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- static int n = 0;
- n++;
- if(n == 30)
- ACE_OS::abort();
-
- ACE_Time_Value tick(0, 20000);
- ACE_OS::sleep(tick);
-}
-
-void
-Echo_Callback::echo_payload_excep(Test::AMI_EchoExceptionHolder *
- TAO_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/Bug_1020_Regression/Echo_Callback.h b/TAO/tests/Bug_1020_Regression/Echo_Callback.h
deleted file mode 100644
index 8bbc6465755..00000000000
--- a/TAO/tests/Bug_1020_Regression/Echo_Callback.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef Echo_Callback__h_
-#define Echo_Callback__h_
-/**
- * @file Echo_Callback.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "TestS.h"
-
-class Echo_Callback : public POA_Test::AMI_EchoHandler
-{
-public:
- Echo_Callback();
-
- virtual void echo_payload (Test::Payload const & ami_return_val
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
- virtual void echo_payload_excep (Test::AMI_EchoExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-};
-
-#endif /* Echo__h_ */
diff --git a/TAO/tests/Bug_1020_Regression/ORB_Task.cpp b/TAO/tests/Bug_1020_Regression/ORB_Task.cpp
deleted file mode 100644
index 86bdeedf8b3..00000000000
--- a/TAO/tests/Bug_1020_Regression/ORB_Task.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file ORB_Task.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "ORB_Task.h"
-#include "tao/Environment.h"
-
-ACE_RCSID(Bug_1230_Regression, ORB_Task, "$Id$")
-
-ORB_Task::ORB_Task(CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-int
-ORB_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH(CORBA::Exception, ex)
- {
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Bug_1020_Regression/ORB_Task.h b/TAO/tests/Bug_1020_Regression/ORB_Task.h
deleted file mode 100644
index 55ce8c75d3d..00000000000
--- a/TAO/tests/Bug_1020_Regression/ORB_Task.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef ORB_Task__h_
-#define ORB_Task__h_
-/**
- * @file ORB_Task.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-class ORB_Task : public ACE_Task_Base
-{
-public:
- ORB_Task(CORBA::ORB_ptr orb);
-
- virtual int svc (void);
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* ORB_Task__h_ */
diff --git a/TAO/tests/Bug_1020_Regression/Server_Task.cpp b/TAO/tests/Bug_1020_Regression/Server_Task.cpp
deleted file mode 100644
index d3f158f31da..00000000000
--- a/TAO/tests/Bug_1020_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file Server_Task.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Server_Task.h"
-
-ACE_RCSID(Bug_1230_Regression, Server_Task, "$Id$")
-
-Server_Task::Server_Task(Test::Echo_ptr echo)
- : echo_(Test::Echo::_duplicate(echo))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- Test::Payload pload(16); pload.length(16);
- int stop_loop = 0;
- for(int i = 0; i != 1000000 && !stop_loop; ++i)
- {
- ACE_TRY
- {
- Test::Payload_var result =
- this->echo_->echo_payload (pload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- stop_loop = 1;
- }
- ACE_ENDTRY;
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_1020_Regression/Server_Task.h b/TAO/tests/Bug_1020_Regression/Server_Task.h
deleted file mode 100644
index 04dcdbbc98e..00000000000
--- a/TAO/tests/Bug_1020_Regression/Server_Task.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef Server_Task__h_
-#define Server_Task__h_
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (Test::Echo_ptr echo);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the test interface
- Test::Echo_var echo_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* Server_Task__h_ */
diff --git a/TAO/tests/Bug_1020_Regression/Server_i.cpp b/TAO/tests/Bug_1020_Regression/Server_i.cpp
deleted file mode 100644
index 86127418175..00000000000
--- a/TAO/tests/Bug_1020_Regression/Server_i.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "Server_i.h"
-#include "Server_Task.h"
-
-ACE_RCSID (Bug_1230_Regression,
- Server, "$Id$")
-
-Server::Server(CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-void
-Server::start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- Server_Task * task =
- new Server_Task(client);
- task->activate(THR_NEW_LWP|THR_DETACHED);
-}
diff --git a/TAO/tests/Bug_1020_Regression/Server_i.h b/TAO/tests/Bug_1020_Regression/Server_i.h
deleted file mode 100644
index 75fb33dbdd0..00000000000
--- a/TAO/tests/Bug_1020_Regression/Server_i.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @file Server_i.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef BUG_1020_REGRESSION_SERVER_I_H
-#define BUG_1020_REGRESSION_SERVER_I_H
-
-#include "TestS.h"
-
-class Server : public POA_Test::Server
-{
-public:
- Server(CORBA::ORB_ptr orb);
-
- virtual void start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* BUG_1020_REGRESSION_SERVER_I_H*/
diff --git a/TAO/tests/Bug_1020_Regression/Test.idl b/TAO/tests/Bug_1020_Regression/Test.idl
deleted file mode 100644
index 3b4828eb758..00000000000
--- a/TAO/tests/Bug_1020_Regression/Test.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef BUG_1020_REGRESSION_TEST_IDL
-#define BUG_1020_REGRESSION_TEST_IDL
-
-module Test
-{
- typedef sequence<octet> Payload;
- interface Echo
- {
- Payload echo_payload (in Payload data);
- };
-
- interface Server
- {
- void start_task (in Echo client);
- };
-};
-
-#endif /* BUG_1020_REGRESSION_TEST_IDL*/
diff --git a/TAO/tests/Bug_1020_Regression/client.cpp b/TAO/tests/Bug_1020_Regression/client.cpp
deleted file mode 100644
index 63209f90483..00000000000
--- a/TAO/tests/Bug_1020_Regression/client.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-// $Id$
-
-#include "Echo.h"
-#include "ORB_Task.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Bug_1230_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-class Crasher : public ACE_Event_Handler
-{
-public:
- Crasher();
-
- virtual int handle_timeout (ACE_Time_Value const & current_time,
- void const * arg);
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_TRANSPORT;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo> impl;
- {
- Echo * tmp = 0;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo(orb.in()),
- 1);
- impl = tmp;
- }
-
- Test::Echo_var echo =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Server_var server =
- Test::Server::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (echo.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Server reference <%s>\n",
- ior),
- 1);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Crasher crasher;
-
- // Crash after 15 seconds
- ACE_Time_Value interval(15, 0);
- ACE_Reactor * reactor = orb->orb_core()->reactor();
- reactor->schedule_timer(&crasher, 0, interval, interval);
-
- ORB_Task task(orb.in());
- task.activate(THR_NEW_LWP | THR_JOINABLE, 4, 1);
-
- Test::Payload payload(16); payload.length(16);
- for(int i = 0; i != 4; ++i)
- {
- server->start_task(echo.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- task.wait();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - event loop finished\n"));
-
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-Crasher::Crasher()
-{
-}
-
-int
-Crasher::handle_timeout (ACE_Time_Value const & ,
- void const *)
-{
- ACE_OS::abort();
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1020_Regression/run_test.pl b/TAO/tests/Bug_1020_Regression/run_test.pl
deleted file mode 100755
index 18a834079b0..00000000000
--- a/TAO/tests/Bug_1020_Regression/run_test.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBdotteddecimaladdresses 1");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBdotteddecimaladdresses 1");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-local $start_time = time();
-local $max_running_time = 300; # 5 minutes
-local $elapsed = time() - $start_time;
-
-while($elapsed < $max_running_time) {
- # Start all clients in parallel
- $client1 = $CL1->Spawn ();
- $client2 = $CL2->Spawn ();
- $client3 = $CL3->Spawn ();
-
- # ... wait for the clients to die unless they did not startup,
- # ignore errors because they intentionally crash themselves!
- $CL3->WaitKill(30) unless $client3 < 0;
- $CL2->WaitKill(30) unless $client2 < 0;
- $CL1->WaitKill(30) unless $client1 < 0;
-
- $elapsed = time() - $start_time;
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-
-exit $status;
diff --git a/TAO/tests/Bug_1020_Regression/server.cpp b/TAO/tests/Bug_1020_Regression/server.cpp
deleted file mode 100644
index c71b63fba8c..00000000000
--- a/TAO/tests/Bug_1020_Regression/server.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// $Id$
-
-#include "Server_i.h"
-#include "ORB_Task.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (Bug_1230_Regression,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-#if defined (ACE_OPENVMS)
-// need this to circumvent link error on OpenVMS
-// has to do with interference in template instantiations
-// for the server build by previous compilation of TestX
-// components in client build which are reused by server
-// without recompilation
-ACE_Time_Value dum = ACE_Time_Value::zero;
-#endif
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Server> impl;
- {
- Server * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Server(orb.in()),
- 1);
- impl = tmp;
- }
-
- Test::Server_var server =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ORB_Task task(orb.in());
- task.activate(THR_NEW_LWP | THR_JOINABLE, 4, 1);
-
- task.wait();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1254_Regression/BlobServer.cpp b/TAO/tests/Bug_1254_Regression/BlobServer.cpp
deleted file mode 100644
index e5cd2a202e5..00000000000
--- a/TAO/tests/Bug_1254_Regression/BlobServer.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-#include "BlobServer.h"
-
-ACE_RCSID(BlobServerImpl, BlobServerImpl, "$Id$")
-
-BlobServerImpl::BlobServerImpl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-/// Implement the BlobServer interface
-void
-BlobServerImpl::test(
- BlobType1& blob1,
- BlobType2& blob2
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- blob1.length(10);
- for(int i = 0; i < 10; i++)
- {
- blob1[i] = 'A' + i;
- }
-
- blob2.length(10);
- for(int i = 0; i < 10; i++)
- {
- blob2[i] = 'A' + i;
- }
-}
-
-void
-BlobServerImpl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_1254_Regression/BlobServer.h b/TAO/tests/Bug_1254_Regression/BlobServer.h
deleted file mode 100644
index 89d707bac6d..00000000000
--- a/TAO/tests/Bug_1254_Regression/BlobServer.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef BLOBSERVER_H
-#define BLOBSERVER_H
-#include /**/ "ace/pre.h"
-
-#include "testS.h"
-
-class BlobServerImpl
- : public virtual POA_BlobServer
-{
-public:
- /// Constructor
- BlobServerImpl (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void test(
- BlobType1& blob1,
- BlobType2& blob2
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to convert strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* BLOBSERVER_H */
diff --git a/TAO/tests/Bug_1254_Regression/Bug_1254_Regression.mpc b/TAO/tests/Bug_1254_Regression/Bug_1254_Regression.mpc
deleted file mode 100644
index 106400400ae..00000000000
--- a/TAO/tests/Bug_1254_Regression/Bug_1254_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- BlobServer.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver {
- exename = client
- after += *Server
- Source_Files {
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_1254_Regression/client.cpp b/TAO/tests/Bug_1254_Regression/client.cpp
deleted file mode 100644
index 10167eb8195..00000000000
--- a/TAO/tests/Bug_1254_Regression/client.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-#include "testC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int main(int argc, char* argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- BlobServer_var blobServer = BlobServer::_narrow(tmp.in());
- if(CORBA::is_nil(blobServer.in()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test\n"));
-
- BlobType1 blob1;
-
- blob1.length(16384);
- for(CORBA::ULong i = 0; i < blob1.length(); i++)
- {
- blob1[i] = i & 255;
- }
-
- BlobType2 blob2;
-
- blobServer->test(blob1, blob2);
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - checking reply for ABCDEFGHIJ\n"));
-
- for(CORBA::ULong i = 0; i < blob1.length(); i++)
- {
- if (blob1[i] != static_cast <CORBA::Octet> ('A' + i))
- {
- ACE_ERROR ((LM_ERROR,
- "Error invalid value detected on position <%d> in blob1\n",
- i));
- }
- }
-
- for(CORBA::ULong i = 0; i < blob2.length(); i++)
- {
- if (blob2[i] != static_cast <CORBA::Octet> ('A' + i))
- {
- ACE_ERROR ((LM_ERROR,
- "Error invalid value detected on position <%d> in blob2\n",
- i));
- }
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - shutdown\n"));
-
- blobServer->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
diff --git a/TAO/tests/Bug_1254_Regression/run_test.pl b/TAO/tests/Bug_1254_Regression/run_test.pl
deleted file mode 100755
index cb77b93fe3e..00000000000
--- a/TAO/tests/Bug_1254_Regression/run_test.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1254_Regression/server.cpp b/TAO/tests/Bug_1254_Regression/server.cpp
deleted file mode 100644
index 6f4f48cd03f..00000000000
--- a/TAO/tests/Bug_1254_Regression/server.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-#include "BlobServer.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (BlobServer,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- BlobServerImpl *blob_impl;
- ACE_NEW_RETURN (blob_impl,
- BlobServerImpl (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(blob_impl);
-
- BlobServer_var blob =
- blob_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (blob.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1254_Regression/test.idl b/TAO/tests/Bug_1254_Regression/test.idl
deleted file mode 100644
index 87b8160821e..00000000000
--- a/TAO/tests/Bug_1254_Regression/test.idl
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * "test" IDL interface for the CORBA_MARSHALL exception with sequence<octed>
- * as inout parameters (bug#1254).
- *
- * @author Kees van Marle <kvmarle@ermedy.nl>
- */
-//=============================================================================
-
-
-typedef sequence<octet> BlobType1;
-typedef sequence<octet> BlobType2;
-
-interface BlobServer
-{
- void test(inout BlobType1 blob1, inout BlobType2 blob2);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
-};
-
-
-
diff --git a/TAO/tests/Bug_1269_Regression/.cvsignore b/TAO/tests/Bug_1269_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1269_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc b/TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc
deleted file mode 100644
index e38622c756d..00000000000
--- a/TAO/tests/Bug_1269_Regression/Bug_1269_Regression.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Echo_Caller.cpp
- Server_Timer.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- Echo.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1269_Regression/Echo.cpp b/TAO/tests/Bug_1269_Regression/Echo.cpp
deleted file mode 100644
index df84e9fcbf1..00000000000
--- a/TAO/tests/Bug_1269_Regression/Echo.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @file Echo.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Bug_1269_Regression, Echo, "$Id$")
-
-Echo::Echo(CORBA::ORB_ptr orb,
- int abort_counter)
- : orb_(CORBA::ORB::_duplicate(orb))
- , abort_counter_(abort_counter)
-{
-}
-
-void
-Echo::echo_payload(Test::Payload const &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->abort_counter_--;
-
- if (this->abort_counter_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, sleeping\n"));
- // Sleep for 15 seconds, forcing a flow control of some kind.
- ACE_OS::sleep(15);
-
- // Run the ORB for a while, to generate a short-lived release of
- // the flow control.
- ACE_Time_Value tv(0, 10000);
- this->orb_->run(tv);
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, aborting\n"));
- // Kill the app
- ACE_OS::abort();
- }
-}
diff --git a/TAO/tests/Bug_1269_Regression/Echo.h b/TAO/tests/Bug_1269_Regression/Echo.h
deleted file mode 100644
index 4f1f2938ca6..00000000000
--- a/TAO/tests/Bug_1269_Regression/Echo.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef Echo__h_
-#define Echo__h_
-/**
- * @file Echo.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "TestS.h"
-
-class Echo : public POA_Test::Echo
-{
-public:
- Echo(CORBA::ORB_ptr orb,
- int abort_counter);
-
- virtual void echo_payload (Test::Payload const & data
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
- int abort_counter_;
-};
-
-#endif /* Echo__h_ */
diff --git a/TAO/tests/Bug_1269_Regression/Echo_Caller.cpp b/TAO/tests/Bug_1269_Regression/Echo_Caller.cpp
deleted file mode 100644
index 2a8e075b4de..00000000000
--- a/TAO/tests/Bug_1269_Regression/Echo_Caller.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file Echo_Caller.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo_Caller.h"
-#include "Server_Timer.h"
-#include "tao/ORB_Core.h"
-
-ACE_RCSID(Bug_1269_Regression, Echo_Caller, "$Id$")
-
-Echo_Caller::Echo_Caller(CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-void
-Echo_Caller::start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- Server_Timer * task =
- new Server_Timer(client, orb_->orb_core()->reactor());
- task->activate();
-
- task =
- new Server_Timer(client, orb_->orb_core()->reactor());
- task->activate();
-}
-
-void
-Echo_Caller::shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Server received shutdown message\n"));
- orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_1269_Regression/Echo_Caller.h b/TAO/tests/Bug_1269_Regression/Echo_Caller.h
deleted file mode 100644
index f9185f51576..00000000000
--- a/TAO/tests/Bug_1269_Regression/Echo_Caller.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef Echo_Caller__h_
-#define Echo_Caller__h_
-/**
- * @file Echo_Caller.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "TestS.h"
-
-class Echo_Caller : public POA_Test::Echo_Caller
-{
-public:
- Echo_Caller(CORBA::ORB_ptr orb);
-
- virtual void start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* Echo_Caller__h_ */
diff --git a/TAO/tests/Bug_1269_Regression/ORB_Task.cpp b/TAO/tests/Bug_1269_Regression/ORB_Task.cpp
deleted file mode 100644
index 7182d663207..00000000000
--- a/TAO/tests/Bug_1269_Regression/ORB_Task.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file ORB_Task.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "ORB_Task.h"
-#include "tao/Environment.h"
-
-ACE_RCSID(Bug_1269_Regression, ORB_Task, "$Id$")
-
-ORB_Task::ORB_Task(CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-int
-ORB_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH(CORBA::Exception, ex)
- {
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Bug_1269_Regression/ORB_Task.h b/TAO/tests/Bug_1269_Regression/ORB_Task.h
deleted file mode 100644
index 55ce8c75d3d..00000000000
--- a/TAO/tests/Bug_1269_Regression/ORB_Task.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef ORB_Task__h_
-#define ORB_Task__h_
-/**
- * @file ORB_Task.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-class ORB_Task : public ACE_Task_Base
-{
-public:
- ORB_Task(CORBA::ORB_ptr orb);
-
- virtual int svc (void);
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* ORB_Task__h_ */
diff --git a/TAO/tests/Bug_1269_Regression/Server_Timer.cpp b/TAO/tests/Bug_1269_Regression/Server_Timer.cpp
deleted file mode 100644
index 66fbce3ae34..00000000000
--- a/TAO/tests/Bug_1269_Regression/Server_Timer.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @file Server_Timer.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Server_Timer.h"
-#include "ace/Reactor.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Bug_1269_Regression, Server_Timer, "$Id$")
-
-Server_Timer::Server_Timer(Test::Echo_ptr echo,
- ACE_Reactor * reactor)
- : ACE_Event_Handler (reactor)
- , echo_(Test::Echo::_duplicate(echo))
-{
-}
-
-void
-Server_Timer::activate (void)
-{
- ACE_Time_Value tv (0, 20000);
- this->reactor()->schedule_timer (this, 0, tv);
-}
-
-int
-Server_Timer::handle_timeout (ACE_Time_Value const &, void const *)
-{
- Test::Payload pload(1024);
- pload.length(1024);
-
- ACE_OS::memset(pload.get_buffer(), pload.length(), 0);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- Test::Echo_var echo =
- Test::Echo::_duplicate (this->echo_.in());
-
- if(CORBA::is_nil (echo.in()))
- return 0;
-
- echo->echo_payload (pload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (0, 20000);
- this->reactor()->schedule_timer (this, 0, tv);
- }
- ACE_CATCHANY
- {
- this->echo_ = Test::Echo::_nil ();
-
- this->reactor()->cancel_timer(this);
-
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-Server_Timer::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- delete this;
- return 0;
-}
diff --git a/TAO/tests/Bug_1269_Regression/Server_Timer.h b/TAO/tests/Bug_1269_Regression/Server_Timer.h
deleted file mode 100644
index 23024cf8e4d..00000000000
--- a/TAO/tests/Bug_1269_Regression/Server_Timer.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file Server_Timer.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-
-#ifndef Server_Timer__h_
-#define Server_Timer__h_
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Event_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Server_Timer : public ACE_Event_Handler
-{
-public:
- /// Constructor
- Server_Timer (Test::Echo_ptr echo, ACE_Reactor * reactor);
-
- void activate (void);
-
- /// Thread entry point
- int handle_timeout(ACE_Time_Value const & tv, void const *);
- int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
-
-private:
- /// Reference to the test interface
- Test::Echo_var echo_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* Server_Timer__h_ */
diff --git a/TAO/tests/Bug_1269_Regression/Test.idl b/TAO/tests/Bug_1269_Regression/Test.idl
deleted file mode 100644
index fe3f7a57c4c..00000000000
--- a/TAO/tests/Bug_1269_Regression/Test.idl
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Test__idl_
-#define Test__idl_
-
-module Test
-{
- typedef sequence<octet> Payload;
- interface Echo
- {
- void echo_payload(in Payload data);
- };
-
- interface Echo_Caller
- {
- void start_task(in Echo client);
-
- oneway void shutdown();
- };
-};
-
-#endif /* Test__idl_ */
diff --git a/TAO/tests/Bug_1269_Regression/client.cpp b/TAO/tests/Bug_1269_Regression/client.cpp
deleted file mode 100644
index 50b19d24f84..00000000000
--- a/TAO/tests/Bug_1269_Regression/client.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// $Id$
-
-#include "Echo.h"
-#include "ORB_Task.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1269_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_TRANSPORT;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo> impl;
- {
- Echo * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo(orb.in(), 100),
- 1);
- impl = tmp;
- }
-
- Test::Echo_var echo =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (echo.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo_Caller reference <%s>\n",
- ior),
- 1);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->start_task(echo.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - event loop finished\n"));
-
- // Actually the code here should never be reached.
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1269_Regression/run_test.pl b/TAO/tests/Bug_1269_Regression/run_test.pl
deleted file mode 100755
index dab459717ee..00000000000
--- a/TAO/tests/Bug_1269_Regression/run_test.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-local $start_time = time();
-local $max_running_time = 240; # 4 minutes
-local $elapsed = time() - $start_time;
-
-while($elapsed < $max_running_time) {
- # Start all clients in parallel
- $client1 = $CL1->Spawn ();
- $client2 = $CL2->Spawn ();
- $client3 = $CL3->Spawn ();
-
- # ... wait for the clients to die unless they did not startup,
- # ignore errors because they intentionally crash themselves!
- $CL3->WaitKill(45) unless $client3 < 0;
- $CL2->WaitKill(45) unless $client2 < 0;
- $CL1->WaitKill(45) unless $client1 < 0;
-
- $elapsed = time() - $start_time;
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1269_Regression/server.cpp b/TAO/tests/Bug_1269_Regression/server.cpp
deleted file mode 100644
index 2e89b271b31..00000000000
--- a/TAO/tests/Bug_1269_Regression/server.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// $Id$
-
-#include "Echo_Caller.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1269_Regression, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo_Caller> impl;
- {
- Echo_Caller * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo_Caller(orb.in()),
- 1);
- impl = tmp;
- }
-
- Test::Echo_Caller_var server =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1269_Regression/shutdown.cpp b/TAO/tests/Bug_1269_Regression/shutdown.cpp
deleted file mode 100644
index e48142df37f..00000000000
--- a/TAO/tests/Bug_1269_Regression/shutdown.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1269_Regression, shutdown, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow (tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo_Caller reference <%s>\n",
- ior),
- 1);
- }
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1270_Regression/.cvsignore b/TAO/tests/Bug_1270_Regression/.cvsignore
deleted file mode 100644
index d955c473987..00000000000
--- a/TAO/tests/Bug_1270_Regression/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-client
-server
-shutdown
diff --git a/TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc b/TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc
deleted file mode 100644
index 146c41a5026..00000000000
--- a/TAO/tests/Bug_1270_Regression/Bug_1270_Regression.mpc
+++ /dev/null
@@ -1,25 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Echo_Caller.cpp
- Server_Timer.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- Echo.cpp
- client.cpp
- }
-}
-
-project(*Shutdown): taoexe, messaging {
- after += *Client
- Source_Files {
- shutdown.cpp
- }
-}
diff --git a/TAO/tests/Bug_1270_Regression/Echo.cpp b/TAO/tests/Bug_1270_Regression/Echo.cpp
deleted file mode 100644
index df37f3c644b..00000000000
--- a/TAO/tests/Bug_1270_Regression/Echo.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @file Echo.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Bug_1270_Regression, Echo, "$Id$")
-
-Echo::Echo(CORBA::ORB_ptr orb,
- int abort_counter)
- : orb_(CORBA::ORB::_duplicate(orb))
- , abort_counter_(abort_counter)
-{
-}
-
-void
-Echo::echo_payload(Test::Payload const &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->abort_counter_--;
-
- if (this->abort_counter_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, sleeping\n"));
- // Sleep for 15 seconds, forcing a flow control of some kind.
- ACE_OS::sleep(15);
-
- // Run the ORB for a while, to generate a short-lived release of
- // the flow control.
- ACE_Time_Value tv(0, 10000);
- this->orb_->perform_work(tv);
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, aborting\n"));
- // Kill the app
- ACE_OS::abort();
- }
-}
diff --git a/TAO/tests/Bug_1270_Regression/Echo.h b/TAO/tests/Bug_1270_Regression/Echo.h
deleted file mode 100644
index ba9fc0be452..00000000000
--- a/TAO/tests/Bug_1270_Regression/Echo.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-/**
- * @file Echo.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef TAO_TESTS_BUG1270_ECHO_H
-#define TAO_TESTS_BUG1270_ECHO_H
-
-#include "TestS.h"
-
-class Echo : public POA_Test::Echo
-{
-public:
- Echo(CORBA::ORB_ptr orb,
- int abort_counter);
-
- virtual void echo_payload (Test::Payload const & data
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
- int abort_counter_;
-};
-
-#endif /* TAO_TESTS_BUG1270_ECHO_H*/
diff --git a/TAO/tests/Bug_1270_Regression/Echo_Caller.cpp b/TAO/tests/Bug_1270_Regression/Echo_Caller.cpp
deleted file mode 100644
index a208f05a8ed..00000000000
--- a/TAO/tests/Bug_1270_Regression/Echo_Caller.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file Echo_Caller.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo_Caller.h"
-#include "Server_Timer.h"
-#include "tao/ORB_Core.h"
-
-ACE_RCSID(Bug_1270_Regression, Echo_Caller, "$Id$")
-
-Echo_Caller::Echo_Caller(CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-void
-Echo_Caller::start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- Server_Timer * task =
- new Server_Timer(client, orb_->orb_core()->reactor());
- task->activate();
-
- task =
- new Server_Timer(client, orb_->orb_core()->reactor());
- task->activate();
-}
-
-void
-Echo_Caller::shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Server received shutdown message\n"));
- orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_1270_Regression/Echo_Caller.h b/TAO/tests/Bug_1270_Regression/Echo_Caller.h
deleted file mode 100644
index cff3dec424e..00000000000
--- a/TAO/tests/Bug_1270_Regression/Echo_Caller.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @file Echo_Caller.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Echo_Caller__h_
-#define Echo_Caller__h_
-
-#include "TestS.h"
-
-class Echo_Caller : public POA_Test::Echo_Caller
-{
-public:
- Echo_Caller(CORBA::ORB_ptr orb);
-
- virtual void start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* Echo_Caller__h_ */
diff --git a/TAO/tests/Bug_1270_Regression/ORB_Task.cpp b/TAO/tests/Bug_1270_Regression/ORB_Task.cpp
deleted file mode 100644
index a011e89137d..00000000000
--- a/TAO/tests/Bug_1270_Regression/ORB_Task.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file ORB_Task.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "ORB_Task.h"
-#include "tao/Environment.h"
-
-ACE_RCSID(Bug_1270_Regression, ORB_Task, "$Id$")
-
-ORB_Task::ORB_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-ORB_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Bug_1270_Regression/ORB_Task.h b/TAO/tests/Bug_1270_Regression/ORB_Task.h
deleted file mode 100644
index 55ce8c75d3d..00000000000
--- a/TAO/tests/Bug_1270_Regression/ORB_Task.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef ORB_Task__h_
-#define ORB_Task__h_
-/**
- * @file ORB_Task.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-class ORB_Task : public ACE_Task_Base
-{
-public:
- ORB_Task(CORBA::ORB_ptr orb);
-
- virtual int svc (void);
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* ORB_Task__h_ */
diff --git a/TAO/tests/Bug_1270_Regression/Server_Timer.cpp b/TAO/tests/Bug_1270_Regression/Server_Timer.cpp
deleted file mode 100644
index 7deb4156030..00000000000
--- a/TAO/tests/Bug_1270_Regression/Server_Timer.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @file Server_Timer.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Server_Timer.h"
-#include "ace/Reactor.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Bug_1270_Regression, Server_Timer, "$Id$")
-
-Server_Timer::Server_Timer(Test::Echo_ptr echo,
- ACE_Reactor * reactor)
- : ACE_Event_Handler (reactor)
- , echo_(Test::Echo::_duplicate(echo))
- , refcnt_ (1)
-{
-}
-
-void
-Server_Timer::activate (void)
-{
- ACE_Time_Value tv (0, 20000);
- this->reactor()->schedule_timer (this, 0, tv, tv);
-}
-
-int
-Server_Timer::handle_timeout (ACE_Time_Value const &, void const *)
-{
- refcnt_++;
-
- Test::Payload pload (1024);
- pload.length (1024);
-
- ACE_OS::memset (pload.get_buffer(), pload.length(), 0);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- Test::Echo_var echo =
- Test::Echo::_duplicate (this->echo_.in ());
-
- if(CORBA::is_nil (echo.in ()))
- return 0;
-
- echo->echo_payload (pload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- this->echo_ = Test::Echo::_nil ();
-
- if (this->reactor ()->cancel_timer (this) != 0)
- refcnt_--;
- }
- ACE_ENDTRY;
-
- refcnt_--;
- if(refcnt_ == 0)
- return -1;
-
- return 0;
-}
-
-int
-Server_Timer::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- delete this;
- return 0;
-}
diff --git a/TAO/tests/Bug_1270_Regression/Server_Timer.h b/TAO/tests/Bug_1270_Regression/Server_Timer.h
deleted file mode 100644
index 55d51862464..00000000000
--- a/TAO/tests/Bug_1270_Regression/Server_Timer.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file Server_Timer.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-
-#ifndef Server_Timer__h_
-#define Server_Timer__h_
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Event_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Server_Timer : public ACE_Event_Handler
-{
-public:
- /// Constructor
- Server_Timer (Test::Echo_ptr echo, ACE_Reactor * reactor);
-
- void activate (void);
-
- /// Thread entry point
- int handle_timeout(ACE_Time_Value const & tv, void const *);
- int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
-
-private:
- /// Reference to the test interface
- Test::Echo_var echo_;
-
- int refcnt_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* Server_Timer__h_ */
diff --git a/TAO/tests/Bug_1270_Regression/Test.idl b/TAO/tests/Bug_1270_Regression/Test.idl
deleted file mode 100644
index 7e21df19733..00000000000
--- a/TAO/tests/Bug_1270_Regression/Test.idl
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Test__idl_
-#define Test__idl_
-
-module Test
-{
- typedef sequence<octet> Payload;
- interface Echo
- {
- oneway void echo_payload(in Payload data);
- };
-
- interface Echo_Caller
- {
- void start_task(in Echo client);
-
- oneway void shutdown();
- };
-};
-
-#endif /* Test__idl_ */
diff --git a/TAO/tests/Bug_1270_Regression/client.cpp b/TAO/tests/Bug_1270_Regression/client.cpp
deleted file mode 100644
index 8405b2d1c0c..00000000000
--- a/TAO/tests/Bug_1270_Regression/client.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// $Id$
-
-#include "Echo.h"
-#include "ORB_Task.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Bug_1270_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_TRANSPORT;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo> impl;
- {
- Echo * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo(orb.in(), 100),
- 1);
- impl = tmp;
- }
-
- Test::Echo_var echo =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (echo.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo_Caller reference <%s>\n",
- ior),
- 1);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->start_task(echo.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - event loop finished\n"));
-
- // Actually the code here should never be reached.
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1270_Regression/run_test.pl b/TAO/tests/Bug_1270_Regression/run_test.pl
deleted file mode 100755
index 9c650eae188..00000000000
--- a/TAO/tests/Bug_1270_Regression/run_test.pl
+++ /dev/null
@@ -1,65 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-local $start_time = time();
-local $max_running_time = 240; # 4 minutes
-local $elapsed = time() - $start_time;
-
-while($elapsed < $max_running_time) {
- # Start all clients in parallel
- $client1 = $CL1->Spawn ();
- $client2 = $CL2->Spawn ();
- $client3 = $CL3->Spawn ();
-
- # ... wait for the clients to die unless they did not startup,
- # ignore errors because they intentionally crash themselves!
- $CL3->WaitKill(60) unless $client3 < 0;
- $CL2->WaitKill(60) unless $client2 < 0;
- $CL1->WaitKill(60) unless $client1 < 0;
-
- $elapsed = time() - $start_time;
-}
-
-$SH = new PerlACE::Process ("shutdown", "-k file://$iorfile");
-my $shutdown = $SH->Spawn();
-$SH->WaitKill(10) unless $shutdown < 0;
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1270_Regression/server.cpp b/TAO/tests/Bug_1270_Regression/server.cpp
deleted file mode 100644
index 361b06dd275..00000000000
--- a/TAO/tests/Bug_1270_Regression/server.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// $Id$
-
-#include "Echo_Caller.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1270_Regression, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo_Caller> impl;
- {
- Echo_Caller * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo_Caller(orb.in()),
- 1);
- impl = tmp;
- }
-
- Test::Echo_Caller_var server =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1270_Regression/shutdown.cpp b/TAO/tests/Bug_1270_Regression/shutdown.cpp
deleted file mode 100644
index 68026a71eec..00000000000
--- a/TAO/tests/Bug_1270_Regression/shutdown.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1270_Regression, shutdown, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo_Caller reference <%s>\n",
- ior),
- 1);
- }
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1330_Regression/.cvsignore b/TAO/tests/Bug_1330_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1330_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc b/TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc
deleted file mode 100644
index 93a6bb0d168..00000000000
--- a/TAO/tests/Bug_1330_Regression/Bug_1330_Regression.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable {
- Source_Files {
- Test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1330_Regression/README b/TAO/tests/Bug_1330_Regression/README
deleted file mode 100644
index d1f531018e3..00000000000
--- a/TAO/tests/Bug_1330_Regression/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This test contains regression tests for fixes to bugs #1394 and #1395.
-
-See the bugzilla records for these bugs for details. \ No newline at end of file
diff --git a/TAO/tests/Bug_1330_Regression/Test.idl b/TAO/tests/Bug_1330_Regression/Test.idl
deleted file mode 100644
index cf161d304ee..00000000000
--- a/TAO/tests/Bug_1330_Regression/Test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method();
-};
diff --git a/TAO/tests/Bug_1330_Regression/Test_i.cpp b/TAO/tests/Bug_1330_Regression/Test_i.cpp
deleted file mode 100644
index 70ccbb17d47..00000000000
--- a/TAO/tests/Bug_1330_Regression/Test_i.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// $Id$
-//
-#include "Test_i.h"
-
-Test_i::Test_i()
-{
- // Noop
-}
-
-Test_i::~Test_i()
-{
- // Noop
-}
-
-void
-Test_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Noop
-}
diff --git a/TAO/tests/Bug_1330_Regression/Test_i.h b/TAO/tests/Bug_1330_Regression/Test_i.h
deleted file mode 100644
index acaff8a29b1..00000000000
--- a/TAO/tests/Bug_1330_Regression/Test_i.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-// -*- C++ -*-
-
-#if !defined BUG_1330_REGRESSION_TEST_I_H
- #define BUG_1330_REGRESSION_TEST_I_H
-
-#include "TestS.h"
-
-class Test_i: public POA_Test
-{
-public:
- /// Constructor
- Test_i (void);
-
- /// Destructor
- ~Test_i (void);
-
- /// A method
- void test_method(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-};
-
-#endif /* ! BUG_1330_REGRESSION_TEST_I_H */
diff --git a/TAO/tests/Bug_1330_Regression/client.cpp b/TAO/tests/Bug_1330_Regression/client.cpp
deleted file mode 100644
index f317731aeae..00000000000
--- a/TAO/tests/Bug_1330_Regression/client.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// $Id$
-//
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-const char *ior = "corbaloc:iiop:localhost:12345/Name\\2dwith\\2dhyphens";
-int shutdown_server = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 's':
- shutdown_server = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int result = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server =
- Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Server reference <%s>\n",
- ior),
- 1);
- }
-
-
- server->test_method(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- result =0;
-
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- result =1;
- }
- ACE_ENDTRY;
-
- return result;
-}
diff --git a/TAO/tests/Bug_1330_Regression/run_test.pl b/TAO/tests/Bug_1330_Regression/run_test.pl
deleted file mode 100755
index 4dfde222810..00000000000
--- a/TAO/tests/Bug_1330_Regression/run_test.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-
-# $Id$
-
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-
-# The client and server processes
-$SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-# We want the server to run on a fixed port
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-$SERVER->Arguments("-ORBEndpoint iiop://localhost:$port");
-
-# Fire up the server
-$SERVER->Spawn();
-
-# We don't need the IOR file but we can wait on the file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Try the corbaloc URL with incorrect '\' escaping of hex characters
-# We expect this to 'fail'
-$CLIENT->Arguments("-k corbaloc:iiop:localhost:$port/Name\\2dwith\\2dhyphens");
-if ($CLIENT->SpawnWaitKill (30) == 0)
-{
- print STDERR "ERROR: Bug 1330 Regression failed. Incorrect escape characters accepted\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Try the corbaloc URL with the correct '%' escaping of hex characters
-# We expect success
-$CLIENT->Arguments("-k corbaloc:iiop:localhost:$port/Name%2dwith%2dhyphens");
-if ($CLIENT->SpawnWaitKill (30) != 0)
-{
- print STDERR "ERROR: Bug 1330 Regression failed. Correct escape characters rejected\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-unlink $server_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_1330_Regression/server.cpp b/TAO/tests/Bug_1330_Regression/server.cpp
deleted file mode 100644
index 63308e1c36c..00000000000
--- a/TAO/tests/Bug_1330_Regression/server.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-//
-// $Id$
-//
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "Test_i.h"
-
-#include "tao/IORTable/IORTable.h"
-
-const char *object_key = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- object_key = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "SERVER (%P): usage: %s "
- "-k <object key>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "SERVER (%P): Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_i server_impl;
-
-
-
- root_poa->activate_object ( &server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server = server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var table_object =
- orb->resolve_initial_references ("IORTable" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- adapter->bind("Name-with-hyphens", ior.in());
-
-
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "SERVER (%P): Cannot open output file "
- "for writing IOR: %s",
- "server.ior"),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG,
- "SERVER (%P): Activated as file://%s\n",
- "server.ior"));
-
- poa_manager->activate();
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "SERVER (%P): Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1361_Regression/.cvsignore b/TAO/tests/Bug_1361_Regression/.cvsignore
deleted file mode 100644
index d955c473987..00000000000
--- a/TAO/tests/Bug_1361_Regression/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-client
-server
-shutdown
diff --git a/TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc b/TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc
deleted file mode 100644
index f0247d4c080..00000000000
--- a/TAO/tests/Bug_1361_Regression/Bug_1361_Regression.mpc
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Server_Thread_Pool.cpp
- Echo_Caller.cpp
- ORB_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- Echo.cpp
- ORB_Task.cpp
- client.cpp
- }
-}
-
-project(*Shutdown): taoexe, messaging {
- after += *Client
- Source_Files {
- shutdown.cpp
- }
-}
diff --git a/TAO/tests/Bug_1361_Regression/Echo.cpp b/TAO/tests/Bug_1361_Regression/Echo.cpp
deleted file mode 100644
index 415abbe7ed3..00000000000
--- a/TAO/tests/Bug_1361_Regression/Echo.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * @file Echo.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Bug_1270_Regression, Echo, "$Id$")
-
-Echo::Echo(CORBA::ORB_ptr orb,
- int abort_counter)
- : orb_(CORBA::ORB::_duplicate(orb))
- , abort_counter_(abort_counter)
-{
-}
-
-void
-Echo::echo_payload(Test::Payload const &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->abort_counter_--;
-
- if (this->abort_counter_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, aborting\n"));
- // Kill the app
- raise(9);
- }
-}
-
-void
-Echo::echo_payload_out (
- Test::Payload_out data
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- int j = ACE_OS::rand() % 40000;
- data = new Test::Payload(j);
- data->length(j);
- ACE_OS::memset(data->get_buffer(), data->length(), 0);
-
- this->abort_counter_--;
-
- if (this->abort_counter_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, aborting\n"));
- // Kill the app
- raise(9);
- }
-
-}
diff --git a/TAO/tests/Bug_1361_Regression/Echo.h b/TAO/tests/Bug_1361_Regression/Echo.h
deleted file mode 100644
index 37812e39b03..00000000000
--- a/TAO/tests/Bug_1361_Regression/Echo.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-/**
- * @file Echo.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef TAO_TESTS_BUG1270_ECHO_H
-#define TAO_TESTS_BUG1270_ECHO_H
-
-#include "ace/Atomic_Op.h"
-#include "TestS.h"
-
-class Echo : public POA_Test::Echo
-{
-public:
- Echo(CORBA::ORB_ptr orb,
- int abort_counter);
-
- virtual void echo_payload (Test::Payload const & data
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void echo_payload_out (
- Test::Payload_out data
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-private:
- CORBA::ORB_var orb_;
-
- ACE_Atomic_Op<ACE_SYNCH_MUTEX, int> abort_counter_;
-};
-
-#endif /* TAO_TESTS_BUG1270_ECHO_H*/
diff --git a/TAO/tests/Bug_1361_Regression/Echo_Caller.cpp b/TAO/tests/Bug_1361_Regression/Echo_Caller.cpp
deleted file mode 100644
index d6d17bcbfa3..00000000000
--- a/TAO/tests/Bug_1361_Regression/Echo_Caller.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * @file Echo_Caller.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Echo_Caller.h"
-#include "Server_Timer.h"
-#include "tao/ORB_Core.h"
-#include "Server_Thread_Pool.h"
-
-ACE_RCSID(Bug_1270_Regression, Echo_Caller, "$Id$")
-
-Echo_Caller::Echo_Caller(CORBA::ORB_ptr orb, Thread_Pool *pool)
- : orb_(CORBA::ORB::_duplicate(orb)),
- pool_(pool)
-{
-}
-
-void
-Echo_Caller::start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- pool_->put(Test::Echo::_duplicate(client));
-}
-
-void
-Echo_Caller::shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Server received shutdown message\n"));
- orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_1361_Regression/Echo_Caller.h b/TAO/tests/Bug_1361_Regression/Echo_Caller.h
deleted file mode 100644
index a251e021d88..00000000000
--- a/TAO/tests/Bug_1361_Regression/Echo_Caller.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file Echo_Caller.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Echo_Caller__h_
-#define Echo_Caller__h_
-
-#include "TestS.h"
-
-class Thread_Pool;
-
-class Echo_Caller : public POA_Test::Echo_Caller
-{
-public:
- Echo_Caller(CORBA::ORB_ptr orb, Thread_Pool *pool_);
-
- virtual void start_task(Test::Echo_ptr client
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- Thread_Pool *pool_;
-};
-
-#endif /* Echo_Caller__h_ */
diff --git a/TAO/tests/Bug_1361_Regression/ORB_Task.cpp b/TAO/tests/Bug_1361_Regression/ORB_Task.cpp
deleted file mode 100644
index 16ccdeb8661..00000000000
--- a/TAO/tests/Bug_1361_Regression/ORB_Task.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * @file ORB_Task.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "ORB_Task.h"
-#include "tao/Environment.h"
-
-ACE_RCSID (Bug_1361_Regression,
- ORB_Task, "$Id$")
-
-ORB_Task::ORB_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-ORB_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Bug_1361_Regression/ORB_Task.h b/TAO/tests/Bug_1361_Regression/ORB_Task.h
deleted file mode 100644
index 2ba1ae625e0..00000000000
--- a/TAO/tests/Bug_1361_Regression/ORB_Task.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * @file ORB_Task.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef TAO_REGRESSION_ORB_TASK_H
-#define TAO_REGRESSION_ORB_TASK_H
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-class ORB_Task : public ACE_Task_Base
-{
-public:
- ORB_Task (CORBA::ORB_ptr orb);
-
- virtual int svc (void);
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* TAO_REGRESSION_ORB_TASK_H*/
diff --git a/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp b/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp
deleted file mode 100644
index a1183f7bd9c..00000000000
--- a/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-// $Id$
-
-#include "Server_Thread_Pool.h"
-#include "TestC.h"
-#include "ace/OS_NS_unistd.h"
-
-time_t last_success;
-
-int
-Thread_Pool::close (u_long)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%t) worker thread closing down\n"));
- return 0;
-}
-
-Thread_Pool::Thread_Pool (ACE_Thread_Manager *thr_mgr,
- int n_threads)
- : ACE_Task<ACE_SYNCH> (thr_mgr),
- nt_(n_threads)
-{
- if (this->activate (THR_NEW_LWP,
- n_threads) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n",
- "activate failed \n"));
-}
-
-Thread_Pool::~Thread_Pool (void)
-{
-}
-
-int
-Thread_Pool::shutdown (void)
-{
- thr_mgr_->cancel_grp (grp_id_);
-
- for (int i = 0; i < nt_; i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) eof, sending block for thread=%d\n",
- i + 1));
- ACE_Message_Block *mb1;
- ACE_NEW_RETURN (mb1,
- ACE_Message_Block ((char*)0),
- -1);
- mb1->length (0);
-
- if (this->put (mb1) == -1)
- ACE_ERROR ((LM_ERROR,
- "(%t) %p\n",
- "put"));
-
- // this sleep helps to shutdown correctly -> was an error!
- ACE_OS::sleep (1);
- }
-
- return 0;
-}
-
-// Simply enqueue the Message_Block into the end of the queue.
-int
-Thread_Pool::put (Test::Echo_ptr echoptr)
-{
- char * charData = (char *)echoptr;
-
- ACE_Message_Block *mb;
- ACE_NEW_RETURN(mb, ACE_Message_Block(charData), -1);
- return this->put (mb);
-}
-
-int
-Thread_Pool::put (ACE_Message_Block *mb,
- ACE_Time_Value *tv)
-{
- return this->putq (mb, tv);
-}
-
-// Iterate <n_iterations> time printing off a message and "waiting"
-// for all other threads to complete this iteration.
-
-int
-Thread_Pool::svc (void)
-{
- // Note that the <ACE_Task::svc_run> method automatically adds us to
- // the Thread_Manager when the thread begins.
-
- int count = 1;
-
- // Keep looping, reading a message out of the queue, until we get a
- // message with a length == 0, which signals us to quit.
-
- for (;; count++)
- {
- ACE_Message_Block *mb;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "(%t) in iteration %d before getq ()\n",
- count));
-#endif
-
- if (this->getq (mb) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) in iteration %d, got result -1, exiting\n",
- count));
- break;
- }
-
-#if 0
- if (mb->length() == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) in iteration %d, got NULL message, exiting\n",
- count));
- break;
- }
-#endif
-
- Test::Echo_var echo = (Test::Echo_ptr)mb->base();
-
- // Echo_var is responsible for deallocating this.
- // mb->release ();
-
- if (CORBA::is_nil(echo.in()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) in iteration %d, got NULL message, exiting\n",
- count));
- break;
- }
-
- // Keep calling a few times after receiving exceptions
- for(int exception_count = 50; exception_count; --exception_count)
- {
- ACE_TRY_NEW_ENV
- {
- // keep calling until get an exception
- while (true)
- {
-#if 0
- if (0)
- {
- Test::Payload pload (10);
- pload.length (10);
- ACE_OS::memset (pload.get_buffer(), pload.length(), 0);
- echo->echo_payload (pload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- else
-#endif /*if 0*/
- {
- Test::Payload_var pout;
- echo->echo_payload_out (pout.out()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // time_t last_success = ACE_OS::time();
- }
- }
- }
- ACE_CATCHANY
- {
- // Just forget the exception and continue
- }
- ACE_ENDTRY;
- }
-
- }
-
- // Note that the <ACE_Task::svc_run> method automatically removes us
- // from the <ACE_Thread_Manager> when the thread exits.
- return 0;
-}
diff --git a/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.h b/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.h
deleted file mode 100644
index 88b9588038b..00000000000
--- a/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id$
-
-#include "ace/Task_T.h"
-#include "ace/Service_Config.h"
-
-#include "TestC.h"
-
-class Thread_Pool : public ACE_Task<ACE_SYNCH>
-{
- // = TITLE
- // Defines a thread pool abstraction based on the <ACE_Task>.
-public:
- Thread_Pool (ACE_Thread_Manager *thr_mgr,
- int n_threads);
- // Constructor activates <n_threads> in the thread pool.
-
- virtual ~Thread_Pool (void);
- // Destructor...
- int shutdown (void);
-
- virtual int svc (void);
-
- virtual int put (Test::Echo_ptr echoptr);
-
- virtual int put (ACE_Message_Block *mb,
- ACE_Time_Value *tv = 0);
- // This allows the producer to pass messages to the <Thread_Pool>.
-
-private:
- virtual int close (u_long);
- int nt_; // number of threads
- // Close hook.
-};
diff --git a/TAO/tests/Bug_1361_Regression/Server_Timer.cpp b/TAO/tests/Bug_1361_Regression/Server_Timer.cpp
deleted file mode 100644
index 0d5ad1bb3e5..00000000000
--- a/TAO/tests/Bug_1361_Regression/Server_Timer.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * @file Server_Timer.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Server_Timer.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Bug_1270_Regression, Server_Timer, "$Id$")
-
-Server_Timer::Server_Timer(Test::Echo_ptr echo,
- ACE_Reactor * reactor)
- : ACE_Event_Handler (reactor)
- , echo_(Test::Echo::_duplicate(echo))
- , refcnt_ (1)
-{
-}
-
-void
-Server_Timer::activate (void)
-{
- ACE_Time_Value tv (0, 20000);
- this->reactor()->schedule_timer (this, 0, tv, tv);
-}
-
-int
-Server_Timer::handle_timeout (ACE_Time_Value const &, void const *)
-{
- refcnt_++;
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- Test::Payload pload(1024); pload.length(1024);
- ACE_OS::memset(pload.get_buffer(), pload.length(), 0);
- ACE_TRY
- {
- Test::Echo_var echo = Test::Echo::_duplicate(this->echo_.in());
- if(CORBA::is_nil(echo.in()))
- return 0;
-
- echo->echo_payload(pload);
- }
- ACE_CATCHANY
- {
- this->echo_ = Test::Echo::_nil ();
-
- if(this->reactor()->cancel_timer(this) != 0)
- refcnt_--;
- }
- ACE_ENDTRY;
-
- refcnt_--;
- if(refcnt_ == 0)
- return -1;
-
- return 0;
-}
-
-int
-Server_Timer::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- delete this;
- return 0;
-}
diff --git a/TAO/tests/Bug_1361_Regression/Server_Timer.h b/TAO/tests/Bug_1361_Regression/Server_Timer.h
deleted file mode 100644
index 55d51862464..00000000000
--- a/TAO/tests/Bug_1361_Regression/Server_Timer.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file Server_Timer.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-
-#ifndef Server_Timer__h_
-#define Server_Timer__h_
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Event_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Server_Timer : public ACE_Event_Handler
-{
-public:
- /// Constructor
- Server_Timer (Test::Echo_ptr echo, ACE_Reactor * reactor);
-
- void activate (void);
-
- /// Thread entry point
- int handle_timeout(ACE_Time_Value const & tv, void const *);
- int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
-
-private:
- /// Reference to the test interface
- Test::Echo_var echo_;
-
- int refcnt_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* Server_Timer__h_ */
diff --git a/TAO/tests/Bug_1361_Regression/Test.idl b/TAO/tests/Bug_1361_Regression/Test.idl
deleted file mode 100644
index bfe9cc92f47..00000000000
--- a/TAO/tests/Bug_1361_Regression/Test.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Test__idl_
-#define Test__idl_
-
-module Test
-{
- typedef sequence<octet> Payload;
- interface Echo
- {
- void echo_payload(in Payload data);
- void echo_payload_out(out Payload data);
- };
-
- interface Echo_Caller
- {
- void start_task(in Echo client);
-
- oneway void shutdown();
- };
-};
-
-#endif /* Test__idl_ */
diff --git a/TAO/tests/Bug_1361_Regression/client.cpp b/TAO/tests/Bug_1361_Regression/client.cpp
deleted file mode 100644
index 76b98781048..00000000000
--- a/TAO/tests/Bug_1361_Regression/client.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-// $Id$
-
-#include "Echo.h"
-#include "ORB_Task.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Bug_1270_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int serverthreads = 4;
-
-int
-parse_args (int argc, char *argv[]);
-
-class Client_Timer : public ACE_Event_Handler
-{
-public:
- /// Constructor
- Client_Timer (ACE_Reactor * reactor)
- : ACE_Event_Handler (reactor)
- {
- }
-
- void activate (void)
- {
- ACE_Time_Value tv (150, 0);
- this->reactor()->schedule_timer (this, 0, tv, tv);
- }
-
- /// Thread entry point
- int handle_timeout (ACE_Time_Value const & , void const *)
- {
- // kill the application
- raise (9);
- this->reactor ()->cancel_timer (this);
- return 0;
- }
- int handle_close (ACE_HANDLE, ACE_Reactor_Mask)
- {
- delete this;
- return 0;
- }
-
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_TRANSPORT;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Echo> impl;
- {
- Echo * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo(orb.in(), 1000 / serverthreads),
- 1);
- impl = tmp;
- }
-
- Test::Echo_var echo =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo_Caller reference <%s>\n",
- ior),
- 1);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ORB_Task worker (orb.in());
- worker.activate (THR_NEW_LWP | THR_JOINABLE,
- serverthreads);
-
- ACE_TRY_EX (BL)
- {
- for(int i = serverthreads; i; --i)
- {
- server->start_task(echo.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (BL);
- }
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-
- Client_Timer * task = new Client_Timer (orb->orb_core()->reactor());
- task->activate ();
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- worker.wait ();
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) client - event loop finished\n"));
-
- // Actually the code here should never be reached.
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 't':
- serverthreads = atoi(get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-t threads "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1361_Regression/run_test.pl b/TAO/tests/Bug_1361_Regression/run_test.pl
deleted file mode 100755
index 796016188cf..00000000000
--- a/TAO/tests/Bug_1361_Regression/run_test.pl
+++ /dev/null
@@ -1,75 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-use POSIX "sys_wait_h";
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$threads = int (rand() * 6) + 1;
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -t $threads");
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 250) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-local $start_time = time();
-local $max_running_time = 360;
-local $elapsed = time() - $start_time;
-my $p = $SV->{'PROCESS'};
-
-while (($elapsed < $max_running_time) )
-{
- # Start all clients in parallel
- $client = $CL->Spawn ();
-
- $CL->WaitKill(60) unless $client < 0;
-
- print STDERR "checking server alive\n";
-
- my $pid = waitpid ($SV->{PROCESS}, &WNOHANG);
-
- if ($pid != 0 && $? != -1)
- {
- $SV->check_return_value ($?);
- $server_died = 1;
- last;
- }
-
- $elapsed = time() - $start_time;
- sleep (1);
-}
-
-if (!$server_died) {
- $SH = new PerlACE::Process ("shutdown", "-k file://$iorfile");
- my $shutdown = $SH->Spawn();
- $SH->WaitKill(10) unless $shutdown < 0;
-
- $server = $SV->WaitKill (100);
-}
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1361_Regression/server.cpp b/TAO/tests/Bug_1361_Regression/server.cpp
deleted file mode 100644
index 5b09f46aa76..00000000000
--- a/TAO/tests/Bug_1361_Regression/server.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// $Id$
-
-#include "Echo_Caller.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/Utils/Servant_Var.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "Server_Thread_Pool.h"
-#include "ORB_Task.h"
-
-ACE_RCSID(Bug_1270_Regression, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- ACE_Thread_Manager mymanager;
- Thread_Pool callback_pool (&mymanager, 10);
-
- TAO::Utils::Servant_Var<Echo_Caller> impl;
- {
- Echo_Caller * tmp;
- // ACE_NEW_RETURN is the worst possible way to handle
- // exceptions (think: what if the constructor allocates memory
- // and fails?), but I'm not in the mood to fight for a more
- // reasonable way to handle allocation errors in ACE.
- ACE_NEW_RETURN (tmp,
- Echo_Caller(orb.in(), &callback_pool),
- 1);
- impl = tmp;
- }
-
- Test::Echo_Caller_var server =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ORB_Task worker (orb.in ());
- worker.activate (THR_NEW_LWP | THR_JOINABLE,
- 4);
-
- orb->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- callback_pool.shutdown ();
- mymanager.wait ();
- worker.wait ();
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1361_Regression/shutdown.cpp b/TAO/tests/Bug_1361_Regression/shutdown.cpp
deleted file mode 100644
index 6ea9d05e4e3..00000000000
--- a/TAO/tests/Bug_1361_Regression/shutdown.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-// FUZZ: disable check_for_streams_include
-#include "ace/streams.h"
-
-ACE_RCSID(Bug_1361_Regression, shutdown, "$Id$")
-
-#if defined (ACE_OPENVMS)
-// need this to circumvent link error on OpenVMS
-// has to do with interference in template instantiations
-// because multiple executables are build in one directory
-// reuising eachothers object files.
-ACE_Time_Value dum = ACE_Time_Value::zero;
-#endif
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- ACE_DEBUG ((LM_DEBUG,
- "Starting shutdown\n"));
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo_Caller reference <%s>\n",
- ior),
- 1);
- }
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Bug_1476_Regression/.cvsignore b/TAO/tests/Bug_1476_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1476_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc b/TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc
deleted file mode 100644
index a149ce848c3..00000000000
--- a/TAO/tests/Bug_1476_Regression/Bug_1476_Regression.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Server_Task.cpp
- Sender_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- Client_Task.cpp
- Server_Task.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_1476_Regression/Client_Task.cpp b/TAO/tests/Bug_1476_Regression/Client_Task.cpp
deleted file mode 100644
index 7e153576cd6..00000000000
--- a/TAO/tests/Bug_1476_Regression/Client_Task.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Bug_1476_Regression, Client_Task, "$Id$")
-
-Client_Task::Client_Task (CORBA::ORB_ptr orb,
- Test::Sender_ptr reply_gen,
- ACE_Thread_Manager *thr_mgr,
- int number_of_oneways)
- : ACE_Task_Base (thr_mgr)
- , sender_(Test::Sender::_duplicate (reply_gen))
- , orb_ (CORBA::ORB::_duplicate (orb))
- , number_ (number_of_oneways)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Apply sync_none policy
- CORBA::Object_var object =
- orb_->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_NONE;
-
- CORBA::PolicyList policies (1); policies.length (1);
- policies[0] =
- orb_->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i != number_; ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) sending oneway invocation %d...\n", i));
-
- this->sender_->send_ready_message (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Do it slowly.
- ACE_OS::sleep(ACE_Time_Value(0,250000));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught Exception");
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Bug_1476_Regression/Client_Task.h b/TAO/tests/Bug_1476_Regression/Client_Task.h
deleted file mode 100644
index f4418a27bc9..00000000000
--- a/TAO/tests/Bug_1476_Regression/Client_Task.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAYS_INVOKING_TWOWAYS_CLIENT_TASK_H
-#define ONEWAYS_INVOKING_TWOWAYS_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (CORBA::ORB_ptr orb,
- Test::Sender_ptr sender,
- ACE_Thread_Manager *thr_mgr,
- int number_of_oneways);
-
- /// Thread entry point
- int svc (void);
-
-private:
-
- /// Reference to the test interface
- Test::Sender_var sender_;
-
- /// Our Orb...
- CORBA::ORB_var orb_;
-
- /// Number of oneways to send
- int number_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAYS_INVOKING_TWOWAYS_CLIENT_TASK_H */
diff --git a/TAO/tests/Bug_1476_Regression/README b/TAO/tests/Bug_1476_Regression/README
deleted file mode 100644
index f9fcd2ff7f8..00000000000
--- a/TAO/tests/Bug_1476_Regression/README
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
-
-@page Bug_1476_Regersion Test README File
-
- This is a test for bug 1476.
-
- When making oneway invocations with sync_none policy applied
- the orb shouldn't block when making the connection but queue
- the message on the transport and send it when the transport
- is connected. In case later the connection establishment fails
- the message are just dropped, sync_none just doesn't give any
- guarantee, so if you don't like this behaviour, don't use it.
-
- For this test the connection between client and server shouldn't
- be established directly, but take some time, this is hard to
- get working on localhost or the same lan, use a server on a remote
- site to test this. Because of this we don't run this test in
- our daily builds
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Bug_1476_Regression/Sender_i.cpp b/TAO/tests/Bug_1476_Regression/Sender_i.cpp
deleted file mode 100644
index 3a7769ee7fe..00000000000
--- a/TAO/tests/Bug_1476_Regression/Sender_i.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "Sender_i.h"
-
-ACE_RCSID(Bug_1476_Regression, Sender_i, "$Id$")
-
-Sender_i::Sender_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- active_objects_ (0),
- number_received_ (0)
-{
-}
-
-Sender_i::~Sender_i (void)
-{
-}
-
-void
-Sender_i::active_objects (CORBA::ULong no_threads
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->active_objects_ = no_threads;
-}
-
-
-void
-Sender_i::send_ready_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Received a call ...\n"));
-
- number_received_++;
-}
-
-CORBA::ULong
-Sender_i::get_number_received (void) const
-{
- return number_received_;
-}
-
-CORBA::ULong
-Sender_i::get_active_objects (void) const
-{
- return active_objects_;
-}
diff --git a/TAO/tests/Bug_1476_Regression/Sender_i.h b/TAO/tests/Bug_1476_Regression/Sender_i.h
deleted file mode 100644
index 387a467f8fd..00000000000
--- a/TAO/tests/Bug_1476_Regression/Sender_i.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// ===================================================================
-/**
- * @file Sender_i.h
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- **/
-// ===================================================================
-
-#ifndef TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_SENDER_I_H
-#define TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_SENDER_I_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Sender interface
-/**
- * Implements the oneway call send_ready_message. This in turn calls
- * the receiver with two way invocations..
- */
-
-class Sender_i
- : public virtual POA_Test::Sender
-{
-public:
- /// Constructor
- Sender_i (CORBA::ORB_ptr orb);
-
- ///Destructor
- virtual ~Sender_i (void);
-
- // = The skeleton methods
- virtual void active_objects (CORBA::ULong ao
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_ready_message (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::ULong get_number_received (void) const;
-
- CORBA::ULong get_active_objects (void) const;
-
-private:
- /// Our local ORB ptr
- CORBA::ORB_ptr orb_;
-
- /// Number of active objects who are trying to connect
- CORBA::ULong active_objects_;
-
- /// Number of invocations received
- CORBA::ULong number_received_;
-};
-
-#include /**/ "ace/post.h"
-#endif /*TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_SENDER_I_H*/
diff --git a/TAO/tests/Bug_1476_Regression/Server_Task.cpp b/TAO/tests/Bug_1476_Regression/Server_Task.cpp
deleted file mode 100644
index c2dbb8c52ba..00000000000
--- a/TAO/tests/Bug_1476_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// $Id$
-//
-
-#include "Server_Task.h"
-
-ACE_RCSID(Bug_1476_Regression, Server_Task, "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // run the test for at most 30 seconds...
- ACE_Time_Value tv (15, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Bug_1476_Regression/Server_Task.h b/TAO/tests/Bug_1476_Regression/Server_Task.h
deleted file mode 100644
index a6ecae2217a..00000000000
--- a/TAO/tests/Bug_1476_Regression/Server_Task.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAYS_INVOKING_TWOWAYS_SERVER_TASK_H
-#define ONEWAYS_INVOKING_TWOWAYS_SERVER_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAYS_INVOKING_TWOWAYS_SERVER_TASK_H*/
diff --git a/TAO/tests/Bug_1476_Regression/Test.idl b/TAO/tests/Bug_1476_Regression/Test.idl
deleted file mode 100644
index 6d19ca24a74..00000000000
--- a/TAO/tests/Bug_1476_Regression/Test.idl
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- interface Sender {
-
- /// Number of active objects trying to use this interface
- oneway void active_objects (in unsigned long ao);
-
- /// Send a ready message
- oneway void send_ready_message ();
- };
-};
diff --git a/TAO/tests/Bug_1476_Regression/client.cpp b/TAO/tests/Bug_1476_Regression/client.cpp
deleted file mode 100644
index f08edccd51d..00000000000
--- a/TAO/tests/Bug_1476_Regression/client.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "tao/Transport.h"
-#include "tao/ORB_Core.h"
-#include "tao/Thread_Lane_Resources.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(Bug_1476_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int number_of_oneways = 10;
-int number_of_client_tasks = 2;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:n:c:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'n' :
- number_of_oneways = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'c' :
- number_of_client_tasks = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "-n <number of oneways>"
- "-c <number of client tasks>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_NONE;
-
- CORBA::PolicyList policies (1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Get the sender reference..
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Sender_var sender =
- Test::Sender::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (sender.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
- Client_Task client_task (orb.in(),
- sender.in (),
- ACE_Thread_Manager::instance (),
- number_of_oneways);
-
- Server_Task server_task (orb.in (),
- ACE_Thread_Manager::instance ());
-
- // Before creating threads we will let the sender know that we
- // will have two threads that would make invocations..
- // this is the first oneway we do, so after this we would have a queue
- // on one of the transports
- sender->active_objects ((CORBA::Short) number_of_client_tasks ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO::Transport_Cache_Manager& manager = orb->orb_core()->lane_resources ().transport_cache ();
-
- TAO::Transport_Cache_Manager::HASH_MAP& cachemap = manager.map();
- TAO::Transport_Cache_Manager::HASH_MAP_ITER end_iter = cachemap.end ();
-
- bool tranportwithqueue = false;
- for (TAO::Transport_Cache_Manager::HASH_MAP_ITER iter = cachemap.begin ();
- iter != end_iter;
- ++iter)
- {
- TAO_Transport* transport = (*iter).int_id_.transport ();
- if (transport->queue_is_empty() == 0 && transport->is_connected() == false)
- {
- tranportwithqueue = true;
- break;
- }
- }
-
- if (!tranportwithqueue)
- {
- ACE_ERROR ((LM_ERROR, "(%P|%t) Error: expect a not connected transport with a queue\n"));
- }
- else
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t) Found not connected transport with a queue\n"));
- }
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 2,1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, number_of_client_tasks, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG,
- "Event Loop finished\n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (tranportwithqueue == false)
- {
- return 1;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1476_Regression/run_test.pl b/TAO/tests/Bug_1476_Regression/run_test.pl
deleted file mode 100755
index 1ce2ac99248..00000000000
--- a/TAO/tests/Bug_1476_Regression/run_test.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn (30);
-
-$client1 = $CL1->WaitKill (30);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1476_Regression/server.cpp b/TAO/tests/Bug_1476_Regression/server.cpp
deleted file mode 100644
index b65d5e2333c..00000000000
--- a/TAO/tests/Bug_1476_Regression/server.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// $Id$
-
-#include "Sender_i.h"
-#include "Server_Task.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Oneways_Invoking_Twoways, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-int number_of_oneways = 10;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'n' :
- number_of_oneways = ACE_OS::atoi (get_opts.opt_arg ());
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-n <number of oneways>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Sender_i *sender_impl;
- ACE_NEW_RETURN (sender_impl,
- Sender_i (orb.in ()),
- 1);
- PortableServer::ServantBase_var receiver_owner_transfer(sender_impl);
-
- Test::Sender_var sender =
- sender_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (sender.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task server_task (orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Now terminating test\n"));
-
- CORBA::ULong activeobjects = sender_impl->get_active_objects ();
- if (((number_of_oneways * activeobjects) !=
- sender_impl->get_number_received ()) && activeobjects != 0)
- {
- ACE_ERROR ((LM_ERROR, "Error, expected %d oneways, received %d\n",
- number_of_oneways,
- sender_impl->get_number_received()));
- }
- else
- {
- if (sender_impl->get_number_received () == 0)
- {
- ACE_ERROR ((LM_ERROR, "Error: Received no calls\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "Corrected amount received\n"));
- }
- }
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1482_Regression/.cvsignore b/TAO/tests/Bug_1482_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1482_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1482_Regression/Bug_1482_Regression.mpc b/TAO/tests/Bug_1482_Regression/Bug_1482_Regression.mpc
deleted file mode 100644
index 26363b5c9bc..00000000000
--- a/TAO/tests/Bug_1482_Regression/Bug_1482_Regression.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, amh, ami, iortable, portableserver {
- Source_Files {
- Hello.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, amh, ami {
- exename = client
- after += *Server
- Source_Files {
- Client_Task.cpp
- Reply_Handler.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1482_Regression/Client_Task.cpp b/TAO/tests/Bug_1482_Regression/Client_Task.cpp
deleted file mode 100644
index 9710790c0af..00000000000
--- a/TAO/tests/Bug_1482_Regression/Client_Task.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "tao/Stub.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Hello_ptr receiver,
- CORBA::ORB_ptr o,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , receiver_ (Test::Hello::_duplicate (receiver))
- , handler_ (o)
- , handler_var_ ()
- , orb_ (CORBA::ORB::_duplicate (o))
-{
- this->handler_var_ = this->handler_._this ();
- this->handler_var_->_stubobj ()->_incr_refcnt ();
- this->handler_var_->_add_ref ();
-}
-
-Client_Task::~Client_Task (void)
-{
- (void) this->handler_var_._retn ();
-}
-
-int
-Client_Task::svc (void)
-{
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- for (CORBA::Long j = 0;
- j != 1000;
- ++j)
- {
- // Send 25 messages in every loop..
- for (CORBA::Short i = 0; i != 25; ++i)
- {
- this->receiver_->sendc_next_prime (this->handler_var_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- CORBA::Short repl = 0;
- while (repl != 25)
- {
- CORBA::Boolean pending =
- this->orb_->work_pending (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (pending)
- {
- this->orb_->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ++repl;
- }
- }
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Bug_1482_Regression/Client_Task.h b/TAO/tests/Bug_1482_Regression/Client_Task.h
deleted file mode 100644
index 07e59e3c5c2..00000000000
--- a/TAO/tests/Bug_1482_Regression/Client_Task.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef LONGUPCALLS_CLIENT_TASK_H
-#define LONGUPCALLS_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "Reply_Handler.h"
-#include "ace/Task.h"
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Hello_ptr receiver,
- CORBA::ORB_ptr o,
- ACE_Thread_Manager *thr_mgr);
-
- ~Client_Task (void);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the test interface
- Test::Hello_var receiver_;
-
- Reply_Handler handler_;
-
- Test::AMI_HelloHandler_var handler_var_;
-
- CORBA::ORB_var orb_;
-};
-#include /**/ "ace/post.h"
-#endif /* LONGUPCALLS_CLIENT_TASK_H */
diff --git a/TAO/tests/Bug_1482_Regression/Hello.cpp b/TAO/tests/Bug_1482_Regression/Hello.cpp
deleted file mode 100644
index 40d7a6c63e7..00000000000
--- a/TAO/tests/Bug_1482_Regression/Hello.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "ace/ACE.h"
-
-
-ACE_RCSID (Bug_1482_Regression,
- Hello,
- "$Id$")
-
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , mutex_ ()
- , latest_prime_ (0)
-{
-}
-
-CORBA::ULong
-Hello::next_prime (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- ace_mon,
- this->mutex_,
- this->latest_prime_);
-
- if (this->latest_prime_ > 10000)
- ACE_OS::abort ();
-
- for (CORBA::Long ind = 0;
- ind != 400;
- ++ind)
- {
- CORBA::Short bc = 0;
-
- while (bc == 0)
- {
- if (ACE::is_prime (++this->latest_prime_,
- 2,
- this->latest_prime_/2) == 0)
- bc = 1;
- }
- }
-
- return this->latest_prime_;
-}
diff --git a/TAO/tests/Bug_1482_Regression/Hello.h b/TAO/tests/Bug_1482_Regression/Hello.h
deleted file mode 100644
index 58a5fd909b3..00000000000
--- a/TAO/tests/Bug_1482_Regression/Hello.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual CORBA::ULong next_prime (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- /// Mutex
- TAO_SYNCH_MUTEX mutex_;
-
- /// Latest prime
- CORBA::ULong latest_prime_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_1482_Regression/Reply_Handler.cpp b/TAO/tests/Bug_1482_Regression/Reply_Handler.cpp
deleted file mode 100644
index 93189526614..00000000000
--- a/TAO/tests/Bug_1482_Regression/Reply_Handler.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-#include "Reply_Handler.h"
-
-Reply_Handler::Reply_Handler (CORBA::ORB_ptr o)
- : orb_ (CORBA::ORB::_duplicate (o))
-{
-}
-
-void
-Reply_Handler::next_prime (CORBA::ULong
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return;
-}
-
-void
-Reply_Handler::next_prime_excep (
- ::Messaging::ExceptionHolder *ex
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- ACE_TRY
- {
- ex->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::COMM_FAILURE, t)
- {
- /*ACE_DEBUG ((LM_DEBUG,
- "Callback method <next_prime_excep> called: \n"));
- */
-
- ACE_Time_Value tv (10, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Bug_1482_Regression/Reply_Handler.h b/TAO/tests/Bug_1482_Regression/Reply_Handler.h
deleted file mode 100644
index 03700034b3e..00000000000
--- a/TAO/tests/Bug_1482_Regression/Reply_Handler.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-#ifndef REPLY_HANDLER_H
-#define REPLY_HANDLER_H
-#include /**/ "ace/pre.h"
-#include "TestS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Reply_Handler : public POA_Test::AMI_HelloHandler
-{
-public:
- Reply_Handler (CORBA::ORB_ptr o);
-
-
- void next_prime (CORBA::ULong ami_return_val
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void next_prime_excep (::Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- CORBA::ORB_var orb_;
-};
-
-
-#include /**/ "ace/post.h"
-#endif /*REPLY_HANDLER_H*/
diff --git a/TAO/tests/Bug_1482_Regression/Server_Task.cpp b/TAO/tests/Bug_1482_Regression/Server_Task.cpp
deleted file mode 100644
index 8c0dc31bdd1..00000000000
--- a/TAO/tests/Bug_1482_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-
-ACE_RCSID(Muxing, Server_Task, "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
-// ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Bug_1482_Regression/Server_Task.h b/TAO/tests/Bug_1482_Regression/Server_Task.h
deleted file mode 100644
index 3df83651af5..00000000000
--- a/TAO/tests/Bug_1482_Regression/Server_Task.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef LONGUPCALLS_SERVER_TASK_H
-#define LONGUPCALLS_SERVER_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "ace/Task.h"
-
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* LONGUPCALLS_SERVER_TASK_H */
diff --git a/TAO/tests/Bug_1482_Regression/Test.idl b/TAO/tests/Bug_1482_Regression/Test.idl
deleted file mode 100644
index 22d8aee58d9..00000000000
--- a/TAO/tests/Bug_1482_Regression/Test.idl
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple interface
- interface Hello
- {
- /// Return a simple string
- unsigned long next_prime ();
- };
-};
diff --git a/TAO/tests/Bug_1482_Regression/client.cpp b/TAO/tests/Bug_1482_Regression/client.cpp
deleted file mode 100644
index 78a8635a4e5..00000000000
--- a/TAO/tests/Bug_1482_Regression/client.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-// $Id$
-
-#include "TestS.h"
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TimeBase::TimeT timeout_period = 10 * 1000;
-
- CORBA::Any timeout_as_any;
- timeout_as_any <<= timeout_period;
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- timeout_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- // Let the client perform the test in a separate thread
- Client_Task client (hello.in (),
- orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (client.activate (THR_NEW_LWP | THR_JOINABLE,
- 8) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- client.thr_mgr ()->wait ();
-
- root_poa->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1482_Regression/run_test.pl b/TAO/tests/Bug_1482_Regression/run_test.pl
deleted file mode 100755
index a62e792625a..00000000000
--- a/TAO/tests/Bug_1482_Regression/run_test.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBdotteddecimaladdresses 1");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBdotteddecimaladdresses 1");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-local $start_time = time();
-local $max_running_time = 600; # 5 minutes
-local $elapsed = time() - $start_time;
-
-while($elapsed < $max_running_time) {
-
-print STDERR " Going .. \n";
-$sv1 = $SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-# Start all clients in parallel
-$client1 = $CL1->Spawn ();
-$client2 = $CL2->Spawn ();
-$client3 = $CL3->Spawn ();
-
-
-sleep (60);
-$SV->WaitKill (3) unless $sv1 < 0;
-$CL1->WaitKill (3);
-$CL2->WaitKill (3);
-$CL3->WaitKill (3);
-
-if ($client3 != 0){
- $status = -1;
- exit $status;
-}
-
-if ($client2 != 0) {
- $status = -1;
- exit $status;
-}
-
-if ($client1 != 0){
- $status = -1;
- exit $status;
-}
- $elapsed = time() - $start_time;
-unlink $iorfile;
-}
-
-
-
-exit $status;
diff --git a/TAO/tests/Bug_1482_Regression/server.cpp b/TAO/tests/Bug_1482_Regression/server.cpp
deleted file mode 100644
index 2204fc213da..00000000000
--- a/TAO/tests/Bug_1482_Regression/server.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "Server_Task.h"
-
-ACE_RCSID (LongUpcall_Crash_Test,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task st (orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (st.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "Error activating server task\n"));
-
- return -1;
- }
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1495_Regression/.cvsignore b/TAO/tests/Bug_1495_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1495_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1495_Regression/Bug_1495.mpc b/TAO/tests/Bug_1495_Regression/Bug_1495.mpc
deleted file mode 100644
index 7e7cfd67199..00000000000
--- a/TAO/tests/Bug_1495_Regression/Bug_1495.mpc
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- Server_ORBInitializer.cpp
- server_interceptor.cpp
- Threaded_Server.cpp
- }
-}
-
-project(*Client): taoserver, pi, interceptors {
- exename = client
- after += *Server
- Source_Files {
- test_i.cpp
- testC.cpp
- testS.cpp
- client_interceptor.cpp
- Threaded_Client.cpp
-
- Server_Task.cpp
- Client_Task.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_1495_Regression/Client_ORBInitializer.cpp b/TAO/tests/Bug_1495_Regression/Client_ORBInitializer.cpp
deleted file mode 100644
index fa080db4265..00000000000
--- a/TAO/tests/Bug_1495_Regression/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-#include "interceptors.h"
-
-ACE_RCSID (Service_Context_Manipulation, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (void)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No Op
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor (orb_id.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/Bug_1495_Regression/Client_ORBInitializer.h b/TAO/tests/Bug_1495_Regression/Client_ORBInitializer.h
deleted file mode 100644
index 569419fb346..00000000000
--- a/TAO/tests/Bug_1495_Regression/Client_ORBInitializer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Bug_1495_Regression/Client_Task.cpp b/TAO/tests/Bug_1495_Regression/Client_Task.cpp
deleted file mode 100644
index 51150d118a7..00000000000
--- a/TAO/tests/Bug_1495_Regression/Client_Task.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * @file Client_Task.cpp
- * @author Will Otte <wotte@dre.vanderbilt.edu
- *
- * $Id$
- *
- * Implements the Client_Task class defined in Client_Task.h.
- */
-
-#include "Client_Task.h"
-#include "testC.h"
-#include "Client_ORBInitializer.h"
-
-
-Client_Task::Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr),
- input_ (input),
- corb_ (CORBA::ORB::_duplicate (corb))
-{}
-
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Bug1495_Regression::Bug1495_var server =
- Bug1495_Regression::Bug1495::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "Object reference <%s> is nil\n",
- input_));
-
- return 1;
- }
-
- // Try multiple calls to see if we keep being forwarded
- for (int i = 0; i < 5; i++)
- {
- // call the thread_id function on the test object
- CORBA::Long remote_thread_id;
-
- server->get_thread_id (remote_thread_id ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "Remote thread ID was %i\n",
- remote_thread_id));
-
- CORBA::Long mythread_id = (CORBA::Long)ACE_Thread::self();
- if (mythread_id != remote_thread_id)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Failed Bug_1495_Regression test. "
- "Expected thread id was %i, received %i.\n",
- mythread_id,
- remote_thread_id));
- }
- else
- {
- ACE_DEBUG ((LM_INFO,
- "Passed Bug_1495_Regression test.\n"
- "Local thread id was %i, received %i.\n",
- mythread_id,
- remote_thread_id));
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in client task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1495_Regression/Client_Task.h b/TAO/tests/Bug_1495_Regression/Client_Task.h
deleted file mode 100644
index c00a38f7b06..00000000000
--- a/TAO/tests/Bug_1495_Regression/Client_Task.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file Client_Task.h
- * @author Will Otte <wotte@dre.vanderbilt.edu>'
- *
- * $Id$
- *
- * Defines the Client_Task class which acts as the process colocated client
- * thread for the Bug1492_Regression test.
- *
- */
-
-
-#ifndef BUG1492_REGRESSION_CLIENT_TASK_H
-#define BUG1492_REGRESSION_CLIENT_TASK_H
-
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-
-#include "tao/ORB.h"
-
-/// Implements a Task to run the process colocated client ORB.
-
-class Client_Task : public ACE_Task_Base
-{
- public:
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point.
- int svc (void);
-
-
- private:
- /// File to read in the remote IOR.
- const char *input_;
-
- /// Client ORB.
- CORBA::ORB_var corb_;
-
-};
-
-
-#include /**/ "ace/post.h"
-#endif /* BUG1492_REGRESSION_CLIENT_TASK_H */
diff --git a/TAO/tests/Bug_1495_Regression/Server_ORBInitializer.cpp b/TAO/tests/Bug_1495_Regression/Server_ORBInitializer.cpp
deleted file mode 100644
index 9993a624d7f..00000000000
--- a/TAO/tests/Bug_1495_Regression/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Server_ORBInitializer.h"
-#include "server_interceptor.h"
-
-ACE_RCSID (Service_Context_Manipulation, Server_ORBInitializer, "$Id$")
-
-Server_ORBInitializer::Server_ORBInitializer (void)
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No Op
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (this->server_interceptor_,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var interceptor =
- this->server_interceptor_;
-
- info->add_server_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-Echo_Server_Request_Interceptor *
-Server_ORBInitializer::server_interceptor (void)
-{
- return this->server_interceptor_;
-}
-
diff --git a/TAO/tests/Bug_1495_Regression/Server_ORBInitializer.h b/TAO/tests/Bug_1495_Regression/Server_ORBInitializer.h
deleted file mode 100644
index f47e9ce5e68..00000000000
--- a/TAO/tests/Bug_1495_Regression/Server_ORBInitializer.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-class Echo_Server_Request_Interceptor;
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Server ORB initializer.
-class Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Server_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the created server request interceptor. Only valid after
- /// post_init(), i.e. ORB_init(), has been called.
- Echo_Server_Request_Interceptor * server_interceptor (void);
-
-private:
- /// Pointer to the server request interceptor. ORB is responsible
- /// for storage.
- Echo_Server_Request_Interceptor * server_interceptor_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Bug_1495_Regression/Server_Task.cpp b/TAO/tests/Bug_1495_Regression/Server_Task.cpp
deleted file mode 100644
index acaf0e35779..00000000000
--- a/TAO/tests/Bug_1495_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * @file Server_Task.cpp
- * @author Will Otte <wotte@dre.vanderbilt.edu>
- *
- * $Id$
- *
- * Implements the Server_Task class which acts as the process colocated
- * corba server for Bug_1495_Regression test.
- */
-
-#include "Server_Task.h"
-#include "ace/OS_NS_unistd.h"
-#include "test_i.h"
-
-#include "ace/Manual_Event.h"
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- sorb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA \n"));
- return 1;
- }
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Bug1495_i *server_impl = 0;
- ACE_NEW_RETURN (server_impl,
- Bug1495_i (sorb_.in ()),
- 0);
- PortableServer::ServantBase_var owner_transfer (server_impl);
-
- Bug1495_Regression::
- Bug1495_var bug1495 = server_impl->_this();
-
- CORBA::String_var ior = sorb_->object_to_string (bug1495.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (output_ != 0)
- {
- FILE *output_file = ACE_OS::fopen (output_, "w");
-
- if (output_file == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Cannot open output file for writing the "
- "thread server IOR: %s", output_));
- return 1;
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // sleep for a few seconds and hope the remote server picks up the
- // ior.
- ACE_OS::sleep (5);
-
- // Signal the manual event to wake the main thread up.
- me_.signal ();
-
- // The ORB will run for 15 seconds and shut down.
- ACE_Time_Value tv (15, 0);
- sorb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Event loop finished for the thread server.\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught an exception in server task: ");
- return 1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (1);
-
- return 0;
-}
-
-
diff --git a/TAO/tests/Bug_1495_Regression/Server_Task.h b/TAO/tests/Bug_1495_Regression/Server_Task.h
deleted file mode 100644
index b00725ba805..00000000000
--- a/TAO/tests/Bug_1495_Regression/Server_Task.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * @file Server_Task.h
- * @author Will Otte <w.otte@dre.vanderbilt.edu>
- *
- * $Id$
- *
- * Defines the Server_Task class that acts as a process colocated ORB server
- * for Bug_1495_Regression.
- */
-
-#ifndef BUG1495_SERVER_TASK_H
-#define BUG1495_SERVER_TASK_H
-
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-
-#include "tao/ORB.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/// Implements the Task to run the process colocated thread.
-class Server_Task : public ACE_Task_Base
-{
- public:
- /// Constructor
- Server_Task (const char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- private:
- /// Output file for the server IOR
- const char *output_;
-
- /// Manual thread event to signal the main thread to create
- /// the client thread.
- ACE_Manual_Event &me_;
-
- /// Points to my ORB.
- CORBA::ORB_var sorb_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* BUG1495_SERVER_TASK_H */
diff --git a/TAO/tests/Bug_1495_Regression/Threaded_Client.cpp b/TAO/tests/Bug_1495_Regression/Threaded_Client.cpp
deleted file mode 100644
index 99bb3239dfc..00000000000
--- a/TAO/tests/Bug_1495_Regression/Threaded_Client.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * $Id$
- *
- * @file Threaded_Client.cpp
- * @author Will Otte <wotte@dre.vanderbilt.edu>
- *
- * This program spawns two threads:
- * 1.) A "server" thread using Server_Task that acts as a server meant to
- * recieve forwarded requests.
- * 2.) A "client" thread using Client_Task that acts as a client that sends
- * a get_thread_id request that is forwarded by a remote server to
- * the server in thread (1).
- *
- *
- * The test passes if the thread id of the thread that services the get_thread_id
- * request is the same as the thread that makes the request.
- *
- */
-
-#include "Server_Task.h"
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/Manual_Event.h"
-
-const char *ior_input_file = "file://test.ior";
-const char *ior_output_file = "thr_server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- ior_input_file = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i alternate_remote_ior "
- "-o alternate_local_ior "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- // Parse command line
- if (parse_args (argc, argv) == -1)
- {
- return -1;
- }
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- ACE_Argv_Type_Converter main_args_s (argc, argv);
-
- CORBA::ORB_var sorb =
- CORBA::ORB_init (main_args_s.get_argc (),
- main_args_s.get_TCHAR_argv (),
- "Server_ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event me;
-
- Server_Task server_task (ior_output_file,
- sorb.in (),
- me,
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_JOINABLE, 1, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating the server task."));
- return -1;
- }
-
- // Wait for the server task to activate.
- me.wait ();
-
- ACE_Argv_Type_Converter main_args_c (argc, argv);
-
- CORBA::ORB_var corb =
- CORBA::ORB_init (main_args_c.get_argc (),
- main_args_c.get_TCHAR_argv (),
- "Client_ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- {
- Client_Task client_task (ior_input_file,
- corb.in (),
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_JOINABLE, 1, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client thread.\n"));
- return -1;
- }
-
- ACE_Thread_Manager::instance ()->wait ();
- }
-
- corb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // ignore exceptions
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "Threaded client ready.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1495_Regression/Threaded_Server.cpp b/TAO/tests/Bug_1495_Regression/Threaded_Server.cpp
deleted file mode 100644
index 95cd68db7e7..00000000000
--- a/TAO/tests/Bug_1495_Regression/Threaded_Server.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "test_i.h"
-#include "server_interceptor.h"
-#include "Server_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- server,
- "$Id$" )
-
-const char *ior_output_file = "test.ior";
-const char *ior_input_file = "file://thr_server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:o:");
- int c;
-
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- ior_input_file = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i <iorfile>"
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Create the ORB initializer.
- Server_ORBInitializer *temp_initializer = 0;
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer,
- -1);
-
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now initialize the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv,
- "Remote_Server_ORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA. \n" ),
- 1);
- }
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- // Create the interceptor.
- Echo_Server_Request_Interceptor * server_interceptor =
- temp_initializer->server_interceptor();
-
- if (server_interceptor == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Could not obtain reference to "
- "server request interceptor. \n"),
- -1);
- }
-
- // Pull in the ior from the remote server to use as the forward location.
- CORBA::Object_var forward_location = orb->string_to_object (ior_input_file
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (forward_location.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil \n",
- ior_input_file),
- 1);
- }
-
- server_interceptor->forward_reference (forward_location.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Bug1495_i server_impl (orb.in ());
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&server_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Bug1495_Regression::Bug1495_var server =
- Bug1495_Regression::Bug1495::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the server IOR to a file
- if (ior_output_file != 0)
- {
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing the "
- "server IOR: %s", ior_output_file),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- ACE_Time_Value tv (15, 0);
-
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (server_interceptor->forward_location_done() == false)
- {
- ACE_ERROR ((LM_ERROR, "ERRROR: Forward location has not occured!"));
- }
-
- ACE_DEBUG ((LM_DEBUG, "Threaded Server event loop finished \n"));
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught an exception in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "Threaded Server ready\n"));
-
- return 0;
-}
-
-
diff --git a/TAO/tests/Bug_1495_Regression/client_interceptor.cpp b/TAO/tests/Bug_1495_Regression/client_interceptor.cpp
deleted file mode 100644
index fc019f046ed..00000000000
--- a/TAO/tests/Bug_1495_Regression/client_interceptor.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// $Id$
-
-#include "client_interceptor.h"
-#include "tao/OctetSeqC.h"
-#include "ace/Log_Msg.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_string.h"
-#include "ace/Thread.h"
-
-ACE_RCSID (Bug_1495_Regression_Test,
- client_interceptor,
- "$Id$")
-
-
-Echo_Client_Request_Interceptor::
-Echo_Client_Request_Interceptor (const char *id)
- : myname_ ("Echo_Client_Interceptor"),
- orb_id_ (CORBA::string_dup (id))
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do Nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ACE_UNUSED_ARG (ri);
-// No Op
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_UNUSED_ARG (ri);
- // No Op
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ACE_UNUSED_ARG (ri);
-// no op
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // No op
- ACE_UNUSED_ARG (ri);
-}
-
-
diff --git a/TAO/tests/Bug_1495_Regression/client_interceptor.h b/TAO/tests/Bug_1495_Regression/client_interceptor.h
deleted file mode 100644
index 2503a4b75b7..00000000000
--- a/TAO/tests/Bug_1495_Regression/client_interceptor.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Client_Request_Interceptor (const char *orb_id);
- // ctor.
-
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-
- CORBA::String_var orb_id_;
- // The ID of the ORB where this interceptor was created, usually
- // obtained from the ORBInitInfo
-
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Bug_1495_Regression/run_test.pl b/TAO/tests/Bug_1495_Regression/run_test.pl
deleted file mode 100755
index 417ff9437e6..00000000000
--- a/TAO/tests/Bug_1495_Regression/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$inputfile = PerlACE::LocalFile ("test.ior");
-$thrserverfile = PerlACE::LocalFile ("thr_server.ior");
-
-unlink $inputfile;
-unlink $thrserverfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("client");
-}
-else {
- $CL = new PerlACE::Process ("client");
-}
-$SV = new PerlACE::Process ("server", "-o $inputfile -i file://$thrserverfile");
-
-$client = $CL->Spawn ();
-
-if (PerlACE::waitforfile_timed ($thrserverfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$thrserverfile>\n";
- exit 1;
-}
-
-$server = $SV->SpawnWaitKill (30);
-
-$client = $CL->WaitKill (5);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $inputfile;
-unlink $thrserverfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1495_Regression/run_test_complex.pl b/TAO/tests/Bug_1495_Regression/run_test_complex.pl
deleted file mode 100755
index 5cb99abd017..00000000000
--- a/TAO/tests/Bug_1495_Regression/run_test_complex.pl
+++ /dev/null
@@ -1,63 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$inputfile = PerlACE::LocalFile ("test.ior");
-$thrserverfile = PerlACE::LocalFile ("thr_server.ior");
-$middleserverfile = PerlACE::LocalFile ("middle.ior");
-
-unlink $inputfile;
-unlink $thrserverfile;
-unlink $middleserverfile;
-$status = 0;
-
-$CL = new PerlACE::Process ("client", "-i file://$inputfile -o $thrserverfile");
-$SV = new PerlACE::Process ("server", "-i file://$middleserverfile -o $inputfile");
-$ML = new PerlACE::Process ("server", "-i file://$thrserverfile -o $middleserverfile");
-
-$CL->Spawn ();
-
-if (PerlACE::waitforfile_timed ($thrserverfile, 2) == -1) {
- print STDERR "ERROR: cannot find file <$thrserverfile>\n";
- exit 1;
-}
-
-$ML->Spawn();
-
-if (PerlACE::waitforfile_timed ($middleserverfile, 2) == -1) {
- print STDERR "ERROR: cannot find file <$middleserverfile>\n";
- exit 1;
-}
-
-$server = $SV->SpawnWaitKill (50);
-
-$client = $CL->WaitKill (5);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$middle = $ML->WaitKill (5);
-
-if ($middle != 0) {
- print STDERR "ERROR: middle server returned $server\n";
- $status = 1;
-}
-
-unlink $inputfile;
-unlink $thrserverfile;
-unlink $middleserverfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1495_Regression/server_interceptor.cpp b/TAO/tests/Bug_1495_Regression/server_interceptor.cpp
deleted file mode 100644
index c4a32357087..00000000000
--- a/TAO/tests/Bug_1495_Regression/server_interceptor.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-// $Id$
-
-#include "server_interceptor.h"
-#include "tao/OctetSeqC.h"
-#include "ace/Log_Msg.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_string.h"
-#include "ace/Thread.h"
-
-ACE_RCSID (Bug_1495_Regression_Test,
- server_interceptor,
- "$Id$")
-
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (CORBA::Object_ptr forward_location)
- : myname_ ("Echo_Server_Interceptor"),
- forward_location_ (CORBA::Object::_duplicate (forward_location)),
- forward_location_done_ (false)
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor (void)
-{
-}
-
-void
-Echo_Server_Request_Interceptor::forward_reference (CORBA::Object_ptr forward_location
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (CORBA::is_nil (forward_location))
- ACE_THROW (CORBA::INV_OBJREF (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- EINVAL),
- CORBA::COMPLETED_NO));
- this->forward_location_ = CORBA::Object::_duplicate (forward_location);
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_request_service_contexts from "
- "\"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Ignore the "_is_a" operation since it may have been invoked
- // locally on the server side as a side effect of another call,
- // meaning that the client hasn't added the service context yet.
- // Same goes for the shutdown call
- if (ACE_OS_String::strcmp ("_is_a", operation.in ()) == 0 ||
- ACE_OS_String::strcmp ("shutdown", operation.in ()) == 0)
- return;
-
- forward_location_done_ = true;
-
- ACE_DEBUG ((LM_DEBUG, "Sending LOCATION_FORWARD, current thread %i\n", ACE_Thread::self ()));
-
- ACE_THROW (PortableInterceptor::ForwardRequest (this->forward_location_));
-
-}
-
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No op
- ACE_UNUSED_ARG (ri);
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // No Op
- ACE_UNUSED_ARG (ri);
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- // This will throw an exception if a location forward has not
- // occured. If an exception is thrown then something is wrong with
- // the PortableInterceptor::ForwardRequest support.
- CORBA::Object_var forward = ri->forward_reference (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (forward.in ()))
- ACE_THROW (CORBA::INTERNAL ());
-}
-
-bool
-Echo_Server_Request_Interceptor::forward_location_done() const
-{
- return forward_location_done_;
-}
diff --git a/TAO/tests/Bug_1495_Regression/server_interceptor.h b/TAO/tests/Bug_1495_Regression/server_interceptor.h
deleted file mode 100644
index f1f682be9f9..00000000000
--- a/TAO/tests/Bug_1495_Regression/server_interceptor.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_SERVER_INTERCEPTOR_H
-#define TAO_SERVER_INTERCEPTOR_H
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
-
- Echo_Server_Request_Interceptor (CORBA::Object_ptr forward_location);
-
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- void forward_reference (CORBA::Object_ptr forward_location
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- bool forward_location_done() const;
-private:
- const char *myname_;
- CORBA::Object_ptr forward_location_;
- bool forward_location_done_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_SERVER_INTERCEPTOR_H */
diff --git a/TAO/tests/Bug_1495_Regression/test.idl b/TAO/tests/Bug_1495_Regression/test.idl
deleted file mode 100644
index 60a9b2e526b..00000000000
--- a/TAO/tests/Bug_1495_Regression/test.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Bug_1495_Regression
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test regression of bug 1495
-//
-// = AUTHORS
-// Will Otte <wotte@dre.vanderbilt.edu>
-//
-// ============================================================================
-
-module Bug1495_Regression
-{
- /// A test idl to check Bug 1495
- interface Bug1495
- {
- /// get the thread id of the thread that services this request.
- void get_thread_id (out long thread_id);
-
- /// Shutdown the ORB.
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Bug_1495_Regression/test_i.cpp b/TAO/tests/Bug_1495_Regression/test_i.cpp
deleted file mode 100644
index f79564cc0dd..00000000000
--- a/TAO/tests/Bug_1495_Regression/test_i.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-/**
- * @file test_i.cpp
- * @author Will Otte <wotte@dre.vanderbilt.edu>
- */
-
-#include "test_i.h"
-#include "ace/Thread.h"
-
-
-Bug1495_i::Bug1495_i ()
-{}
-
-// Implementation skeleton constructor
-Bug1495_i::Bug1495_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-// Implementation skeleton destructor
-Bug1495_i::~Bug1495_i (void)
-{
-}
-
-void
-Bug1495_i::get_thread_id (
- CORBA::Long_out thread_id
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- thread_id = (CORBA::Long)ACE_Thread::self();
-}
-
-void
-Bug1495_i::shutdown (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_DEBUG ((LM_INFO,
- "Shutting down orb %i\n",
- ACE_Thread::self()));
-
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/Bug_1495_Regression/test_i.h b/TAO/tests/Bug_1495_Regression/test_i.h
deleted file mode 100644
index db21e2a6abb..00000000000
--- a/TAO/tests/Bug_1495_Regression/test_i.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
-// TAO and the TAO IDL Compiler have been developed by:
-// Center for Distributed Object Computing
-// Washington University
-// St. Louis, MO
-// USA
-// http://www.cs.wustl.edu/~schmidt/doc-center.html
-// and
-// Distributed Object Computing Laboratory
-// University of California at Irvine
-// Irvine, CA
-// USA
-// http://doc.ece.uci.edu/
-// and
-// Institute for Software Integrated Systems
-// Vanderbilt University
-// Nashville, TN
-// USA
-// http://www.isis.vanderbilt.edu/
-//
-// Information about TAO is available at:
-// http://www.cs.wustl.edu/~schmidt/TAO.html
-
-// TAO_IDL - Generated from
-// be/be_codegen.cpp:887
-
-#ifndef TESTI_H_
-#define TESTI_H_
-
-#include "testS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Bug1495_i : public virtual POA_Bug1495_Regression::Bug1495
-{
-public:
- //Constructor
- Bug1495_i (void);
-
- Bug1495_i (CORBA::ORB_ptr orb);
-
-
- //Destructor
- virtual ~Bug1495_i (void);
-
- virtual
- void get_thread_id (CORBA::Long_out thread_id ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-private:
- CORBA::ORB_ptr orb_;
-
-};
-
-
-#endif /* TESTI_H_ */
diff --git a/TAO/tests/Bug_1535_Regression/.cvsignore b/TAO/tests/Bug_1535_Regression/.cvsignore
deleted file mode 100644
index 4f843084647..00000000000
--- a/TAO/tests/Bug_1535_Regression/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bug_1535_regression
diff --git a/TAO/tests/Bug_1535_Regression/Bug_1535_Regression.mpc b/TAO/tests/Bug_1535_Regression/Bug_1535_Regression.mpc
deleted file mode 100644
index 7d7eaacb597..00000000000
--- a/TAO/tests/Bug_1535_Regression/Bug_1535_Regression.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(bug_1535_regression) : taoserver, utils, minimum_corba {
- exename = bug_1535_regression
- Source_Files {
- bug_1535_regression.cpp
- }
-}
diff --git a/TAO/tests/Bug_1535_Regression/Test.idl b/TAO/tests/Bug_1535_Regression/Test.idl
deleted file mode 100644
index c3b752788a4..00000000000
--- a/TAO/tests/Bug_1535_Regression/Test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface Test
-{
- void print_hello_world();
-};
diff --git a/TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp b/TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp
deleted file mode 100644
index 1bec57c8fde..00000000000
--- a/TAO/tests/Bug_1535_Regression/bug_1535_regression.cpp
+++ /dev/null
@@ -1,232 +0,0 @@
-// $Id$
-
-#include "TestS.h"
-#include "tao/Utils/ORB_Destroyer.h"
-#include "tao/Utils/RIR_Narrow.h"
-#include "tao/Utils/PolicyList_Destroyer.h"
-#include "tao/Utils/Servant_Var.h"
-
-ACE_RCSID (Bug_1535_Regression,
- bug_1535_regression,
- "$Id$")
-
-PortableServer::POA_ptr
-create_persistent_POA (PortableServer::POA_ptr parent,
- char const * name
- ACE_ENV_ARG_DECL)
-{
- TAO::Utils::PolicyList_Destroyer plist (3);
- plist.length(3);
-
- plist[0] =
- parent->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- plist[1] =
- parent->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- plist[2] =
- parent->create_implicit_activation_policy (
- PortableServer::NO_IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- PortableServer::POAManager_var mgr =
- parent->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- return parent->create_POA (name,
- mgr.in(),
- plist
- ACE_ENV_ARG_PARAMETER);
-}
-
-void
-test_create_object_before_servant_reactivation (
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr root_poa
- ACE_ENV_ARG_DECL)
-{
- // Create a persistent POA and then create a reference in it...
- PortableServer::POA_var persistent_poa =
- create_persistent_POA(root_poa,
- "T1"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId ("TestServant");
-
- char const * id = _tc_Test->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object =
- persistent_poa->create_reference_with_id (
- oid.in (),
- id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (object.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) nil reference in create_reference_with_id \n"));
-
- return;
- }
-
- CORBA::String_var ior =
- orb->object_to_string (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Now destroy the POA...
- persistent_poa->destroy (true,
- true);
-
- // Now create the POA again...
- persistent_poa =
- create_persistent_POA (root_poa,
- "T1"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // And try to create the object again...
- object =
- orb->string_to_object (ior.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if(CORBA::is_nil (object.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) nil reference in string_to_object (servant reactivation) \n"));
- return;
- }
-
- persistent_poa->destroy (true,
- true
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-test_create_object_before_POA_reactivation(
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr root_poa
- ACE_ENV_ARG_DECL)
-{
- // Create a persistent POA and then create a reference in it...
- PortableServer::POA_var persistent_poa =
- create_persistent_POA (root_poa,
- "T2"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId ("TestServant");
-
- char const * id = _tc_Test->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object =
- persistent_poa->create_reference_with_id (oid.in (),
- id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (object.in ()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) nil reference in create_reference_with_id \n"));
- return;
- }
-
- CORBA::String_var ior =
- orb->object_to_string (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Now destroy the POA...
- persistent_poa->destroy (true,
- true
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // And try to create the object again...
- object = orb->string_to_object (ior.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (object.in ()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) nil reference in string_to_object (POA reactivation) \n"));
-
- return;
- }
-
- persistent_poa->destroy (true,
- true
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO::Utils::ORB_Destroyer orb_destroyer (orb.in());
-
- PortableServer::POA_var root_poa =
- TAO::Utils::RIR_Narrow<PortableServer::POA>::narrow (orb.in (),
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_create_object_before_POA_reactivation (orb.in(),
- root_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_create_object_before_servant_reactivation (orb.in (),
- root_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught a CORBA exception \n");
- return 1;
- }
- ACE_CATCHALL
- {
- return 1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (1);
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1535_Regression/run_test.pl b/TAO/tests/Bug_1535_Regression/run_test.pl
deleted file mode 100755
index 6e368d26fcc..00000000000
--- a/TAO/tests/Bug_1535_Regression/run_test.pl
+++ /dev/null
@@ -1,31 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("bug_1535_regression");
-}
-else {
- $SV = new PerlACE::Process ("bug_1535_regression");
-}
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1551_Regression/.cvsignore b/TAO/tests/Bug_1551_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1551_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1551_Regression/Bug_1551_Regression.mpc b/TAO/tests/Bug_1551_Regression/Bug_1551_Regression.mpc
deleted file mode 100644
index 96a4dfabd63..00000000000
--- a/TAO/tests/Bug_1551_Regression/Bug_1551_Regression.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, ami, iortable {
- Source_Files {
- Hello.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, ami {
- exename = client
- after += *Server
- Source_Files {
- Client_Task.cpp
- Reply_Handler.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1551_Regression/Client_Task.cpp b/TAO/tests/Bug_1551_Regression/Client_Task.cpp
deleted file mode 100644
index dd653c0143a..00000000000
--- a/TAO/tests/Bug_1551_Regression/Client_Task.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Bug_1XXX_Regression, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Hello_ptr receiver,
- CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , receiver_ (Test::Hello::_duplicate (receiver))
- , handler_ (new Reply_Handler(receiver, orb))
- , handler_var_ (handler_->_this())
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Client_Task::~Client_Task (void)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Start 25 separate concurrent request streams
- for (CORBA::Short i = 0; i != 25; ++i)
- {
- this->receiver_->sendc_short_sleep (this->handler_var_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_Time_Value tv(10, 0);
- orb_->run(tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "(%P|%t) Client_Task - caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1551_Regression/Client_Task.h b/TAO/tests/Bug_1551_Regression/Client_Task.h
deleted file mode 100644
index ff66a0e51a0..00000000000
--- a/TAO/tests/Bug_1551_Regression/Client_Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_TASK_H
-#define CLIENT_TASK_H
-
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "Reply_Handler.h"
-#include "tao/Utils/Servant_Var.h"
-#include "ace/Task.h"
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Hello_ptr receiver,
- CORBA::ORB_ptr o,
- ACE_Thread_Manager *thr_mgr);
-
- ~Client_Task (void);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the test interface
- Test::Hello_var receiver_;
-
- TAO::Utils::Servant_Var<Reply_Handler> handler_;
-
- Test::AMI_HelloHandler_var handler_var_;
-
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_TASK_H */
diff --git a/TAO/tests/Bug_1551_Regression/Hello.cpp b/TAO/tests/Bug_1551_Regression/Hello.cpp
deleted file mode 100644
index 5c72639015f..00000000000
--- a/TAO/tests/Bug_1551_Regression/Hello.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Bug_1XXX_Regression, Hello, "$Id$")
-
-Hello::Hello(
- CORBA::ORB_ptr orb,
- bool simulate_crashes)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , simulate_crashes_(simulate_crashes)
- , atomic_counter_(200)
-{
-}
-
-void
-Hello::short_sleep (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- long count = atomic_counter_--;
-
-#if 0
- if(count % 40 == 0)
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t) Counter was %d\n", count));
- }
-#endif /* 0 */
- if(simulate_crashes_ && count == 0)
- {
- ACE_DEBUG((LM_DEBUG, "Aborting!\n"));
- ACE_Time_Value tv(5, 0);
- ACE_OS::sleep(tv);
- ACE_OS::abort();
- }
-}
diff --git a/TAO/tests/Bug_1551_Regression/Hello.h b/TAO/tests/Bug_1551_Regression/Hello.h
deleted file mode 100644
index 156365e9b6b..00000000000
--- a/TAO/tests/Bug_1551_Regression/Hello.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
- /// Constructor
- Hello(CORBA::ORB_ptr orb, bool simulate_crashes);
-
- virtual void short_sleep (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
- bool simulate_crashes_;
-
- ACE_Atomic_Op<TAO_SYNCH_MUTEX,long> atomic_counter_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_1551_Regression/README b/TAO/tests/Bug_1551_Regression/README
deleted file mode 100644
index ffecd8abf8d..00000000000
--- a/TAO/tests/Bug_1551_Regression/README
+++ /dev/null
@@ -1,5 +0,0 @@
-A regression test for [BUGID:1551].
-
-The ORB might deadlock if one tries send messages while handling
-exceptions in AMI. Now the bug has been fixed and this test
-should hang. \ No newline at end of file
diff --git a/TAO/tests/Bug_1551_Regression/Reply_Handler.cpp b/TAO/tests/Bug_1551_Regression/Reply_Handler.cpp
deleted file mode 100644
index c6f274953fe..00000000000
--- a/TAO/tests/Bug_1551_Regression/Reply_Handler.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// $Id$
-//
-
-#include "Reply_Handler.h"
-
-ACE_RCSID(Bug_1XXX_Regression, Reply_Handler, "$Id$")
-
-Reply_Handler::Reply_Handler (
- Test::Hello_ptr hello, CORBA::ORB_ptr orb)
- : counter_(1000)
- , hello_(Test::Hello::_duplicate(hello))
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Reply_Handler::short_sleep (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- check_counter(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::AMI_HelloHandler_var current =
- _this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- hello_->sendc_short_sleep(current.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Reply_Handler::short_sleep_excep (
- ::Messaging::ExceptionHolder *ex
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- check_counter(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- if (ex)
- {
- ex->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- // Problem with the exceptionholder, instead of crashing, print
- // an error to the log, this normally shouldn't happen but when
- // there is a bug in TAO it can happen :-(
- ACE_ERROR ((LM_ERROR, "ERROR: Got nill exceptionholder\n"));
- }
- }
- ACE_CATCHANY
- {
- // Exceptions are expected and thus ignored in normal runs:
-#if 0
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "(%P|%t) Reply_Handler - caught exception:");
-#endif /* 0 */
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- Test::AMI_HelloHandler_var current =
- _this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- hello_->sendc_short_sleep(current.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void Reply_Handler::
-check_counter(ACE_ENV_SINGLE_ARG_DECL)
-{
- long const count = --counter_;
- if(count == 0)
- {
- // ACE_DEBUG((LM_DEBUG, "(%P|%t) Shut down client thread\n"));
- orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- return;
- }
-#if 0
- if(count % 100 == 0)
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t) count = %d\n", count));
- }
-#endif /* 0 */
-}
diff --git a/TAO/tests/Bug_1551_Regression/Reply_Handler.h b/TAO/tests/Bug_1551_Regression/Reply_Handler.h
deleted file mode 100644
index 26ca559dd07..00000000000
--- a/TAO/tests/Bug_1551_Regression/Reply_Handler.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef REPLY_HANDLER_H
-#define REPLY_HANDLER_H
-
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-class Reply_Handler
- : public POA_Test::AMI_HelloHandler
-{
-public:
- Reply_Handler (
- Test::Hello_ptr hello,
- CORBA::ORB_ptr orb);
-
- void short_sleep (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void short_sleep_excep (::Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- void check_counter(ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> counter_;
- Test::Hello_var hello_;
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* REPLY_HANDLER_H */
diff --git a/TAO/tests/Bug_1551_Regression/Server_Task.cpp b/TAO/tests/Bug_1551_Regression/Server_Task.cpp
deleted file mode 100644
index 541faead41b..00000000000
--- a/TAO/tests/Bug_1551_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-
-ACE_RCSID(Bug_1XXX_Regression, Server_Task, "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Bug_1551_Regression/Server_Task.h b/TAO/tests/Bug_1551_Regression/Server_Task.h
deleted file mode 100644
index 2dc1e89d2cd..00000000000
--- a/TAO/tests/Bug_1551_Regression/Server_Task.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#ifndef SERVER_TASK_H
-#define SERVER_TASK_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-class Server_Task : public ACE_Task_Base
-{
-public:
- Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- int svc (void);
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* SERVER_TASK_H */
diff --git a/TAO/tests/Bug_1551_Regression/Test.idl b/TAO/tests/Bug_1551_Regression/Test.idl
deleted file mode 100644
index 7b4c95844bd..00000000000
--- a/TAO/tests/Bug_1551_Regression/Test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /// A very simple interface
- interface Hello
- {
- void short_sleep();
- };
-};
diff --git a/TAO/tests/Bug_1551_Regression/client.cpp b/TAO/tests/Bug_1551_Regression/client.cpp
deleted file mode 100644
index a898cdb3398..00000000000
--- a/TAO/tests/Bug_1551_Regression/client.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-//
-// $Id$
-//
-
-#include "TestS.h"
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int nthreads = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "n:k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi(get_opts.opt_arg());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int retval = 0;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TimeBase::TimeT timeout_period = 20 * 1000;
-
- CORBA::Any timeout_as_any;
- timeout_as_any <<= timeout_period;
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- timeout_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- // Let the client perform the test in a separate thread
-
-
- Client_Task client (hello.in (),
- orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (client.activate (THR_NEW_LWP | THR_JOINABLE, nthreads) != 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR - Cannot activate client threads\n"),
- 1);
- }
-
-
- ACE_Time_Value thread_deadline = ACE_OS::gettimeofday();
- thread_deadline += 30;
-
- if(client.thr_mgr ()->wait (&thread_deadline) == -1)
- {
- ACE_ERROR((LM_ERROR,
- "ERROR - Timeout waiting for client threads\n"));
-
- retval = 1;
- }
-
- root_poa->destroy (1, // ethernalize objects
- 0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
diff --git a/TAO/tests/Bug_1551_Regression/run_test.pl b/TAO/tests/Bug_1551_Regression/run_test.pl
deleted file mode 100755
index 380a98e495d..00000000000
--- a/TAO/tests/Bug_1551_Regression/run_test.pl
+++ /dev/null
@@ -1,76 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBdotteddecimaladdresses 1");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBdotteddecimaladdresses 1");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-local $start_time = time();
-local $max_running_time = 600; # 10 minutes
-local $elapsed = time() - $start_time;
-
-local $ntimes = 50 ; # run test for 50 times
-local $n = 0;
-
-while($n < $ntimes) {
-
-print STDERR " Going .. \n";
-$sv1 = $SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-# Start all clients in parallel
-$client1 = $CL1->Spawn ();
-$client2 = $CL2->Spawn ();
-$client3 = $CL3->Spawn ();
-
-
-sleep (30);
-$SV->WaitKill (3) unless $sv1 < 0;
-$CL1->WaitKill (3);
-$CL2->WaitKill (3);
-$CL3->WaitKill (3);
-
-if ($client3 != 0){
- $status = -1;
- exit $status;
-}
-
-if ($client2 != 0) {
- $status = -1;
- exit $status;
-}
-
-if ($client1 != 0){
- $status = -1;
- exit $status;
-}
- # $elapsed = time() - $start_time;
-$n = $n + 1;
-
-unlink $iorfile;
-}
-
-
-
-exit $status;
diff --git a/TAO/tests/Bug_1551_Regression/server.cpp b/TAO/tests/Bug_1551_Regression/server.cpp
deleted file mode 100644
index 5adc91117fd..00000000000
--- a/TAO/tests/Bug_1551_Regression/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "Server_Task.h"
-#include "tao/Utils/Servant_Var.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (Bug_1XXX_Regression, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-bool simulate_crashes = true;
-
-int nthreads = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xn:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'x':
- simulate_crashes = false;
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi(get_opts.opt_arg());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " -o <iorfile>"
- " -x (do not simulate crashes)"
- " -n <nthreads>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Hello> hello_impl(
- new Hello(orb.in(), simulate_crashes));
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- Server_Task st (orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (st.activate (THR_NEW_LWP | THR_JOINABLE, nthreads, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "Error activating server task\n"));
-
- return -1;
- }
-
- ACE_Thread_Manager::instance()->wait();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1568_Regression/.cvsignore b/TAO/tests/Bug_1568_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1568_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc b/TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc
deleted file mode 100644
index d6430831e00..00000000000
--- a/TAO/tests/Bug_1568_Regression/Bug_1568_Regression.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, amh {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoserver, amh {
- after += *Server
- exename = client
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1568_Regression/Test.idl b/TAO/tests/Bug_1568_Regression/Test.idl
deleted file mode 100644
index 288bf4aac97..00000000000
--- a/TAO/tests/Bug_1568_Regression/Test.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-module Foo
-{
- module Bar
- {
- interface A
- {
- void op1();
- void op2();
- };
-
- interface B
- {
- void op3();
- };
- };
-};
-
-module Baz
-{
- interface C : Foo::Bar::A, Foo::Bar::B
- {
- void op4();
- };
-};
diff --git a/TAO/tests/Bug_1568_Regression/client.cpp b/TAO/tests/Bug_1568_Regression/client.cpp
deleted file mode 100644
index 44edda43ee7..00000000000
--- a/TAO/tests/Bug_1568_Regression/client.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * @file client.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "TestC.h"
-
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1568_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Baz::C_var cobject =
- Baz::C::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (cobject.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot narrow Baz::C object <%s>\n",
- ior),
- 1);
- }
-
- cobject->op1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cobject->op2 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cobject->op3 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cobject->op4 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1568_Regression/run_test.pl b/TAO/tests/Bug_1568_Regression/run_test.pl
deleted file mode 100755
index 052826cdd5c..00000000000
--- a/TAO/tests/Bug_1568_Regression/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1568_Regression/server.cpp b/TAO/tests/Bug_1568_Regression/server.cpp
deleted file mode 100644
index fce73b267a5..00000000000
--- a/TAO/tests/Bug_1568_Regression/server.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * @file server.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "TestS.h"
-
-#include "tao/Utils/Servant_Var.h"
-#include "tao/corba.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Bug_1568_Regression, server, "$Id$")
-
-/**
- * @class Simple_C
- *
- * @brief A simple implementation of the 'C' object.
- *
- */
-class Simple_C
- : public virtual POA_Baz::AMH_C
-{
-public:
- Simple_C (CORBA::ORB_ptr orb);
-
- void op1 (
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void op2 (
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void op3 (
- Foo::Bar::AMH_BResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void op4 (
- Baz::AMH_CResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- CORBA::ORB_ptr orb_;
-};
-
-
-/***************************/
-/*** Servant Definition ***/
-
-Simple_C::Simple_C (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Simple_C::op1(
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Simple_C::op2(
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op2(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Simple_C::op3(
- Foo::Bar::AMH_BResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op3(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Simple_C::op4(
- Baz::AMH_CResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op4(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-// ****************************************************************
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Simple_C> simple_c_impl(
- new Simple_C(orb.in()));
-
- Baz::C_var simple_c =
- simple_c_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (simple_c.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1627_Regression/.cvsignore b/TAO/tests/Bug_1627_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1627_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1627_Regression/Bug_1627_Regression.mpc b/TAO/tests/Bug_1627_Regression/Bug_1627_Regression.mpc
deleted file mode 100644
index 93a6bb0d168..00000000000
--- a/TAO/tests/Bug_1627_Regression/Bug_1627_Regression.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable {
- Source_Files {
- Test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1627_Regression/README b/TAO/tests/Bug_1627_Regression/README
deleted file mode 100644
index ac9a014b526..00000000000
--- a/TAO/tests/Bug_1627_Regression/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This is an almost exact copy of the test for TAO Bug 1330 (Prism RT Bug 324).
-
-It is meant to provide regression for Prism RT Bug 596:
-"ORBEndpoint QoS" (i.e. it tests that you can define endpoint values as an environment variable). \ No newline at end of file
diff --git a/TAO/tests/Bug_1627_Regression/Test.idl b/TAO/tests/Bug_1627_Regression/Test.idl
deleted file mode 100644
index 6844131c75f..00000000000
--- a/TAO/tests/Bug_1627_Regression/Test.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-// $Id$
-//
-interface Test
-{
- void test_method();
-};
diff --git a/TAO/tests/Bug_1627_Regression/Test_i.cpp b/TAO/tests/Bug_1627_Regression/Test_i.cpp
deleted file mode 100644
index 70ccbb17d47..00000000000
--- a/TAO/tests/Bug_1627_Regression/Test_i.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// $Id$
-//
-#include "Test_i.h"
-
-Test_i::Test_i()
-{
- // Noop
-}
-
-Test_i::~Test_i()
-{
- // Noop
-}
-
-void
-Test_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Noop
-}
diff --git a/TAO/tests/Bug_1627_Regression/Test_i.h b/TAO/tests/Bug_1627_Regression/Test_i.h
deleted file mode 100644
index 43bcb9a548b..00000000000
--- a/TAO/tests/Bug_1627_Regression/Test_i.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-// -*- C++ -*-
-
-#if !defined BUG_1330_REGRESSION_TEST_I_H
- #define BUG_1330_REGRESSION_TEST_I_H
-
-#include "TestS.h"
-
-class Test_i: public POA_Test
-{
-public:
- /// Constructor
- Test_i (void);
-
- /// Destructor
- ~Test_i (void);
-
- /// A method
- void test_method(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#endif /* ! BUG_1330_REGRESSION_TEST_I_H */
diff --git a/TAO/tests/Bug_1627_Regression/client.cpp b/TAO/tests/Bug_1627_Regression/client.cpp
deleted file mode 100644
index f317731aeae..00000000000
--- a/TAO/tests/Bug_1627_Regression/client.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// $Id$
-//
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-const char *ior = "corbaloc:iiop:localhost:12345/Name\\2dwith\\2dhyphens";
-int shutdown_server = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 's':
- shutdown_server = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int result = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server =
- Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Server reference <%s>\n",
- ior),
- 1);
- }
-
-
- server->test_method(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- result =0;
-
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- result =1;
- }
- ACE_ENDTRY;
-
- return result;
-}
diff --git a/TAO/tests/Bug_1627_Regression/run_test.pl b/TAO/tests/Bug_1627_Regression/run_test.pl
deleted file mode 100755
index 2a542726cec..00000000000
--- a/TAO/tests/Bug_1627_Regression/run_test.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-
-# $Id$
-
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-
-# The client and server processes
-$SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-# We want the server to run on a fixed port
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-
-# We would normally have to specify the server port / host via -ORBEndpoint
-# but we are testing the ability to define it as an environment property
-$ENV {'TAO_ORBENDPOINT'} = "iiop://localhost:$port";
-
-# Fire up the server
-$SERVER->Spawn();
-
-# We don't need the IOR file but we can wait on the file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Try the corbaloc URL for the server. It's almost impossible that this will work
-# if the endpoint hasn't been read from the environment so we call success a pass.
-$CLIENT->Arguments("-k corbaloc:iiop:localhost:$port/Name-with-hyphens");
-if ($CLIENT->SpawnWaitKill (30) != 0)
-{
- print STDERR "ERROR: Bug rt596 Regression failed. Endpoint was not read from environment\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-unlink $server_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_1627_Regression/server.cpp b/TAO/tests/Bug_1627_Regression/server.cpp
deleted file mode 100644
index 63308e1c36c..00000000000
--- a/TAO/tests/Bug_1627_Regression/server.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-//
-// $Id$
-//
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "Test_i.h"
-
-#include "tao/IORTable/IORTable.h"
-
-const char *object_key = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- object_key = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "SERVER (%P): usage: %s "
- "-k <object key>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "SERVER (%P): Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_i server_impl;
-
-
-
- root_poa->activate_object ( &server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server = server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var table_object =
- orb->resolve_initial_references ("IORTable" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- adapter->bind("Name-with-hyphens", ior.in());
-
-
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "SERVER (%P): Cannot open output file "
- "for writing IOR: %s",
- "server.ior"),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG,
- "SERVER (%P): Activated as file://%s\n",
- "server.ior"));
-
- poa_manager->activate();
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "SERVER (%P): Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1628_Regression/TestCase.idl b/TAO/tests/Bug_1628_Regression/TestCase.idl
deleted file mode 100644
index 1e95c85d444..00000000000
--- a/TAO/tests/Bug_1628_Regression/TestCase.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-// $Id$
-//
-
-#include "TestType.idl"
-
-//module Test {
-//module Test2 {
-
-
-
- typedef HashedMD5SimpleSecret Body;
-
-
-//};
-//};
diff --git a/TAO/tests/Bug_1628_Regression/TestType.idl b/TAO/tests/Bug_1628_Regression/TestType.idl
deleted file mode 100644
index a7f1adde7b2..00000000000
--- a/TAO/tests/Bug_1628_Regression/TestType.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-// $Id$
-//
-
-//module Test {
-
-
- // The size of the hash md5
- const unsigned long HASH_MD5_SIZEOF = 16;
-
- // The hash MD5 type
- typedef octet HashedMD5SimpleSecret[HASH_MD5_SIZEOF] ;
-
-
-
-//};
diff --git a/TAO/tests/Bug_1628_Regression/run_test.pl b/TAO/tests/Bug_1628_Regression/run_test.pl
deleted file mode 100755
index e2abf7ec7d8..00000000000
--- a/TAO/tests/Bug_1628_Regression/run_test.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-
-# $Id$
-
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status =0;
-
-# The location of the tao_idl utility - depends on O/S
-if ($^O eq "MSWin32")
-{
- $tao_idl = "../../../bin/tao_idl";
-}
-else
-{
- $tao_idl = "../../../TAO/TAO_IDL/tao_idl";
-}
-
-# Generated code file names
-$TestCaseC_i = PerlACE::LocalFile("TestCaseC.i");
-unlink $TestCaseC_i;
-
-
-# Compile the IDL
-#
-$TAO_IDL = new PerlACE::Process("$tao_idl");
-$TAO_IDL->Arguments( "-Ge 1 -Sc TestCase.idl" ) ;
-if( $TAO_IDL->SpawnWaitKill(10) != 0 )
-{
- print STDERR "ERROR: can't compile IDL\n";
- $TAO_IDL->Kill ();
- $status = 1;
- exit $status;
-}
-
-# Test for the presence of Body_dup etc. Crude test assumes that if
-# Body_dup is there, then all the Body_* methods are also there.
-#
-$found = 0 ;
-open (I_FILE, "$TestCaseC_i") ;
-while( <I_FILE> )
-{
- chomp ;
- if( $_ =~ /Body_dup/ )
- {
- $found = 1 ;
- last ;
- }
-}
-if( $found != 1 )
-{
- print STDERR "ERROR: Body_* methods not found\n" ;
- $status = 1 ;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_1635_Regression/.cvsignore b/TAO/tests/Bug_1635_Regression/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Bug_1635_Regression/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Bug_1635_Regression/Bug_1635_Regression.mpc b/TAO/tests/Bug_1635_Regression/Bug_1635_Regression.mpc
deleted file mode 100644
index b0bd1069df5..00000000000
--- a/TAO/tests/Bug_1635_Regression/Bug_1635_Regression.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Bug_1635_Client): taoclient {
- Source_Files {
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_1635_Regression/README b/TAO/tests/Bug_1635_Regression/README
deleted file mode 100644
index 96331bc4cb6..00000000000
--- a/TAO/tests/Bug_1635_Regression/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This test provides regression for Bug 1635:
-"Enhancement - provide date and time stamping to the TAO log file"
-
-The fix allows the setting of a system property that results in a date and time stamp being applied to all ACE log messages.
-
-The client program merely initialises and destroys an ORB - enough activity to prompt the writing of debug messages. The run_test.pl checks the debug output produced for timestamps.
-
diff --git a/TAO/tests/Bug_1635_Regression/client.cpp b/TAO/tests/Bug_1635_Regression/client.cpp
deleted file mode 100644
index 9db84a9a4f5..00000000000
--- a/TAO/tests/Bug_1635_Regression/client.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "tao/ORB.h"
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "SERVER (%P): Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1635_Regression/run_test.pl b/TAO/tests/Bug_1635_Regression/run_test.pl
deleted file mode 100755
index 41231eb00e8..00000000000
--- a/TAO/tests/Bug_1635_Regression/run_test.pl
+++ /dev/null
@@ -1,78 +0,0 @@
-
-# $Id$
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The file we want TAO to write debug messages to
-$debug_file = PerlACE::LocalFile ("debug.log");
-unlink $debug_file;
-
-# The client process - simply initialises an ORB to create some minimal debug
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-$CLIENT->Arguments("-ORBDebugLevel 10 -ORBLogFile $debug_file");
-
-sub run_client
-{
- # Run the client
- if ($CLIENT->SpawnWaitKill (30) != 0)
- {
- print STDERR "ERROR: Bug 1635 Regression failed. Client failed to run.\n";
- $ENV {'TAO_LOG_TIMESTAMP'} = "";
- exit 1;
- }
-
- # Open the log file, read a line, close, and delete it.
- open (HANDLE, "$debug_file");
- $_ = <HANDLE>;
- close HANDLE;
- unlink $debug_file;
-}
-
-# Run the client with no value for the environment variable
-$ENV {'ACE_LOG_TIMESTAMP'} = "";
-run_client;
-
-# Check result is as expected, i.e. starts like:
-# TAO (12...etc.
-if (!/^TAO \(/)
-{
- print STDERR "ERROR: Bug 1635 Regression failed. Unexpected normal log format.\n";
- $ENV {'ACE_LOG_TIMESTAMP'} = "";
- exit 1;
-}
-
-# Try again with the 'TIME' logging property set
-$ENV {'ACE_LOG_TIMESTAMP'} = "TIME";
-run_client;
-
-# Check result is as expected, i.e. starts like:
-# 14:36:38.222000|TAO (12...etc.
-if (!/^\d{2}:\d{2}:\d{2}.\d{6}\|TAO \(/)
-{
- print STDERR "ERROR: Bug 1635 Regression failed. Unexpected 'TIME' log format.\n";
- $ENV {'ACE_LOG_TIMESTAMP'} = "";
- exit 1;
-}
-
-# Try again with the 'DATE' logging property set
-$ENV {'ACE_LOG_TIMESTAMP'} = "DATE";
-run_client;
-
-# Check result is as expected, i.e. starts like:
-# Wed Feb 12 2003 14:36:38.222000|TAO (12...etc.
-if (!/^[A-Z][a-z]{2} [A-Z][a-z]{2} \d{2} \d{4} \d{2}:\d{2}:\d{2}.\d{6}\|TAO \(/)
-{
- print STDERR "ERROR: Bug 1635 Regression failed. Unexpected 'DATE' log format.\n";
- $ENV {'ACE_LOG_TIMESTAMP'} = "";
- exit 1;
-}
-
-$ENV {'ACE_LOG_TIMESTAMP'} = "";
-exit 0;
-
diff --git a/TAO/tests/Bug_1636_Regression/.cvsignore b/TAO/tests/Bug_1636_Regression/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Bug_1636_Regression/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Bug_1636_Regression/README b/TAO/tests/Bug_1636_Regression/README
deleted file mode 100644
index 1a653378856..00000000000
--- a/TAO/tests/Bug_1636_Regression/README
+++ /dev/null
@@ -1,14 +0,0 @@
-An Any is populated with a union whose member is not empty.
-Call dynAny->from_any (Any);
-to put the Any'd union into a DynAny object.
-Call dynAny->to_any () : Any
-to get the Any'd union from a DynAny object.
-
-Repeat the process except this time, use a union whose member is empty,
-ie, _default () has been called on the union.
-
-from_any (Any) succeeded.
-to_any () : Any failed.
-
-to_any () needs to check for an empty union before adding its member
-to a CDR stream. \ No newline at end of file
diff --git a/TAO/tests/Bug_1636_Regression/client.cpp b/TAO/tests/Bug_1636_Regression/client.cpp
deleted file mode 100644
index 51a28417346..00000000000
--- a/TAO/tests/Bug_1636_Regression/client.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// $Id$
-//
-#include "tao/DynamicInterface/Request.h"
-#include "tao/DynamicAny/DynAnyFactory.h"
-#include "testC.h"
-
-int main (int argc, char* argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv,
- "" /* the ORB name, it can be anything! */
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,"Get reference to the DynAny Factory\n"));
- CORBA::Object_var obj =
- orb->resolve_initial_references ("DynAnyFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnyFactory_var daf =
- DynamicAny::DynAnyFactory::_narrow (obj.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- UnionIecs::S_i_num s_num;
- s_num.type_num = UnionIecs::E_type_num_called_party_number;
- s_num.nature = 5;
-
- UnionIecs::S_num num1;
- num1.num(s_num);
- CORBA::Any MyAny1;
- MyAny1 <<= num1;
-
- ACE_DEBUG ((LM_DEBUG,
- "calling from_any () and to_any () with non-empty union...\n"));
- DynamicAny::DynAny_var dynany1 =
- daf->create_dyn_any_from_type_code (UnionIecs::_tc_S_num
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- dynany1->from_any(MyAny1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any_var arg1 =
- dynany1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "...done\n"));
-
- UnionIecs::S_num num2;
- num2._default();
- CORBA::Any MyAny2;
- MyAny2 <<= num2;
-
- ACE_DEBUG ((LM_DEBUG,
- "calling from_any () and to_any () with empty union...\n" ));
- DynamicAny::DynAny_var dynany2 =
- daf-> create_dyn_any_from_type_code (UnionIecs::_tc_S_num
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- dynany2->from_any (MyAny2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var arg2 =
- dynany2->to_any(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,"...done.\nTest passed.\n"));
-
- // Finally destroy the ORB
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception - test failed:\n");
- return 1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN(1);
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1636_Regression/run_test.pl b/TAO/tests/Bug_1636_Regression/run_test.pl
deleted file mode 100755
index 3003b155caa..00000000000
--- a/TAO/tests/Bug_1636_Regression/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that runs the federated Name Service timeout test.
-# It starts all the servers and clients as necessary.
-
-use lib '../../../bin';
-
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$CLIENT = new PerlACE::Process ("client");
-
-$client = $CLIENT->SpawnWaitKill (30);
-
-if ($client !=0 ) {
- print STDERR "ERROR: client returned $client\n";
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_1636_Regression/test.idl b/TAO/tests/Bug_1636_Regression/test.idl
deleted file mode 100644
index bcc36ac8d64..00000000000
--- a/TAO/tests/Bug_1636_Regression/test.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-module UnionIecs
-{
- enum E_type_num
- {
- E_type_num_called_party_number,
- E_type_num_calling_party_number,
- E_type_num_inconnu
- };
-
- typedef octet T_champ_num;
-
- struct S_i_num
- {
- E_type_num type_num;
- T_champ_num nature;
- };
-
- union S_num switch (boolean)
- {
- case TRUE :
- S_i_num num;
- } ;
-};
diff --git a/TAO/tests/Bug_1636_Regression/test.mpc b/TAO/tests/Bug_1636_Regression/test.mpc
deleted file mode 100644
index ab891487d3f..00000000000
--- a/TAO/tests/Bug_1636_Regression/test.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (bug_1636_testclient) : taoclient, dynamicany, dynamicinterface, portableserver, minimum_corba {
- exename = client
-
- IDL_Files {
- test.idl
- }
-
- Source_Files {
- testS.cpp
- testC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1639_Regression/.cvsignore b/TAO/tests/Bug_1639_Regression/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Bug_1639_Regression/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Bug_1639_Regression/run_test.pl b/TAO/tests/Bug_1639_Regression/run_test.pl
deleted file mode 100755
index 7c101f09272..00000000000
--- a/TAO/tests/Bug_1639_Regression/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$status = 0;
-$type = "";
-
-print STDERR "\nDynamic Any struct and union alias tests\n";
-
-$CL = new PerlACE::Process ("client");
-
-$client = $CL->SpawnWaitKill (30);
-
-if ($client != 0)
-{
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_1639_Regression/struct.idl b/TAO/tests/Bug_1639_Regression/struct.idl
deleted file mode 100644
index ab7ae27e229..00000000000
--- a/TAO/tests/Bug_1639_Regression/struct.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-module StructTest {
-
- struct MyStruct {
- octet MyOctet;
- unsigned long MyLong;
- };
-
- typedef MyStruct MyStructAlias;
-
- union MyUnion switch (boolean) {
- case TRUE :
- unsigned short MyShort;
- };
-
- typedef MyUnion MyUnionAlias;
-
-};
diff --git a/TAO/tests/Bug_1639_Regression/struct_client.cpp b/TAO/tests/Bug_1639_Regression/struct_client.cpp
deleted file mode 100644
index fe0cc437893..00000000000
--- a/TAO/tests/Bug_1639_Regression/struct_client.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-//
-// $Id$
-//
-#include "tao/AnyTypeCode/AnyTypeCode_methods.h"
-#include "tao/DynamicAny/DynAnyFactory.h"
-#include "structC.h"
-#include <ace/streams.h>
-
-using namespace StructTest;
-using namespace DynamicAny;
-
-//--------------------------------------------------------------------
-int main (int argc, char * argv[])
-//--------------------------------------------------------------------
-{
-
- // Generic catch handler
- try {
-
- // Initialize the ORB
- // ------------------
- CORBA::ORB_var orb; // _var, so we don't need/may not CORBA::release(orb)
- try {
- orb = CORBA::ORB_init (argc, argv);
- } catch (...) {
- cerr << "Cannot initialize ORB" << endl;
- throw;
- }
-
- // Get reference to the DynAny Factory
- CORBA::Object_var obj = orb->resolve_initial_references("DynAnyFactory");
-
- DynAnyFactory_var daf =
- DynAnyFactory::_narrow(obj.in());
-
- MyStruct my_struct;
- MyStructAlias my_struct_alias;
- MyUnion my_union;
- MyUnionAlias my_union_alias;
-
- CORBA::Any any_struct;
- CORBA::Any any_struct_alias;
- CORBA::Any any_union;
- CORBA::Any any_union_alias;
-
- // Write the structs and unions to anys so we can get the TypeCode info
- any_struct <<= my_struct;
- any_struct_alias <<= my_struct_alias;
- any_union <<= my_union;
- any_union_alias <<= my_union_alias;
-
- // Explicitly set the TypeCode for the aliased types because the any
- // doesn't take care of aliases
- any_struct_alias.type(_tc_MyStructAlias);
- any_union_alias.type(_tc_MyUnionAlias);
-
- CORBA::TypeCode_var tc_struct = any_struct.type();
- CORBA::TypeCode_var tc_struct_alias = any_struct_alias.type();
- CORBA::TypeCode_var tc_union = any_union.type();
- CORBA::TypeCode_var tc_union_alias = any_union_alias.type();
-
- cout << "Type Code of the struct: " << tc_struct->kind() << endl;
- cout << "Type Code of the struct alias: " << tc_struct_alias->kind() << endl;
- cout << "Type Code of the union: " << tc_union->kind() << endl;
- cout << "Type Code of the union alias: " << tc_union_alias->kind() << endl;
-
- // equal returns true only when the TypeCodes are exactly the same.
- if (tc_struct->equal(tc_struct_alias.in())) {
- cout << "Type Codes are identical" << endl;
- } else {
- cout << "Type Codes are different" << endl;
- }
- // equivalent returns true when the TypeCode is an alias
- if (tc_struct->equivalent(tc_struct_alias.in())) {
- cout << "Type Codes are equivalent" << endl;
- } else {
- cout << "Type Codes are not equivalent" << endl;
- }
-
- DynAny_var da_struct = daf->create_dyn_any_from_type_code (tc_struct.in());
-
- try {
- DynAny_var da_struct_alias = daf->create_dyn_any_from_type_code (tc_struct_alias.in());
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any_from_type_code (tc_struct_alias)" << endl;
- }
-
- try {
- DynAny_var da_struct_alias = daf->create_dyn_any (any_struct_alias);
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any (any_struct_alias)" << endl;
- }
-
- DynAny_var da_union = daf->create_dyn_any_from_type_code (tc_union.in());
-
- try {
- DynAny_var da_union_alias = daf->create_dyn_any_from_type_code (tc_union_alias.in());
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any_from_type_code (tc_union_alias)" << endl;
- }
-
- try {
- DynAny_var da_union_alias = daf->create_dyn_any (any_union_alias);
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any (any_union_alias)" << endl;
- }
-
- } // end try
-
- catch (const CORBA::Exception &) {
- cerr << "Caught CORBA exception" << endl;
- return 1;
- }
- catch (...) {
- return 1;
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_1639_Regression/test.mpc b/TAO/tests/Bug_1639_Regression/test.mpc
deleted file mode 100644
index f0d95132c29..00000000000
--- a/TAO/tests/Bug_1639_Regression/test.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (Bug_1639_testclient) : taoserver, dynamicany, exceptions {
- exename = client
- Source_Files {
- struct_client.cpp
- structC.cpp
- structS.cpp
- }
-
- IDL_Files {
- struct.idl
- }
-
-}
diff --git a/TAO/tests/Bug_1670_Regression/.cvsignore b/TAO/tests/Bug_1670_Regression/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Bug_1670_Regression/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc b/TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc
deleted file mode 100644
index 5e8364ab993..00000000000
--- a/TAO/tests/Bug_1670_Regression/Bug_1670_Regression.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, amh {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoserver, amh {
- exename = client
- after += *Server
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1670_Regression/Test.idl b/TAO/tests/Bug_1670_Regression/Test.idl
deleted file mode 100644
index 2b43053cca3..00000000000
--- a/TAO/tests/Bug_1670_Regression/Test.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-module Foo
-{
- module Bar
- {
- interface A
- {
- long op1();
- long op2();
- };
-
- interface B
- {
- long op3();
- };
- };
-};
-
-module Baz
-{
- interface C : Foo::Bar::A, Foo::Bar::B
- {
- long op4();
- };
-};
diff --git a/TAO/tests/Bug_1670_Regression/client.cpp b/TAO/tests/Bug_1670_Regression/client.cpp
deleted file mode 100644
index bf5e3b6385c..00000000000
--- a/TAO/tests/Bug_1670_Regression/client.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * @file client.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "TestC.h"
-
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_1670_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Baz::C_var cobject =
- Baz::C::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (cobject.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot narrow Baz::C object <%s>\n",
- ior),
- 1);
- }
-
- CORBA::Long result;
- result = cobject->op1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT(result == 1);
-
- result = cobject->op2 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT(result == 2);
-
- result = cobject->op3 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT(result == 3);
-
- result = cobject->op4 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT(result == 4);
-
- Foo::Bar::B_var bobject =
- Foo::Bar::B::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (bobject.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot narrow Foo::Bar::B object <%s>\n",
- ior),
- 1);
- }
-
- result = bobject->op3 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT(result == 3);
-
- Foo::Bar::A_var aobject =
- Foo::Bar::A::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (aobject.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot narrow Foo::Bar::A object <%s>\n",
- ior),
- 1);
- }
-
- result = aobject->op1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT(result == 1);
-
- result = aobject->op2 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT(result == 2);
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1670_Regression/run_test.pl b/TAO/tests/Bug_1670_Regression/run_test.pl
deleted file mode 100755
index 052826cdd5c..00000000000
--- a/TAO/tests/Bug_1670_Regression/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1670_Regression/server.cpp b/TAO/tests/Bug_1670_Regression/server.cpp
deleted file mode 100644
index ca6e5d7aebb..00000000000
--- a/TAO/tests/Bug_1670_Regression/server.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * @file server.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "TestS.h"
-
-#include "tao/Utils/Servant_Var.h"
-#include "tao/corba.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Bug_1670_Regression, server, "$Id$")
-
-/**
- * @class Simple_C
- *
- * @brief A simple implementation of the 'C' object.
- *
- */
-class Simple_C
- : public virtual POA_Baz::AMH_C
-{
-public:
- Simple_C (CORBA::ORB_ptr orb);
-
- void op1 (
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void op2 (
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void op3 (
- Foo::Bar::AMH_BResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void op4 (
- Baz::AMH_CResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- CORBA::ORB_ptr orb_;
-};
-
-
-/***************************/
-/*** Servant Definition ***/
-
-Simple_C::Simple_C (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Simple_C::op1(
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op1(1 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Simple_C::op2(
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op2(2 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Simple_C::op3(
- Foo::Bar::AMH_BResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op3(3 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Simple_C::op4(
- Baz::AMH_CResponseHandler_ptr _tao_rh
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- _tao_rh->op4(4 ACE_ENV_ARG_PARAMETER);
-}
-
-// ****************************************************************
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TAO::Utils::Servant_Var<Simple_C> simple_c_impl(
- new Simple_C(orb.in()));
-
- Baz::C_var simple_c =
- simple_c_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (simple_c.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1676_Regression/Bug_1676_Regression.mpc b/TAO/tests/Bug_1676_Regression/Bug_1676_Regression.mpc
deleted file mode 100644
index 9a1892855d9..00000000000
--- a/TAO/tests/Bug_1676_Regression/Bug_1676_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_1676_Regression/Hello.cpp b/TAO/tests/Bug_1676_Regression/Hello.cpp
deleted file mode 100644
index b0afc671195..00000000000
--- a/TAO/tests/Bug_1676_Regression/Hello.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-#if 0
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-#endif
-
-::Test::StringList *
-Hello::get_stringList (
- // ACE_ENV_SINGLE_ARG_DECL_NOT_USED
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- Test::StringList * seq;
- ACE_NEW_RETURN (seq,
- Test::StringList(10),
- 0);
- seq->length(10);
- for (CORBA::ULong i = 0; i<seq->length(); i++)
- {
- char tmp[255] = {0};
- sprintf(tmp, "Hello World %d", i);
- (*seq)[i] = CORBA::string_dup(tmp);
- }
-
- return seq;
-}
-
-void
-Hello::get_stringList2 (
- ::CORBA::Boolean initialize,
- ::Test::StringList_out osl
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- // CORBA::String_var the_string = osl->length();
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Entering get_stringList2(%.4d)\n", osl));
-
- if (initialize) {
- ACE_NEW (osl,
- Test::StringList(10));
-
- osl->length(5);
- for (CORBA::ULong i = 0; i<osl->length(); i++)
- {
- char tmp[255] = {0};
- sprintf(tmp, "Hello Again %d", i);
- (*osl)[i] = CORBA::string_dup(tmp);
- }
- }
-}
-
-void
-Hello::mod_stringList (
- ::Test::StringList & iosl
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- // osl->length(10);
- for (CORBA::ULong i = 0; i<iosl.length(); i++)
- {
- char tmp[255] = {0};
- sprintf(tmp, "Hello Client %d", i);
- if (i%2) {
- iosl[i] = CORBA::string_dup(tmp);
- }
- }
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_1676_Regression/Hello.h b/TAO/tests/Bug_1676_Regression/Hello.h
deleted file mode 100644
index d7bd79aab93..00000000000
--- a/TAO/tests/Bug_1676_Regression/Hello.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual ::Test::StringList * get_stringList (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void get_stringList2 (
- ::CORBA::Boolean initialize,
- ::Test::StringList_out osl
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void mod_stringList (
- ::Test::StringList & iosl
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to convert strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_1676_Regression/Test.idl b/TAO/tests/Bug_1676_Regression/Test.idl
deleted file mode 100644
index 9884187dc0c..00000000000
--- a/TAO/tests/Bug_1676_Regression/Test.idl
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * "test" IDL interface for the Uninitialized "out" param for sequence<string>
- * can cause server to core test.
- *
- * @author Kees van Marle <kvmarle@ermedy.nl>
- */
-//=============================================================================
-
-
-module Test
-{
- typedef sequence<string> StringList;
-
- /// A very simple interface
- interface Hello
- {
- /// Return a string list
- StringList get_stringList ();
-
- /// Return a string list
- void get_stringList2 (in boolean initialize, out StringList osl);
-
- /// Modify a string list
- void mod_stringList (inout StringList iosl);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Bug_1676_Regression/client.cpp b/TAO/tests/Bug_1676_Regression/client.cpp
deleted file mode 100644
index 9687e3ec488..00000000000
--- a/TAO/tests/Bug_1676_Regression/client.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-void get_stringList2(Test::Hello_var hello);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList\n"));
-
- Test::StringList_var seq =
- hello->get_stringList (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (CORBA::ULong i = 0; i<seq->length(); i++) {
- CORBA::String_var the_string = CORBA::string_dup ((*seq)[i]);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList2 with initialization\n"));
-
- Test::StringList_var seq2;
- hello->get_stringList2(true, seq2.out());
- ACE_TRY_CHECK;
-
- for (CORBA::ULong i = 0; i<seq2->length(); i++) {
- CORBA::String_var the_string = seq2.in()[i];
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList2 without initialization\n"));
-
- get_stringList2(hello);
-
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - mod_stringList\n"));
-
- hello->mod_stringList(seq.inout());
- ACE_TRY_CHECK;
-
- for (CORBA::ULong i = 0; i<seq->length(); i++) {
- CORBA::String_var the_string = CORBA::string_dup ((*seq)[i]);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void get_stringList2(Test::Hello_var hello)
-{
- Test::StringList_var seq2;
-
- ACE_TRY_NEW_ENV
- {
- // Shutdown the ORB and block until the shutdown is complete.
- hello->get_stringList2(false, seq2.out());
- ACE_TRY_CHECK;
-
- for (CORBA::ULong i = 0; i<seq2->length(); i++) {
- CORBA::String_var the_string = seq2.in()[i];
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
- }
- ACE_CATCH(CORBA::BAD_PARAM, ex)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - catched expected exception BAD_PARAM\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "get_stringList2");
- }
- ACE_ENDTRY;
-
-
- return;
-}
diff --git a/TAO/tests/Bug_1676_Regression/run_test.pl b/TAO/tests/Bug_1676_Regression/run_test.pl
deleted file mode 100755
index 5d02e3606f1..00000000000
--- a/TAO/tests/Bug_1676_Regression/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_1676_Regression/server.cpp b/TAO/tests/Bug_1676_Regression/server.cpp
deleted file mode 100644
index 177aad4d1d8..00000000000
--- a/TAO/tests/Bug_1676_Regression/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1693_Test/.cvsignore b/TAO/tests/Bug_1693_Test/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Bug_1693_Test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc b/TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc
deleted file mode 100644
index 8c4e0b18f2f..00000000000
--- a/TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Client): taoclient, codecfactory {
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_1693_Test/client.cpp b/TAO/tests/Bug_1693_Test/client.cpp
deleted file mode 100644
index d95a5916742..00000000000
--- a/TAO/tests/Bug_1693_Test/client.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-// -*- C++ -*-
-
-#include "tao/CodecFactory/CodecFactory.h"
-#include "testC.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Codec,
- client,
- "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- "my_orb"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain a reference to the CodecFactory.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("CodecFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IOP::CodecFactory_var codec_factory =
- IOP::CodecFactory::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ----------------------------------------------------------
-
- // Set up a structure that contains information necessary to
- // create a GIOP 1.1 CDR encapsulation Codec.
- IOP::Encoding encoding;
- encoding.format = IOP::ENCODING_CDR_ENCAPS;
- encoding.major_version = 1;
- encoding.minor_version = 1;
-
- // Obtain the CDR encapsulation Codec.
- IOP::Codec_var codec =
- codec_factory->create_codec (encoding
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ----------------------------------------------------------
- {
- CORBA::OctetSeq_var encoded_data;
- CORBA::Any_var decoded_data;
-
- Foo::type_ulong l = 9192631;
-
- CORBA::Any tmp;
-
- tmp <<= l;
-
- encoded_data =
- codec->encode_value (tmp
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- decoded_data =
- codec->decode_value (encoded_data.in (),
- Foo::_tc_type_ulong
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Foo::type_ulong check = 0;
-
- if (!(decoded_data >>= check))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Unable to extract typedefed decoded "
- "data from Any\n"),
- -1);
-
- if (check != l)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Extracted value not equal "
- "to the encoded value \n"),
- -1);
-
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Test passed \n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Bug_1693_Test test:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_1693_Test/run_test.pl b/TAO/tests/Bug_1693_Test/run_test.pl
deleted file mode 100755
index fc38be4d944..00000000000
--- a/TAO/tests/Bug_1693_Test/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-# $Id$
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-print STDERR "\n\n==== Running Bug_1693_Test test\n";
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("client");
-}
-else {
- $T = new PerlACE::Process ("client");
-}
-
-$test = $T->SpawnWaitKill (15);
-
-if ($test != 0) {
- print STDERR "ERROR: Bug 1693 test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Bug_1693_Test/test.idl b/TAO/tests/Bug_1693_Test/test.idl
deleted file mode 100644
index 5bc80d66988..00000000000
--- a/TAO/tests/Bug_1693_Test/test.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * "test" IDL interface for the Codec test.
- *
- * @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-module Foo
-{
- typedef unsigned long type_ulong;
-};
diff --git a/TAO/tests/Bug_1812_Regression/Bug_1812_Regession.mpc b/TAO/tests/Bug_1812_Regression/Bug_1812_Regession.mpc
deleted file mode 100755
index 679a47c31c8..00000000000
--- a/TAO/tests/Bug_1812_Regression/Bug_1812_Regession.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoserver {
-
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_1812_Regression/Test.idl b/TAO/tests/Bug_1812_Regression/Test.idl
deleted file mode 100755
index 176f713989b..00000000000
--- a/TAO/tests/Bug_1812_Regression/Test.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-#include <orb.idl>
-
-local interface foo {
- void op (in CORBA::ValueFactory vf);
-};
diff --git a/TAO/tests/Bug_1812_Regression/test.cpp b/TAO/tests/Bug_1812_Regression/test.cpp
deleted file mode 100755
index d3b463ab1f1..00000000000
--- a/TAO/tests/Bug_1812_Regression/test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-
-#include "TestS.h"
-
-/**
-* This test does not run - successful compile and link == successful test.
-*/
-int
-main (int, char *[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_1813_Regression/Bug_1813_Regession.mpc b/TAO/tests/Bug_1813_Regression/Bug_1813_Regession.mpc
deleted file mode 100755
index 679a47c31c8..00000000000
--- a/TAO/tests/Bug_1813_Regression/Bug_1813_Regession.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoserver {
-
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_1813_Regression/Test.idl b/TAO/tests/Bug_1813_Regression/Test.idl
deleted file mode 100755
index 2b47d41dd97..00000000000
--- a/TAO/tests/Bug_1813_Regression/Test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include <orb.idl>
-
-interface foo {
- void op () raises (CORBA::WrongTransaction);
-};
-
diff --git a/TAO/tests/Bug_1813_Regression/test.cpp b/TAO/tests/Bug_1813_Regression/test.cpp
deleted file mode 100755
index d3b463ab1f1..00000000000
--- a/TAO/tests/Bug_1813_Regression/test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-
-#include "TestS.h"
-
-/**
-* This test does not run - successful compile and link == successful test.
-*/
-int
-main (int, char *[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_1869_Regression/AMI.idl b/TAO/tests/Bug_1869_Regression/AMI.idl
deleted file mode 100644
index d0c2a9eb238..00000000000
--- a/TAO/tests/Bug_1869_Regression/AMI.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-module AMI_test {
- interface adder {
- long add(in long a, in long b);
- };
-};
diff --git a/TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc b/TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc
deleted file mode 100644
index 15f79878b23..00000000000
--- a/TAO/tests/Bug_1869_Regression/Bug_1869_Regression.mpc
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable, ami, exceptions {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, ami, exceptions {
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_1869_Regression/client.cpp b/TAO/tests/Bug_1869_Regression/client.cpp
deleted file mode 100644
index b34fc2fa70c..00000000000
--- a/TAO/tests/Bug_1869_Regression/client.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-#include "AMIS.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
-
-class AdderCallback
- : public POA_AMI_test::AMI_adderHandler,
- public ACE_Task_Base {
-
- public:
- AdderCallback(CORBA::ORB_ptr orb)
- : orb(CORBA::ORB::_duplicate(orb)) {
- activate();
- }
-
- virtual void add (
- CORBA::Long ami_return_val
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
- {
- ACE_DEBUG ((LM_DEBUG, "Return value: %d\n", ami_return_val));
- }
-
- virtual void add_excep (
- ::Messaging::ExceptionHolder *
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
- {
- ACE_DEBUG ((LM_DEBUG, "Caught exception in _excep\n"));
- }
-
- virtual int svc() {
- orb->run();
-
- return 0;
- }
-
- CORBA::ORB_var orb;
-
-};
-
-int main (int argc, char* argv[]) {
-
- try {
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- // Get reference to Root POA
- CORBA::Object_var obj
- = orb->resolve_initial_references ("RootPOA");
-
- PortableServer::POA_var rootPOA = PortableServer::POA::_narrow (obj.in ());
-
- // Activate POA manager
- PortableServer::POAManager_var mgr
- = rootPOA->the_POAManager ();
-
- mgr->activate();
-
- // Resolve Adder Reference
- obj = orb->string_to_object("corbaloc:iiop:127.0.0.1:4711/Adder");
- AMI_test::adder_var adder = AMI_test::adder::_narrow(obj.in ());
-
- AdderCallback cb_servant(orb.in ());
-
- while(true) {
- try
- {
- adder->sendc_add(cb_servant._this(), 3, 2);
- }
- catch(...)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught exception after sendc_add\n"));
- }
- ACE_OS::sleep (1);
- }
- }
- catch(...)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught exception in main\n"));
- return 1;
- }
-
- return 0;
-}
-
-
-
diff --git a/TAO/tests/Bug_1869_Regression/run_test.pl b/TAO/tests/Bug_1869_Regression/run_test.pl
deleted file mode 100644
index 2a6eb183455..00000000000
--- a/TAO/tests/Bug_1869_Regression/run_test.pl
+++ /dev/null
@@ -1,40 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint iiop://127.0.0.1:4711");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://127.0.0.1:4711");
-}
-$CL = new PerlACE::Process ("client", "");
-
-$SV->Spawn ();
-
-$client = $CL->Spawn (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-sleep (5);
-
-print STDERR "Kill server\n";
-$server = $SV->Kill ();
-
-sleep (5);
-
-print STDERR "Restart server\n";
-$SV->Spawn ();
-
-sleep (30);
-
-exit $status;
diff --git a/TAO/tests/Bug_1869_Regression/server.cpp b/TAO/tests/Bug_1869_Regression/server.cpp
deleted file mode 100644
index 6b741d07984..00000000000
--- a/TAO/tests/Bug_1869_Regression/server.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-
-#include "AMIS.h"
-#include "tao/IORTable/IORTable.h"
-
-class AdderServant :
- public POA_AMI_test::adder {
-
-public:
- AdderServant (void) {}
-
- virtual ~AdderServant (void) {}
-
- virtual
- CORBA::Long add (
- CORBA::Long a,
- CORBA::Long b
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- )) {
- return a + b;
- }
-};
-
-
-int main (int argc, char* argv[]) {
-
- try {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- // Get reference to Root POA
- CORBA::Object_var obj
- = orb->resolve_initial_references ("RootPOA");
-
- PortableServer::POA_var rootPOA = PortableServer::POA::_narrow (obj.in ());
-
- // Activate POA manager
- PortableServer::POAManager_var mgr
- = rootPOA->the_POAManager ();
-
- mgr->activate();
-
- // Create Persistent Lifespan Policy and User Id Policy
- PortableServer::LifespanPolicy_var lifespan =
- rootPOA->create_lifespan_policy(PortableServer::PERSISTENT);
- PortableServer::IdAssignmentPolicy_var idassignment =
- rootPOA->create_id_assignment_policy(PortableServer::USER_ID);
-
- // Stuff them into a policy list
- CORBA::PolicyList policies(2);
- policies.length(2);
- policies[0] = PortableServer::IdAssignmentPolicy::_duplicate(idassignment.in());
- policies[1] = PortableServer::LifespanPolicy::_duplicate(lifespan.in());
-
- // Create the Child POA
- PortableServer::POA_var persistentPOA =
- rootPOA->create_POA("persistentPOA", mgr.in(), policies);
-
- // Policies are no longer needed
- idassignment->destroy();
- lifespan->destroy();
-
- AdderServant servant;
-
- // Create an id
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId("Adder");
-
- // Activate the object (with id)
- persistentPOA->activate_object_with_id(oid.in(), & servant);
-
- CORBA::Object_var ref = persistentPOA->id_to_reference(oid.in());
- CORBA::String_var iors = orb->object_to_string(ref.in());
-
- CORBA::Object_var tobj = orb->resolve_initial_references("IORTable");
- IORTable::Table_var table = IORTable::Table::_narrow(tobj.in());
- table->bind("Adder", iors.in ());
-
- orb->run();
- } catch (...) {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught exception in server"));
- return 1;
- }
- return 0;
-}
-
diff --git a/TAO/tests/Bug_1904_Regression/.cvsignore b/TAO/tests/Bug_1904_Regression/.cvsignore
deleted file mode 100644
index 9daeafb9864..00000000000
--- a/TAO/tests/Bug_1904_Regression/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-test
diff --git a/TAO/tests/Bug_1904_Regression/test.cpp b/TAO/tests/Bug_1904_Regression/test.cpp
deleted file mode 100644
index 43e2c70132e..00000000000
--- a/TAO/tests/Bug_1904_Regression/test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-#include "testS.h"
-
-class con_i : public virtual POA_con
-{
-};
-
-int
-main (int , char *[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_1904_Regression/test.idl b/TAO/tests/Bug_1904_Regression/test.idl
deleted file mode 100644
index 766591f6d84..00000000000
--- a/TAO/tests/Bug_1904_Regression/test.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-interface con
-{
-};
-
diff --git a/TAO/tests/Bug_1904_Regression/test.mpc b/TAO/tests/Bug_1904_Regression/test.mpc
deleted file mode 100644
index 083ecf74e56..00000000000
--- a/TAO/tests/Bug_1904_Regression/test.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project : taoserver {
- exename = test
- Source_Files {
- test.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc b/TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc
deleted file mode 100644
index b4263adaa64..00000000000
--- a/TAO/tests/Bug_2084_Regression/Bug_2084_Regression.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- exename = server
-}
diff --git a/TAO/tests/Bug_2084_Regression/Client_Task.cpp b/TAO/tests/Bug_2084_Regression/Client_Task.cpp
deleted file mode 100644
index 1bf4dbf8ace..00000000000
--- a/TAO/tests/Bug_2084_Regression/Client_Task.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "TestC.h"
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/PortableServer/PortableServer.h"
-
-ACE_RCSID(Bug_2084_Regression,
- Client_Task,
- "$Id$")
-
-Client_Task::Client_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->corb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl = 0;
- ACE_NEW_RETURN (hello_impl,
- Hello (this->corb_.in (),
- ACE_Thread::self ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello_servant = hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_DEBUG((LM_DEBUG,"Client (%t) optimize_collocation_objects=%d use_global_collocation=%d\n",
- corb_->orb_core()->optimize_collocation_objects(),
- corb_->orb_core()->use_global_collocation ()));
-
- CORBA::Object_var tmp =
- this->corb_->string_to_object (input_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::EventNode_var evNode=
- Test::EventNode::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (evNode.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::EventNode reference <%s>\n",
- input_),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Client starting\n"));
-
- evNode->registerHello( hello_servant.in() ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
-
- evNode->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
diff --git a/TAO/tests/Bug_2084_Regression/Client_Task.h b/TAO/tests/Bug_2084_Regression/Client_Task.h
deleted file mode 100644
index 98ea06eca46..00000000000
--- a/TAO/tests/Bug_2084_Regression/Client_Task.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $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 char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Bug_2084_Regression/Collocated_Test.cpp b/TAO/tests/Bug_2084_Regression/Collocated_Test.cpp
deleted file mode 100644
index a16745c918a..00000000000
--- a/TAO/tests/Bug_2084_Regression/Collocated_Test.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-//$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"
-#include <ace/ARGV.h>
-#include <iostream>
-
-const char *output = "test.ior";
-const char *input = "file://test.ior";
-// static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "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 sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
-
- // Keep a copy of the ORB options args
- ACE_ARGV orb_args;
- for (int i = 1; i < argc; ++i)
- {
- if (orb_args.add (argv[i]) == -1)
- return -1;
- }
-
- 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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ();
-
- // This eats all orb-specific options!
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (server_orb != client_orb)
- {
- corb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Bug_2084_Regression/EventNode.cpp b/TAO/tests/Bug_2084_Regression/EventNode.cpp
deleted file mode 100644
index 3ce3f1bf30e..00000000000
--- a/TAO/tests/Bug_2084_Regression/EventNode.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-// $Id$
-//
-#include "EventNode.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(EventNode, EventNode, "$Id$")
-
-EventNode::EventNode (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
-{
-}
-
-void EventNode::registerHello ( ::Test::Hello_ptr h ACE_ENV_ARG_DECL )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) EventNode: registerHello will call get_string...\n"));
-
- if (ACE_Thread::self () == this->thr_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 ();
-
- if (orb_table->find ("server_orb") == 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 ();
- }
- }
- }
-
- CORBA::String_var str = h->get_string( (::CORBA::Long) ACE_Thread::self() );
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - EventNode: string returned <%s>\n", str.in ()));
-}
-
-void
-EventNode::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2084_Regression/EventNode.h b/TAO/tests/Bug_2084_Regression/EventNode.h
deleted file mode 100644
index e2209a632ac..00000000000
--- a/TAO/tests/Bug_2084_Regression/EventNode.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef EVENT_NODE_H
-#define EVENT_NODE_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS.h"
-
-/// Implement the Test::EventNode interface
-class EventNode
- : public virtual POA_Test::EventNode
-{
-public:
- /// Constructor
- EventNode (CORBA::ORB_ptr orb,
- ACE_thread_t thr_id);
-
- // = The skeleton methods
- virtual void registerHello ( ::Test::Hello_ptr h ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (( CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-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/TAO/tests/Bug_2084_Regression/Hello.cpp b/TAO/tests/Bug_2084_Regression/Hello.cpp
deleted file mode 100644
index e19ff455c09..00000000000
--- a/TAO/tests/Bug_2084_Regression/Hello.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
- Hello::Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
-{
-}
-
-char *
-Hello::get_string (::CORBA::Long caller_threadid ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Upcall in process ..\n"));
-
- // Use portable thread IDs
- ACE_Thread_ID this_ID;
- this_ID.id(this->thr_id_);
-
- if ((::CORBA::Long)ACE_Thread::self () != caller_threadid) // this means a remote call was made
- {
- 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 ();
-
- if (orb_table->find ("server_orb") == 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 (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // 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 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2084_Regression/Hello.h b/TAO/tests/Bug_2084_Regression/Hello.h
deleted file mode 100644
index 30e9552d68c..00000000000
--- a/TAO/tests/Bug_2084_Regression/Hello.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS.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 ( ::CORBA::Long caller_threadid ACE_ENV_ARG_DECL )
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-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/TAO/tests/Bug_2084_Regression/Server_Task.cpp b/TAO/tests/Bug_2084_Regression/Server_Task.cpp
deleted file mode 100644
index b5e9fb0ffce..00000000000
--- a/TAO/tests/Bug_2084_Regression/Server_Task.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TestS.h"
-#include "EventNode.h"
-
-#include "ace/Manual_Event.h"
-#include "tao/ORB_Core.h"
-
-ACE_RCSID(Collocated_Test,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- EventNode *evnode_impl = new EventNode(this->sorb_.in(),ACE_Thread::self());
- PortableServer::ServantBase_var owner_transfer(evnode_impl);
- Test::EventNode_var evNode = evnode_impl->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_DEBUG((LM_DEBUG,"Server (%t) optimize_collocation_objects=%d use_global_collocation=%d\n",
- sorb_->orb_core()->optimize_collocation_objects(),
- sorb_->orb_core()->use_global_collocation ()));
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (evNode.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
- {
- // Periodically we get a bad inv order on fast machines.
- // It's a false negative and is safe to ignore.
- ACE_UNUSED_ARG (ex);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2084_Regression/Server_Task.h b/TAO/tests/Bug_2084_Regression/Server_Task.h
deleted file mode 100644
index 60006aae0ba..00000000000
--- a/TAO/tests/Bug_2084_Regression/Server_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- 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 char *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 char *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/TAO/tests/Bug_2084_Regression/Test.idl b/TAO/tests/Bug_2084_Regression/Test.idl
deleted file mode 100644
index 37a1ca19b7d..00000000000
--- a/TAO/tests/Bug_2084_Regression/Test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $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 ( in long caller_threadid );
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-
- /// The server side
- interface EventNode
- {
- void registerHello( in Hello h );
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Bug_2084_Regression/run_test.pl b/TAO/tests/Bug_2084_Regression/run_test.pl
deleted file mode 100755
index df9a75e42d4..00000000000
--- a/TAO/tests/Bug_2084_Regression/run_test.pl
+++ /dev/null
@@ -1,82 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with per-orb \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with no collocation \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation no");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in default mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n ");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in per-orb mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in no collocation mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (30);
-
-if ($sv != 0) {
- print STDERR "ERROR in server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2119_Regression/README b/TAO/tests/Bug_2119_Regression/README
deleted file mode 100644
index ce1609a67e5..00000000000
--- a/TAO/tests/Bug_2119_Regression/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This test checks that the code generated from IDL defining a valuetype with a private anonymous sequence type field can be compiled.
-
-See the ticket for details. If it builds it's worked. \ No newline at end of file
diff --git a/TAO/tests/Bug_2119_Regression/test.idl b/TAO/tests/Bug_2119_Regression/test.idl
deleted file mode 100644
index 0f3d04271d9..00000000000
--- a/TAO/tests/Bug_2119_Regression/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-valuetype MyValueType
-{
- private sequence<MyValueType> myValueTypes;
-};
-
-
-
diff --git a/TAO/tests/Bug_2119_Regression/test.mpc b/TAO/tests/Bug_2119_Regression/test.mpc
deleted file mode 100644
index 71c143f42b5..00000000000
--- a/TAO/tests/Bug_2119_Regression/test.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (tao67_test) : taolib_with_idl, valuetype, portableserver {
-}
-
diff --git a/TAO/tests/Bug_2122_Regression/Bug_2122_Regression.mpc b/TAO/tests/Bug_2122_Regression/Bug_2122_Regression.mpc
deleted file mode 100644
index 57cfbd6f965..00000000000
--- a/TAO/tests/Bug_2122_Regression/Bug_2122_Regression.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoclient {
- Source_Files {
- TestC.cpp
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2122_Regression/README b/TAO/tests/Bug_2122_Regression/README
deleted file mode 100644
index 56594891fda..00000000000
--- a/TAO/tests/Bug_2122_Regression/README
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-There is nothing to run for this test. It passes if the generated code
-compiles.
-
-See the bugzilla ticket for info.
diff --git a/TAO/tests/Bug_2122_Regression/Test.idl b/TAO/tests/Bug_2122_Regression/Test.idl
deleted file mode 100644
index af059074266..00000000000
--- a/TAO/tests/Bug_2122_Regression/Test.idl
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- */
-
-module Test
-{
- typedef string<10> MyStringType;
- typedef string<10> MyOtherStringType; // Note: SAME LENGTH
-
- interface Foo
- {
- void op1( in MyStringType s );
- void op2( in MyOtherStringType s );
- };
-};
-
-module Foo
-{
- module One
- {
- typedef string<40> MyString;
-
- interface Whatever
- {
- void someOp( in MyString s );
- };
- };
-
- module Two
- {
- typedef string<100> MyString; // Same name, different size!
-
- interface WhoCares
- {
- void someOp( in MyString s );
- };
- };
-
- module Three
- {
- typedef string<100> MyString; // Same name, same size!
-
- interface WhoCares
- {
- void someOp( in MyString s );
- };
- };
-};
diff --git a/TAO/tests/Bug_2122_Regression/test.cpp b/TAO/tests/Bug_2122_Regression/test.cpp
deleted file mode 100644
index 6002cf0c9e9..00000000000
--- a/TAO/tests/Bug_2122_Regression/test.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * @file test.cpp
- *
- * $Id$
- */
-
-#include "TestC.h"
-
-int main( int argc, char* argv[] )
-{
- ACE_UNUSED_ARG( argc ) ;
- ACE_UNUSED_ARG( argv ) ;
-
- return 0 ;
-}
diff --git a/TAO/tests/Bug_2124_Regression/Bug_2124_Regression.mpc b/TAO/tests/Bug_2124_Regression/Bug_2124_Regression.mpc
deleted file mode 100644
index fa752d627cf..00000000000
--- a/TAO/tests/Bug_2124_Regression/Bug_2124_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoserver {
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2124_Regression/README b/TAO/tests/Bug_2124_Regression/README
deleted file mode 100644
index 56594891fda..00000000000
--- a/TAO/tests/Bug_2124_Regression/README
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-There is nothing to run for this test. It passes if the generated code
-compiles.
-
-See the bugzilla ticket for info.
diff --git a/TAO/tests/Bug_2124_Regression/Test.idl b/TAO/tests/Bug_2124_Regression/Test.idl
deleted file mode 100644
index 641ad61bb7b..00000000000
--- a/TAO/tests/Bug_2124_Regression/Test.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- */
-
-module Test
-{
- typedef string<10> MyString;
- typedef MyString OtherString;
-
- interface Foo
- {
- void op1( in MyString s );
- void op2( in OtherString s );
- };
-};
-
diff --git a/TAO/tests/Bug_2124_Regression/test.cpp b/TAO/tests/Bug_2124_Regression/test.cpp
deleted file mode 100644
index 6002cf0c9e9..00000000000
--- a/TAO/tests/Bug_2124_Regression/test.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * @file test.cpp
- *
- * $Id$
- */
-
-#include "TestC.h"
-
-int main( int argc, char* argv[] )
-{
- ACE_UNUSED_ARG( argc ) ;
- ACE_UNUSED_ARG( argv ) ;
-
- return 0 ;
-}
diff --git a/TAO/tests/Bug_2126_Regression/Bug_2126_Regression.mpc b/TAO/tests/Bug_2126_Regression/Bug_2126_Regression.mpc
deleted file mode 100644
index c0a8257f23e..00000000000
--- a/TAO/tests/Bug_2126_Regression/Bug_2126_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoclient {
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2126_Regression/README b/TAO/tests/Bug_2126_Regression/README
deleted file mode 100644
index 56594891fda..00000000000
--- a/TAO/tests/Bug_2126_Regression/README
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-There is nothing to run for this test. It passes if the generated code
-compiles.
-
-See the bugzilla ticket for info.
diff --git a/TAO/tests/Bug_2126_Regression/Test.idl b/TAO/tests/Bug_2126_Regression/Test.idl
deleted file mode 100644
index 199c7fd2c3b..00000000000
--- a/TAO/tests/Bug_2126_Regression/Test.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- */
-
-union FirstUnion switch (boolean) {
- case TRUE :
- long first_union_foo;
- case FALSE :
- long first_union_bar;
-};
-
-typedef FirstUnion FirstUnionArray[2];
-
-struct MyStruct {
- FirstUnionArray my_struct_foo;
-};
-
-union SecondUnion switch (boolean) {
- case TRUE :
- MyStruct second_union_struct_member;
- case FALSE :
- long wibble;
-};
diff --git a/TAO/tests/Bug_2126_Regression/test.cpp b/TAO/tests/Bug_2126_Regression/test.cpp
deleted file mode 100644
index 6002cf0c9e9..00000000000
--- a/TAO/tests/Bug_2126_Regression/test.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * @file test.cpp
- *
- * $Id$
- */
-
-#include "TestC.h"
-
-int main( int argc, char* argv[] )
-{
- ACE_UNUSED_ARG( argc ) ;
- ACE_UNUSED_ARG( argv ) ;
-
- return 0 ;
-}
diff --git a/TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc b/TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc
deleted file mode 100644
index 2a3a953d97a..00000000000
--- a/TAO/tests/Bug_2134_Regression/Bug_2134_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoserver, iortable, minimum_corba {
- Source_Files {
- Hello.cpp
- }
-}
diff --git a/TAO/tests/Bug_2134_Regression/Hello.cpp b/TAO/tests/Bug_2134_Regression/Hello.cpp
deleted file mode 100644
index 53eb63216e5..00000000000
--- a/TAO/tests/Bug_2134_Regression/Hello.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id$
-
-#include "tao/corba.h"
-#include "tao/IORTable/IORTable.h"
-#include "ace/OS_NS_string.h"
-#include "ace/SString.h"
-
-#include "HelloS.h"
-
-namespace Test
-{
-class Hello_impl: virtual public POA_Test::Hello
-{
-public:
- void say_hello() ACE_THROW_SPEC ((CORBA::SystemException)) { };
-
-};
-}
-
-int main(int argc, char* argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB::_nil();
-
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB
- orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // create Hello object
- Test::Hello_impl hello_i;
- ACE_TRY_CHECK;
-
- Test::Hello_var hello = hello_i._this ();
- ACE_TRY_CHECK;
-
- // give our object a friendly name
- CORBA::Object_var iorTableObj =
- orb->resolve_initial_references ("IORTable");
- ACE_TRY_CHECK;
-
- IORTable::Table_var iorTable
- = IORTable::Table::_narrow (iorTableObj.in ());
- ACE_TRY_CHECK;
-
- CORBA::String_var ior_string = orb->object_to_string (hello.in ());
- ACE_TRY_CHECK;
-
- iorTable->bind("hello", ior_string.in ());
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Created binding of name 'hello' in IOR table for IOR:\n%s\n", ior_string.in ()));
-
- // Get the root POA
- CORBA::Object_var obj_root = orb->resolve_initial_references ("RootPOA");
- ACE_TRY_CHECK;
-
- PortableServer::POA_var rootPOA = PortableServer::POA::_narrow (obj_root.in ());
- ACE_TRY_CHECK;
-
- // Activate the POA manager
- PortableServer::POAManager_var poaManager = rootPOA->the_POAManager ();
- ACE_TRY_CHECK;
-
- poaManager->activate ();
- ACE_TRY_CHECK;
-
- // try and access the object with its friendly name
- ACE_CString full_corbaloc (ior_string.in (), 0, 1);
-
- CORBA::ULong first_slash = full_corbaloc.find ("/", 0);
-
- ACE_CString friendly_corbaloc =
- full_corbaloc.substring (0,
- first_slash);
-
- friendly_corbaloc += "/hello";
-
- ACE_DEBUG ((LM_DEBUG, "Trying to access object with object ref:\n%s\n", friendly_corbaloc.c_str ()));
-
- CORBA::Object_var obj = orb->string_to_object (friendly_corbaloc.c_str ());
- ACE_TRY_CHECK;
-
- Test::Hello_var hello2 = Test::Hello::_narrow (obj.in ());
- ACE_TRY_CHECK;
-
- hello2->say_hello ();
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test succeeded !!!\n"));
-
- orb->destroy();
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Error - test failed - exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2134_Regression/Hello.idl b/TAO/tests/Bug_2134_Regression/Hello.idl
deleted file mode 100644
index 44f72bfbfbe..00000000000
--- a/TAO/tests/Bug_2134_Regression/Hello.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-module Test {
- interface Hello {
- void say_hello();
- };
-};
diff --git a/TAO/tests/Bug_2134_Regression/README b/TAO/tests/Bug_2134_Regression/README
deleted file mode 100644
index e8164d894ef..00000000000
--- a/TAO/tests/Bug_2134_Regression/README
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
-This test checks that a collocated object ref bound into the local IOR table can be used.
-
-
diff --git a/TAO/tests/Bug_2134_Regression/run_test.pl b/TAO/tests/Bug_2134_Regression/run_test.pl
deleted file mode 100755
index a5aca85b1b0..00000000000
--- a/TAO/tests/Bug_2134_Regression/run_test.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$CL = new PerlACE::Process ("server", "-ORBObjRefStyle URL");
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2144_Regression/Bug_2144_Regression.mpc b/TAO/tests/Bug_2144_Regression/Bug_2144_Regression.mpc
deleted file mode 100755
index 3fcbdd9dee2..00000000000
--- a/TAO/tests/Bug_2144_Regression/Bug_2144_Regression.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Client) : taoclient, valuetype {
- exename = test
- Source_Files {
- testC.cpp
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2144_Regression/README b/TAO/tests/Bug_2144_Regression/README
deleted file mode 100755
index 78e177a24c7..00000000000
--- a/TAO/tests/Bug_2144_Regression/README
+++ /dev/null
@@ -1,4 +0,0 @@
-// $Id$
-
-There is nothing to run for this test. It passes if the generated code
-compiles. See bugzilla #2144.
diff --git a/TAO/tests/Bug_2144_Regression/test.cpp b/TAO/tests/Bug_2144_Regression/test.cpp
deleted file mode 100755
index c7b795b0d04..00000000000
--- a/TAO/tests/Bug_2144_Regression/test.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-int main (int argc, char* argv[])
-{
- ACE_UNUSED_ARG (argc);
- ACE_UNUSED_ARG (argv);
- return 0;
-}
diff --git a/TAO/tests/Bug_2144_Regression/test.idl b/TAO/tests/Bug_2144_Regression/test.idl
deleted file mode 100755
index 28335e7e932..00000000000
--- a/TAO/tests/Bug_2144_Regression/test.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// $Id$
-//
-module Test
-{
- enum Selector { STRUCTTYPE, VALTYPE };
-
- struct Foo { long l; } ;
-
- valuetype Bar { public short s; } ;
-
- union MyUnion switch (Selector)
- {
- case STRUCTTYPE: Foo fooData;
- case VALTYPE: Bar barData;
- };
-};
diff --git a/TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc b/TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc
deleted file mode 100644
index c01584c3559..00000000000
--- a/TAO/tests/Bug_2174_Regression/Bug_2174_Regression.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2174_Regression/README b/TAO/tests/Bug_2174_Regression/README
deleted file mode 100644
index 53ae592673c..00000000000
--- a/TAO/tests/Bug_2174_Regression/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This test contains regression tests for fixes to bug #2174
-"Object::_non_existent never returns true, but raises OBJECT_NOT_EXIST"
-See the bugzilla record for details.
diff --git a/TAO/tests/Bug_2174_Regression/client.cpp b/TAO/tests/Bug_2174_Regression/client.cpp
deleted file mode 100644
index dc0b7923d30..00000000000
--- a/TAO/tests/Bug_2174_Regression/client.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Bug_2174_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int min_timeout = 0;
-int max_timeout = 20;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:l:h:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int result = 1;
-// 1 : fault in test
-// 2 : _non_existent() returned false
-// 3 : _non_existent() returned true
-// 4 : CORBA::OBJECT_NOT_EXIST exception
-// 5 : CORBA::TRANSIENT exception
-
-int main (int argc, char* argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- CORBA::Boolean non_existent = server->_non_existent ();
- ACE_TRY_CHECK;
-
- if (non_existent)
- result = 3;
- else
- result = 2;
-
- ACE_DEBUG ((LM_DEBUG,
- "client (%P) _non_existent() returned %d\n",
- static_cast<int>(non_existent) ));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "ERROR: Exception caught:");
- result = 4;
- }
- ACE_CATCH (CORBA::TRANSIENT, ex)
- {
- result = 5;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "ERROR: Exception caught:");
- result = 6;
- }
- ACE_ENDTRY;
- return result;
-}
diff --git a/TAO/tests/Bug_2174_Regression/run_test.pl b/TAO/tests/Bug_2174_Regression/run_test.pl
deleted file mode 100755
index 02366a5ebb4..00000000000
--- a/TAO/tests/Bug_2174_Regression/run_test.pl
+++ /dev/null
@@ -1,81 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-# Test A: object exists (_non_existent() returns false)
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (10);
-$SV->Kill ();
-unlink $iorfile;
-if ($client != 2) {
- print STDERR "ERROR: client returned $client in test A, expected 2\n";
- # (see comment about result value in client.cpp)
- exit 1;
-}
-
-# Test B: object does not exist (_non_existent() returns true)
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -r");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -r");
-}
-
-$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (10);
-$SV->Kill ();
-if ($client != 3) {
- print STDERR "ERROR: client returned $client in test B, expected 3\n";
- # (see comment about result value in client.cpp)
- unlink $iorfile;
- exit 1;
-}
-
-# Test C: server does not run (_non_existent() throws TRANSIENT)
-
-$client = $CL->SpawnWaitKill (10);
-unlink $iorfile;
-if ($client != 5) {
- print STDERR "ERROR: client returned $client in test C, expected 5\n";
- # (see comment about result value in client.cpp)
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Bug_2174_Regression/server.cpp b/TAO/tests/Bug_2174_Regression/server.cpp
deleted file mode 100644
index bc39027c4ac..00000000000
--- a/TAO/tests/Bug_2174_Regression/server.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Bug_2174_Regression, server, "$Id$")
-
-const char *ior_output_file = 0;
-bool remove_object = false;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:r");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'r':
- remove_object = true;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (remove_object)
- {
- PortableServer::ObjectId_var oid = root_poa->reference_to_id(server.in());
- root_poa->deactivate_object(oid.in());
- ACE_DEBUG ((LM_DEBUG,
- "server (%P) deactivated object immediately\n"
- ));
- }
- ACE_TRY_CHECK;
-
-
- // ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Bug_2174_Regression/test.idl b/TAO/tests/Bug_2174_Regression/test.idl
deleted file mode 100644
index 946bd383938..00000000000
--- a/TAO/tests/Bug_2174_Regression/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server {
-
- // Returns <x>, but sleep for <msecs> milliseconds before returning
- long echo (in long x, in long msecs);
-
- // Shutdown the ORB
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2174_Regression/test_i.cpp b/TAO/tests/Bug_2174_Regression/test_i.cpp
deleted file mode 100644
index 9f1bd8537bc..00000000000
--- a/TAO/tests/Bug_2174_Regression/test_i.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Timeout, test_i, "$Id$")
-
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-
-}
-
-CORBA::Long
-Simple_Server_i::echo (CORBA::Long x,
- CORBA::Long msecs
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_Time_Value tv (msecs / 1000, (msecs % 1000) * 1000);
-
- // ACE_DEBUG ((LM_DEBUG, "server (%P) Sleeping for %d msecs\n",
- // tv.msec ()));
- ACE_OS::sleep (tv);
-
- return x;
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "server (%P) Received shutdown request from client\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2174_Regression/test_i.h b/TAO/tests/Bug_2174_Regression/test_i.h
deleted file mode 100644
index 00018fa25d8..00000000000
--- a/TAO/tests/Bug_2174_Regression/test_i.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Timeout
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_TIMEOUT_TEST_I_H
-#define TAO_TIMEOUT_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long echo (CORBA::Long x,
- CORBA::Long msecs
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* TAO_TIMEOUT_TEST_I_H */
diff --git a/TAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc b/TAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc
deleted file mode 100755
index ff28e59983f..00000000000
--- a/TAO/tests/Bug_2183_Regression/Bug_2183_Regression.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, strategies {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2183_Regression/Hello.cpp b/TAO/tests/Bug_2183_Regression/Hello.cpp
deleted file mode 100755
index 65df3934e3a..00000000000
--- a/TAO/tests/Bug_2183_Regression/Hello.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "Hello.cpp,v 1.3 2002/01/29 20:21:07 okellogg Exp")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2183_Regression/Hello.h b/TAO/tests/Bug_2183_Regression/Hello.h
deleted file mode 100755
index 7e1c3042968..00000000000
--- a/TAO/tests/Bug_2183_Regression/Hello.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# pragma warning(push)
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Hello interface
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
- /// Constructor
- Hello (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2183_Regression/README b/TAO/tests/Bug_2183_Regression/README
deleted file mode 100755
index 4e54c27822b..00000000000
--- a/TAO/tests/Bug_2183_Regression/README
+++ /dev/null
@@ -1,18 +0,0 @@
-// $Id$
-
-This test is that old chestnut the Hello World example with a slight twist.
-
-The RW policy is set then hang_client.pl sends an incomplete message and then the standard hello client is used
-to check if the server is still blocked.
-
-If the server is not blocked then the expected result is like:
-
-(3496|804) - string returned <Hello there!>
-Test succeeded !!!
-INFO: E:\doc_cvs\ACE_wrappers\TAO\tests\Bug_2183_Regression\server being killed.
-INFO: C:\Perl\bin\perl being killed.
-
-... a regression would look like:
-
-ERROR: E:\doc_cvs\ACE_wrappers\TAO\tests\Bug_2183_Regression\client timedout
-ERROR: Bug #2183 Regression failed. Non zero result from client.
diff --git a/TAO/tests/Bug_2183_Regression/Test.idl b/TAO/tests/Bug_2183_Regression/Test.idl
deleted file mode 100755
index 3c0976e106d..00000000000
--- a/TAO/tests/Bug_2183_Regression/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Bug_2183_Regression/client.cpp b/TAO/tests/Bug_2183_Regression/client.cpp
deleted file mode 100755
index 913d3153ae9..00000000000
--- a/TAO/tests/Bug_2183_Regression/client.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "client.cpp,v 1.5 2002/01/29 20:21:07 okellogg Exp")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- //hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- //ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2183_Regression/hang_client.pl b/TAO/tests/Bug_2183_Regression/hang_client.pl
deleted file mode 100755
index 6d2859337db..00000000000
--- a/TAO/tests/Bug_2183_Regression/hang_client.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-# $Id$
-
-use IO::Socket;
-
-$sock = new IO::Socket::INET (
- PeerAddr => 'localhost',
- PeerPort => 15000, # your server port here
- Proto => 'tcp',
- );
-die "Socket could not be created. Reason: $!\n" unless $sock;
-
-# Send incomplete request
-print $sock pack("H*", "47494f50010100000000006a00000001");
-
-# Block forever...
-while (1)
-{
- sleep(1000);
-}
-
-
diff --git a/TAO/tests/Bug_2183_Regression/run_test.pl b/TAO/tests/Bug_2183_Regression/run_test.pl
deleted file mode 100755
index 483b71e5ebc..00000000000
--- a/TAO/tests/Bug_2183_Regression/run_test.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-# $Id$
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-
-# The client and server processes
-if (PerlACE::is_vxworks_test()) {
- $SERVER = new PerlACE::ProcessVX(PerlACE::LocalFile("server"));
-}
-else {
- $SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-}
-$perl_executable = $^X;
-$perl_executable =~ s/\.exe//g;
-$DUMMY_CLIENT = new PerlACE::Process($perl_executable);
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-$DUMMY_CLIENT->Arguments("hang_client.pl");
-$DUMMY_CLIENT->IgnoreExeSubDir(1);
-
-if (PerlACE::is_vxworks_test()) {
- $SERVER->Arguments("-o server.ior -ORBEndpoint iiop://:15000 -ORBSvcConf server.conf");
-}
-else {
- $SERVER->Arguments("-o $server_ior_file -ORBEndpoint iiop://:15000 -ORBSvcConf server.conf");
-}
-
-# Fire up the server
-$sv = $SERVER->Spawn();
-
-if ($sv != 0) {
- print STDERR "ERROR: server returned $sv\n";
- exit 1;
-}
-
-# We can wait on the IOR file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-$DUMMY_CLIENT->Spawn();
-
-$DUMMY_CLIENT->Wait (2);
-
-$CLIENT->Arguments("-k file://$server_ior_file");
-if ($CLIENT->SpawnWaitKill (10) != 0)
-{
- print STDERR "ERROR: Bug #2183 Regression failed. Non zero result from client.\n";
- $SERVER->Kill();
- $DUMMY_CLIENT->Kill();
- unlink $server_ior_file;
- exit 1;
-}
-
-print "Test succeeded !!!\n";
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-$DUMMY_CLIENT->TerminateWaitKill (5);
-unlink $server_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_2183_Regression/server.conf b/TAO/tests/Bug_2183_Regression/server.conf
deleted file mode 100755
index 712e81b94ea..00000000000
--- a/TAO/tests/Bug_2183_Regression/server.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-
-static Client_Strategy_Factory "-ORBClientConnectionHandler RW -ORBConnectStrategy blocked -ORBTransportMuxStrategy EXCLUSIVE"
diff --git a/TAO/tests/Bug_2183_Regression/server.cpp b/TAO/tests/Bug_2183_Regression/server.cpp
deleted file mode 100755
index 4853611a134..00000000000
--- a/TAO/tests/Bug_2183_Regression/server.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID (Hello,
- server,
- "server.cpp,v 1.6 2003/11/01 11:15:11 dhinton Exp")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc b/TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc
deleted file mode 100644
index 0f6d8164108..00000000000
--- a/TAO/tests/Bug_2186_Regression/Bug_2186_Regression.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, strategies {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, strategies {
- exename = client
- Source_Files {
- Hello.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2186_Regression/Hello.cpp b/TAO/tests/Bug_2186_Regression/Hello.cpp
deleted file mode 100644
index c45f7947354..00000000000
--- a/TAO/tests/Bug_2186_Regression/Hello.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Received call back !!!\n"));
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Hello::request_callback (Test::Hello_ptr call_me ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Making call back !!!\n"));
- ACE_TRY
- {
- CORBA::String_var result = call_me->get_string ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception attempting to callback client obj ref: \n");
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Call back succeeded !!!\n"));
-}
diff --git a/TAO/tests/Bug_2186_Regression/Hello.h b/TAO/tests/Bug_2186_Regression/Hello.h
deleted file mode 100644
index cf49f8dc3de..00000000000
--- a/TAO/tests/Bug_2186_Regression/Hello.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void request_callback (Test::Hello_ptr call_me ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2186_Regression/README b/TAO/tests/Bug_2186_Regression/README
deleted file mode 100644
index 3cd6316fe16..00000000000
--- a/TAO/tests/Bug_2186_Regression/README
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-This test is the old fave TAO/tests/Hello with some minor(ish) differences.
-
-1/ A ::request_callback method has been added that takes a Hello ref and which prompts a callback to the ::get_string method on that ref.
-2/ The server (only) uses a server.conf file which specifies the wait on read client policy (RW).
-3/ The client now hosts a transient Hello servant too.
-4/ The client calls the servers ::request_callback method passing the reference to the client servant.
-5/ The server will call the client back.
-6/ The client will exit when its ::request_callback call returns.
-
-The script runs the server as:
-
-server -ORBSvcConf server.conf
-
-And then runs the client *TWICE* as:
-
-client -ORBEndpoint iiop://:23232
-
-The regression error output looks like:
-
-[sm@beatrice Bug_2186_Regression]$ ./run_test.pl
-(1310|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1309|3077687968) - Making call back !!!
-(1310|3077687968) - Received call back !!!
-(1309|3077687968) - Call back succeeded !!!
-(1310|3077687968) - Test (client) Succeeded !!!
-(1315|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1309|3077687968) - Making call back !!!
-(1309|3077687968) EXCEPTION, Exception attempting to callback client obj ref:
-
-system exception, ID 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'
-TAO exception, minor code = 6 (failed to recv request response; ENOENT), completed = MAYBE
-
-(1315|3077687968) - Test (client) Failed !!!
-(1315|3077687968) EXCEPTION, Exception caught:
-system exception, ID 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'
-TAO exception, minor code = 6 (failed to recv request response; ENOENT), completed = MAYBE
-
-ERROR: REGRESSION - Second client spawn returned 1
-INFO: server being killed.
-
-This demonstrates that dropped connections are written to blindly even after the peer has gone when the RW policy is in effect. If the 'server' is started without the -ORBSvcConf argument then the default client connection handler is used and the test runs suceesfully.
-
-This successful output looks like:
-
-[sm@beatrice Bug_2186_Regression]$ ./run_test.pl
-(1906|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1901|3077687968) - Making call back !!!
-(1906|3077687968) - Received call back !!!
-(1901|3077687968) - Call back succeeded !!!
-(1906|3077687968) - Test (client) Succeeded !!!
-(1911|3077687968) - Sending client obj ref to the server and requesting a callback.
-(1901|3077687968) - Making call back !!!
-(1911|3077687968) - Received call back !!!
-(1901|3077687968) - Call back succeeded !!!
-(1911|3077687968) - Test (client) Succeeded !!!
-INFO: server being killed.
-
-
diff --git a/TAO/tests/Bug_2186_Regression/Test.idl b/TAO/tests/Bug_2186_Regression/Test.idl
deleted file mode 100644
index 0f5412c0210..00000000000
--- a/TAO/tests/Bug_2186_Regression/Test.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// $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 ();
-
- void request_callback (in Hello call_me);
- };
-};
diff --git a/TAO/tests/Bug_2186_Regression/client.cpp b/TAO/tests/Bug_2186_Regression/client.cpp
deleted file mode 100644
index ca65ab90e14..00000000000
--- a/TAO/tests/Bug_2186_Regression/client.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *server_ior = "file://server.ior";
-const char *ior_output_file = "client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var server =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior.in ()),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Sending client obj ref to the server and requesting a callback.\n"));
-
- server->request_callback (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Test (client) Succeeded !!!\n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_ERROR, "(%P|%t) - Test (client) Failed !!!\n"));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2186_Regression/run_test.pl b/TAO/tests/Bug_2186_Regression/run_test.pl
deleted file mode 100755
index e1790866584..00000000000
--- a/TAO/tests/Bug_2186_Regression/run_test.pl
+++ /dev/null
@@ -1,63 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$port = PerlACE::uniqueid () + 10001;
-
-$serveriorfile = PerlACE::LocalFile ("server.ior");
-unlink $serveriorfile;
-$clientiorfile = PerlACE::LocalFile ("client.ior");
-unlink $clientiorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBSvcConf server.conf");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBSvcConf server.conf");
-}
-$CL = new PerlACE::Process ("client", "-ORBEndpoint iiop://:$port");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($serveriorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$serveriorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: First client spawn returned $client. Indicates a problem other than a regression.\n";
- $status = 1;
-}
-
-if ($client == 0) {
- $client = $CL->SpawnWaitKill (300);
-
- if ($client != 0) {
- print STDERR "ERROR: REGRESSION - Second client spawn returned $client\n";
- $status = 1;
- }
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $serveriorfile;
-unlink $clientiorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2186_Regression/server.conf b/TAO/tests/Bug_2186_Regression/server.conf
deleted file mode 100644
index cbb2962f41d..00000000000
--- a/TAO/tests/Bug_2186_Regression/server.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-static Client_Strategy_Factory "-ORBClientConnectionHandler RW -ORBConnectionHandlerCleanup 1"
-
diff --git a/TAO/tests/Bug_2186_Regression/server.cpp b/TAO/tests/Bug_2186_Regression/server.cpp
deleted file mode 100644
index 5c7e9180f09..00000000000
--- a/TAO/tests/Bug_2186_Regression/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc b/TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc
deleted file mode 100644
index 9130c21b40a..00000000000
--- a/TAO/tests/Bug_2201_Regression/Bug_2201_Regression.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Test): taoclient {
- exename = test
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2201_Regression/TestData.idl b/TAO/tests/Bug_2201_Regression/TestData.idl
deleted file mode 100644
index 9c205e1df77..00000000000
--- a/TAO/tests/Bug_2201_Regression/TestData.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-module SeqTest {
- typedef sequence<long> LongSeq;
-
- struct Node {
- LongSeq ls;
- };
-
- typedef sequence<Node> NodeSeq;
-};
diff --git a/TAO/tests/Bug_2201_Regression/run_test.pl b/TAO/tests/Bug_2201_Regression/run_test.pl
deleted file mode 100755
index fc3d16c5bbf..00000000000
--- a/TAO/tests/Bug_2201_Regression/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("test", "");
-}
-else {
- $SV = new PerlACE::Process ("test", "");
-}
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2201_Regression/test.cpp b/TAO/tests/Bug_2201_Regression/test.cpp
deleted file mode 100644
index 1508d989950..00000000000
--- a/TAO/tests/Bug_2201_Regression/test.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-#include "ace/Log_Msg.h"
-#include "TestDataC.h"
-
-int
-main (int argc, char *argv[])
-{
- int retval = 0;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- SeqTest::NodeSeq ns;
- ns.length (1);
- ns[0].ls.length (1);
- ns[0].ls[0] = 42;
-
- ns.length (0); // Shrink sequence
- ns.length (1); // Re-grow sequence; should re-initialize meber sequence
- // "as if" default constructed. I.e., the "ls" member
- // should have a length of zero.
-
- if (ns[0].ls.length() == 0) {
- ACE_DEBUG ((LM_DEBUG, "Test passed\n"));
- }
- else {
- ACE_ERROR ((LM_ERROR, "Test failed\n"));
- retval = 1;
- }
-
- return retval;
-}
diff --git a/TAO/tests/Bug_2222_Regression/Bug_2222_Regression.mpc b/TAO/tests/Bug_2222_Regression/Bug_2222_Regression.mpc
deleted file mode 100755
index cff84ebf492..00000000000
--- a/TAO/tests/Bug_2222_Regression/Bug_2222_Regression.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (*Test) : taoclient {
- Source_Files {
- test.cpp
- TestCaseC.cpp
- TestTypeC.cpp
- }
-}
diff --git a/TAO/tests/Bug_2222_Regression/TestCase.idl b/TAO/tests/Bug_2222_Regression/TestCase.idl
deleted file mode 100755
index 119634fdc21..00000000000
--- a/TAO/tests/Bug_2222_Regression/TestCase.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-#include "TestType.idl"
-
-typedef Array_Typedef Typedef_Of_Imported_Array_Typedef;
-
diff --git a/TAO/tests/Bug_2222_Regression/TestType.idl b/TAO/tests/Bug_2222_Regression/TestType.idl
deleted file mode 100755
index 408e5cf6d97..00000000000
--- a/TAO/tests/Bug_2222_Regression/TestType.idl
+++ /dev/null
@@ -1,3 +0,0 @@
-// $Id$
-
-typedef octet Array_Typedef[1];
diff --git a/TAO/tests/Bug_2222_Regression/test.cpp b/TAO/tests/Bug_2222_Regression/test.cpp
deleted file mode 100755
index 8e6a7bec7ff..00000000000
--- a/TAO/tests/Bug_2222_Regression/test.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-#include "TestCaseC.h"
-
-/**
-* This test does not run - successful compile and link == successful test.
-*/
-int
-main (int, char *[])
-{
- Array_Typedef_slice* body3 = Array_Typedef_alloc();
- Array_Typedef_slice* body31 = Array_Typedef_dup (body3);
- Array_Typedef_free (body3);
- Array_Typedef_free (body31);
-
- Typedef_Of_Imported_Array_Typedef_slice* body4 = Typedef_Of_Imported_Array_Typedef_alloc ();
- Typedef_Of_Imported_Array_Typedef_slice* body41 = Typedef_Of_Imported_Array_Typedef_dup (body4);
- Typedef_Of_Imported_Array_Typedef_free (body4);
- Typedef_Of_Imported_Array_Typedef_free (body41);
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc b/TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc
deleted file mode 100644
index 26c4972e1db..00000000000
--- a/TAO/tests/Bug_2234_Regression/Bug_2234_Regression.mpc
+++ /dev/null
@@ -1,25 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-
-project (*client) : taoclient,anytypecode {
- IDL_Files {
- Test.idl
- }
-
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
-project (*server) : taoserver,pi_server {
- after += *client
- IDL_Files {
- Test.idl
- }
-
- Source_Files {
- server.cpp
- }
-}
diff --git a/TAO/tests/Bug_2234_Regression/Test.idl b/TAO/tests/Bug_2234_Regression/Test.idl
deleted file mode 100644
index 5843ece7d9e..00000000000
--- a/TAO/tests/Bug_2234_Regression/Test.idl
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id$
-
-module Test
-{
- struct MyNonVarStruct {
- long val;
- };
-
- struct MyVarStruct {
- string val;
- };
-
- union MyNonVarUnion switch(short) {
- case 1:
- long valLong;
- case 2:
- short valShort;
- };
-
- union MyVarUnion switch(short) {
- case 1:
- long valLong;
- case 2:
- string valString;
- };
-
- typedef sequence< long > MySeqOfLong;
-
- interface Foo
- {
- long TestLong( in long a, out long b, inout long c );
- string TestString( in string a, out string b, inout string c );
- MyNonVarStruct TestNonVarStruct( in MyNonVarStruct a, out MyNonVarStruct b, inout MyNonVarStruct c );
- MyVarStruct TestVarStruct( in MyVarStruct a, out MyVarStruct b, inout MyVarStruct c );
- MyNonVarUnion TestNonVarUnion( in MyNonVarUnion a, out MyNonVarUnion b, inout MyNonVarUnion c );
- MyVarUnion TestVarUnion( in MyVarUnion a, out MyVarUnion b, inout MyVarUnion c );
- MySeqOfLong TestSeqOfLong( in MySeqOfLong a, out MySeqOfLong b, inout MySeqOfLong c );
- any TestAny( in any a, out any b, inout any c );
- oneway void ShutdownServer();
- };
-};
diff --git a/TAO/tests/Bug_2234_Regression/client.cpp b/TAO/tests/Bug_2234_Regression/client.cpp
deleted file mode 100644
index 52180b29d5a..00000000000
--- a/TAO/tests/Bug_2234_Regression/client.cpp
+++ /dev/null
@@ -1,332 +0,0 @@
-// $Id$
-
-// Regression test Bug 2234
-//
-// The bug manifests itself in the server.
-
-#include "TestC.h"
-#include "ace/OS_NS_string.h"
-
-int
-main(
- int argc,
- char** argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- CORBA::Boolean testFailed= 0;
- ACE_DEBUG( (LM_INFO, "Regression test for Bug 2234 (Interceptor arg list with var len out params)\n"));
- ACE_TRY
- {
- CORBA::ORB_var
- orb= CORBA::ORB_init( argc, argv, 0 ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- CORBA::Object_var
- object= orb->string_to_object( "file://server.ior" ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- Test::Foo_var
- foo= Test::Foo::_narrow( object.in() ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
-
- //-----------------------------------------------------------------------
- CORBA::Long
- aL= 1,
- bL,
- cL= 3,
- rL= 0;
- ACE_DEBUG( (LM_INFO, ". Long() ") );
- rL= foo->TestLong( aL, bL, cL ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG( (LM_INFO, "a is %d, b is %d, c is %d, r is %d: ", aL, bL, cL, rL) );
- if (static_cast<CORBA::Long>(1) != aL) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if (static_cast<CORBA::Long>(2) != bL) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if (static_cast<CORBA::Long>(4) != cL) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if (static_cast<CORBA::Long>(7) != rL) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- CORBA::String_var
- aS= CORBA::string_dup("1"),
- bS,
- cS= CORBA::string_dup("3"),
- rS;
- ACE_DEBUG( (LM_INFO, ". String() ") );
- rS= foo->TestString( aS.in(), bS.out(), cS.inout() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG( (LM_INFO, "a is %s, b is %s, c is %s, r is %s: ", aS.in(), bS.in(), cS.in(), rS.in()) );
- if ((0 != *aS.in()) && (0 != ACE_OS::strcmp(aS.in(), "1"))) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if ((0 != *aS.in()) && (0 != ACE_OS::strcmp(bS.in(), "2"))) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if ((0 != *aS.in()) && (0 != ACE_OS::strcmp(cS.in(), "4"))) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if ((0 != *aS.in()) && (0 != ACE_OS::strcmp(rS.in(), "7"))) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- Test::MyNonVarStruct_var
- aFS= new Test::MyNonVarStruct(),
- bFS= new Test::MyNonVarStruct(),
- cFS= new Test::MyNonVarStruct(),
- rFS;
- aFS->val= 1;
- cFS->val= 3;
- ACE_DEBUG( (LM_INFO, ". MyNonVarStruct() ") );
- rFS= foo->TestNonVarStruct( aFS.in(), bFS.out(), cFS.inout() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG( (LM_INFO, "a is %d, b is %d, c is %d, r is %d: ", aFS.in().val, bFS.in().val, cFS.in().val, rFS.in().val) );
- if (static_cast<CORBA::Long>(1) != aFS->val) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if (static_cast<CORBA::Long>(2) != bFS->val) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if (static_cast<CORBA::Long>(4) != cFS->val) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if (static_cast<CORBA::Long>(7) != rFS->val) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- Test::MyVarStruct_var
- aVS= new Test::MyVarStruct(),
- bVS,
- cVS= new Test::MyVarStruct(),
- rVS;
- aVS->val= CORBA::string_dup("1");
- cVS->val= CORBA::string_dup("3");
- ACE_DEBUG( (LM_INFO, ". MyVarStruct() ") );
- rVS= foo->TestVarStruct( aVS.in(), bVS.out(), cVS.inout() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG( (LM_INFO, "a is %s, b is %s, c is %s, r is %s: ", aVS->val.in(), bVS->val.in(), cVS->val.in(), rVS->val.in()) );
- if ((0 != *aVS->val) && (0 != ACE_OS::strcmp(aVS->val, "1"))) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if ((0 != *bVS->val) && (0 != ACE_OS::strcmp(bVS->val, "2"))) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if ((0 != *cVS->val) && (0 != ACE_OS::strcmp(cVS->val, "4"))) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if ((0 != *rVS->val) && (0 != ACE_OS::strcmp(rVS->val, "7"))) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- Test::MyNonVarUnion_var
- aFU= new Test::MyNonVarUnion(),
- bFU= new Test::MyNonVarUnion(),
- cFU= new Test::MyNonVarUnion(),
- rFU;
- aFU->valLong( static_cast<CORBA::Long>(1) );
- cFU->valLong( static_cast<CORBA::Long>(3) );
- ACE_DEBUG( (LM_INFO, ". MyNonVarUnion() ") );
- rFU= foo->TestNonVarUnion( aFU.in(), bFU.out(), cFU.inout() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG( (LM_INFO, "a is ") );
- if (static_cast<CORBA::Short>(1) != aFU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", aFU->valLong()) );
- ACE_DEBUG( (LM_INFO, ", b is ") );
- if (static_cast<CORBA::Short>(1) != bFU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", bFU->valLong()) );
- ACE_DEBUG( (LM_INFO, ", c is ") );
- if (static_cast<CORBA::Short>(1) != cFU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", cFU->valLong()) );
- ACE_DEBUG( (LM_INFO, ", r is ") );
- if (static_cast<CORBA::Short>(1) != rFU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", rFU->valLong()) );
- ACE_DEBUG( (LM_INFO, ": ") );
- if ((static_cast<CORBA::Short>(1) != aFU->_d()) || (static_cast<CORBA::Long>(1) != aFU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if ((static_cast<CORBA::Short>(1) != bFU->_d()) || (static_cast<CORBA::Long>(2) != bFU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if ((static_cast<CORBA::Short>(1) != cFU->_d()) || (static_cast<CORBA::Long>(4) != cFU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if ((static_cast<CORBA::Short>(1) != rFU->_d()) || (static_cast<CORBA::Long>(7) != rFU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- Test::MyVarUnion_var
- aVU= new Test::MyVarUnion(),
- bVU,
- cVU= new Test::MyVarUnion(),
- rVU;
- aVU->valLong( static_cast<CORBA::Long>(1) );
- cVU->valLong( static_cast<CORBA::Long>(3) );
- ACE_DEBUG( (LM_INFO, ". MyVarUnion() ") );
- rVU= foo->TestVarUnion( aVU.in(), bVU.out(), cVU.inout() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG( (LM_INFO, "a is ") );
- if (static_cast<CORBA::Short>(1) != aVU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", aVU->valLong()) );
- ACE_DEBUG( (LM_INFO, ", b is ") );
- if (static_cast<CORBA::Short>(1) != bVU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", bVU->valLong()) );
- ACE_DEBUG( (LM_INFO, ", c is ") );
- if (static_cast<CORBA::Short>(1) != cVU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", cVU->valLong()) );
- ACE_DEBUG( (LM_INFO, ", r is ") );
- if (static_cast<CORBA::Short>(1) != rVU->_d())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", rVU->valLong()) );
- ACE_DEBUG( (LM_INFO, ": ") );
- if ((static_cast<CORBA::Short>(1) != aVU->_d()) || (static_cast<CORBA::Long>(1) != aVU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if ((static_cast<CORBA::Short>(1) != bVU->_d()) || (static_cast<CORBA::Long>(2) != bVU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if ((static_cast<CORBA::Short>(1) != cVU->_d()) || (static_cast<CORBA::Long>(4) != cVU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if ((static_cast<CORBA::Short>(1) != rVU->_d()) || (static_cast<CORBA::Long>(7) != rVU->valLong())) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- Test::MySeqOfLong_var
- aSL= new Test::MySeqOfLong(1),
- bSL,
- cSL= new Test::MySeqOfLong(1),
- rSL;
- aSL->length(1);
- aSL[0]= static_cast<CORBA::Long>(1);
- cSL->length(1);
- cSL[0]= static_cast<CORBA::Long>(3);
- ACE_DEBUG( (LM_INFO, ". MySeqOfLong() ") );
- rSL= foo->TestSeqOfLong( aSL.in(), bSL.out(), cSL.inout() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG( (LM_INFO, "a is ") );
- if (1u != aSL->length())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", aSL[0]) );
- ACE_DEBUG( (LM_INFO, ", b is ") );
- if (1u != bSL->length())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", bSL[0]) );
- ACE_DEBUG( (LM_INFO, ", c is ") );
- if (1u != cSL->length())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", cSL[0]) );
- ACE_DEBUG( (LM_INFO, ", r is ") );
- if (1u != rSL->length())
- ACE_DEBUG( (LM_INFO, "?") );
- else
- ACE_DEBUG( (LM_INFO, "%d", rSL[0]) );
- ACE_DEBUG( (LM_INFO, ": ") );
- if ((1u != aSL->length()) || (static_cast<CORBA::Long>(1) != aSL[0])) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if ((1u != bSL->length()) || (static_cast<CORBA::Long>(2) != bSL[0])) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if ((1u != cSL->length()) || (static_cast<CORBA::Long>(4) != cSL[0])) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if ((1u != rSL->length()) || (static_cast<CORBA::Long>(7) != rSL[0])) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- CORBA::Any_var
- aA= new CORBA::Any(),
- bA,
- cA= new CORBA::Any(),
- rA;
- aA<<= static_cast<CORBA::Long>(1);
- cA<<= static_cast<CORBA::Long>(3);
- ACE_DEBUG( (LM_INFO, ". Any() ") );
- rA= foo->TestAny( aA.in(), bA.out(), cA.inout() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Boolean
- aB,
- bB,
- cB,
- rB;
- ACE_DEBUG( (LM_INFO, "a is ") );
- if ((aB= (aA>>= aL)))
- ACE_DEBUG( (LM_INFO, "%d", aL) );
- else
- ACE_DEBUG( (LM_INFO, "?") );
- ACE_DEBUG( (LM_INFO, ", b is ") );
- if ((bB= (bA>>= bL)))
- ACE_DEBUG( (LM_INFO, "%d", bL) );
- else
- ACE_DEBUG( (LM_INFO, "?") );
- ACE_DEBUG( (LM_INFO, ", c is ") );
- if ((cB= (cA>>= cL)))
- ACE_DEBUG( (LM_INFO, "%d", cL) );
- else
- ACE_DEBUG( (LM_INFO, "?") );
- ACE_DEBUG( (LM_INFO, ", r is ") );
- if ((rB= (rA>>= rL)))
- ACE_DEBUG( (LM_INFO, "%d", rL) );
- else
- ACE_DEBUG( (LM_INFO, "?") );
- ACE_DEBUG( (LM_INFO, ": ") );
- if (!aB || (static_cast<CORBA::Long>(1) != aL)) {
- ACE_DEBUG( (LM_ERROR, "a is wrong\n") ); testFailed= 1;}
- else if (!bB || (static_cast<CORBA::Long>(2) != bL)) {
- ACE_DEBUG( (LM_ERROR, "b is wrong\n") ); testFailed= 1;}
- else if (!cB || (static_cast<CORBA::Long>(4) != cL)) {
- ACE_DEBUG( (LM_ERROR, "c is wrong\n") ); testFailed= 1;}
- else if (!rB || (static_cast<CORBA::Long>(7) != rL)) {
- ACE_DEBUG( (LM_ERROR, "r is wrong\n") ); testFailed= 1;}
- else
- ACE_DEBUG( (LM_INFO, "OK\n") );
-
- //-----------------------------------------------------------------------
- foo->ShutdownServer( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_TRY_CHECK;
-
- //-----------------------------------------------------------------------
- orb->shutdown( true ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- orb->destroy( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_TRY_CHECK;
- }
- ACE_CATCH( CORBA::SystemException, ex )
- {
- ACE_PRINT_EXCEPTION( ex, "CORBA::SystemException: " );
- testFailed= 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION( ACE_ANY_EXCEPTION, "CORBA::Exception: " );
- testFailed= 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG( (LM_ERROR, "Unexpected general exception!\n") );
- testFailed= 1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG( (LM_INFO, "Regression test for Bug 2234 ") );
- if (testFailed)
- ACE_DEBUG( (LM_ERROR, "Failed\n") );
- else
- ACE_DEBUG( (LM_INFO, "Passed\n") );
-
- return testFailed? -1 : 0;
-}
diff --git a/TAO/tests/Bug_2234_Regression/run_test.pl b/TAO/tests/Bug_2234_Regression/run_test.pl
deleted file mode 100755
index dcdfcbce7e8..00000000000
--- a/TAO/tests/Bug_2234_Regression/run_test.pl
+++ /dev/null
@@ -1,57 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file= PerlACE::LocalFile( "server.ior" );
-unlink $server_ior_file;
-
-# The client and server processes
-if (PerlACE::is_vxworks_test()) {
- $SERVER= new PerlACE::ProcessVX( PerlACE::LocalFile( "server" ) );
-}
-else {
- $SERVER= new PerlACE::Process( PerlACE::LocalFile( "server" ) );
-}
-$CLIENT= new PerlACE::Process( PerlACE::LocalFile( "client" ) );
-
-
-# Fire up the server
-$sv = $SERVER->Spawn();
-
-if ($sv != 0) {
- print STDERR "ERROR: server returned $sv\n";
- exit 1;
-}
-# We can wait on the IOR file
-if (PerlACE::waitforfile_timed( $server_ior_file, 10 ) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-if ($CLIENT->SpawnWaitKill( 30 ) != 0)
-{
- unlink $server_ior_file;
- print STDERR "ERROR: Bug #2234 Regression test failed: cannot run client.\n";
- $SERVER->Kill();
- exit 1;
-}
-unlink $server_ior_file;
-
-if ($SERVER->WaitKill( 1 ) != 0)
-{
- print STDERR "ERROR: Bug #2234 Regression test failed: server not exiting.\n";
- exit 1;
-}
-
-print STDOUT "Bug #2234 Regression test succeeded.\n";
-exit 0;
diff --git a/TAO/tests/Bug_2234_Regression/server.cpp b/TAO/tests/Bug_2234_Regression/server.cpp
deleted file mode 100644
index c4bebf10c1b..00000000000
--- a/TAO/tests/Bug_2234_Regression/server.cpp
+++ /dev/null
@@ -1,748 +0,0 @@
-// $Id$
-
-// Regression test Bug 2234
-//
-// The bug actually manifested itself in class AnInterceptor::receive_request()
-// where any OUT parameters of variable length items (as they are held as
-// addresses of NULL pointers)
-//
-// The bug is caused by the arguments() call which should be
-// creating a read-only COPY of the parameters to the call. These are held as
-// a sequence of ANYs, whith the code for the insertion into which is created
-// by the TAO_IDL compiler when their user types are compiled.
-// It is also manifested by the result() call in the same way.
-
-#include "TestS.h"
-#include "ace/IOStream.h"
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "tao/PortableServer/Root_POA.h"
-
-CORBA::ORB_ptr orb;
-
-// The test case code for the server always sends back to the client:
-// b(out)= a(in) *2
-// c(inout)= c(inout) + 1
-// return= 7
-// Strings are single numerical digits, longs are the numbers themselves
-// and sequences are always single long values.
-// Parameter 'a' must be received from the client as 1, and 'c' as 3.
-
-class FooImpl : public POA_Test::Foo
-{
-public:
- FooImpl() {}
- ~FooImpl() {}
-
- //-----------------------------------------------------------
-
- CORBA::Long TestLong(
- CORBA::Long a,
- CORBA::Long_out b,
- CORBA::Long &c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException ) )
- {
- ACE_DEBUG( (LM_INFO, ". in TestLong\n") );
- if (static_cast<CORBA::Long>( 1 ) != a)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (static_cast<CORBA::Long>( 3 ) != c)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
-
- b= static_cast<CORBA::Long>( a << 1 );
-
- c+= static_cast<CORBA::Long>( 1 );
- return static_cast<CORBA::Long>( 7 );
- }
-
- //-----------------------------------------------------------
-
- char *TestString(
- const char *a,
- CORBA::String_out b,
- char *&c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- ACE_DEBUG( (LM_INFO, ". in TestString\n") );
- if (0 == a)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if (1 != ACE_OS::strlen( a ))
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if ('1' != *a)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if (1 != ACE_OS::strlen( c ))
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if (0 == c)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if ('3' != *c)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
-
- b= CORBA::string_dup( "0" ); // Create a one character output buffer
- *b= a[0] + 1;
- *c+= 1;
- return CORBA::string_dup( "7" );
- }
-
- //-----------------------------------------------------------
-
- Test::MyNonVarStruct TestNonVarStruct(
- const Test::MyNonVarStruct &a,
- Test::MyNonVarStruct_out b,
- Test::MyNonVarStruct &c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- Test::MyNonVarStruct
- newret;
-
- ACE_DEBUG( (LM_INFO, ". in TestNonVarStruct\n") );
- if (static_cast<CORBA::Long>( 1 ) != a.val)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret );
- }
- if (static_cast<CORBA::Long>( 3 ) != c.val)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret );
- }
-
- newret.val= static_cast<CORBA::Long>( 7 );
-
- Test::MyNonVarStruct *newval_p;
- ACE_NEW_RETURN( newval_p, Test::MyNonVarStruct, newret );
- Test::MyNonVarStruct_var
- newval= newval_p;
-
- newval->val= a.val << 1;
- c.val+= 1;
-
- b= newval._retn();
- return newret;
- }
-
- //-----------------------------------------------------------
-
- Test::MyVarStruct *TestVarStruct(
- const Test::MyVarStruct &a,
- Test::MyVarStruct_out b,
- Test::MyVarStruct &c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC(( CORBA::SystemException ))
- {
- ACE_DEBUG( (LM_INFO, ". in TestVarStruct\n") );
- if (0 == a.val.in())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if (1 != ACE_OS::strlen( a.val.in() ))
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if ('1' != *a.val.in())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if (0 == c.val.in())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if (1 != ACE_OS::strlen( c.val.in() ))
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
- if ('3' != *c.val.in())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0);
- }
-
- char ca[2]= {0};
- ca[0]= ('0' + ((*a.val.in() -'0') << 1));
-
- Test::MyVarStruct_var
- newval_p,
- newret_p;
- ACE_NEW_RETURN( newval_p, Test::MyVarStruct(), 0 );
- Test::MyVarStruct_var
- newval= newval_p;
- ACE_NEW_RETURN( newret_p, Test::MyVarStruct(), 0 );
- Test::MyVarStruct_var
- newret= newret_p;
-
- newval->val= CORBA::string_dup( ca );
-
- *c.val.inout()+= 1;
-
- newret->val= CORBA::string_dup( "7" );
-
- b= newval._retn();
- return newret._retn();
- }
-
- //-----------------------------------------------------------
-
- Test::MyNonVarUnion TestNonVarUnion(
- const Test::MyNonVarUnion &a,
- Test::MyNonVarUnion_out b,
- Test::MyNonVarUnion &c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- Test::MyNonVarUnion
- newret;
-
- ACE_DEBUG( (LM_INFO, ". in TestNonVarUnion\n") );
- if (static_cast<CORBA::Short>( 1 ) != a._d())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret );
- }
- if (static_cast<CORBA::Long>( 1 ) != a.valLong())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret );
- }
- if (static_cast<CORBA::Short>( 1 ) != c._d())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret );
- }
- if (static_cast<CORBA::Long>( 3 ) != c.valLong())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret );
- }
-
- Test::MyNonVarUnion *newval_p;
- ACE_NEW_RETURN( newval_p, Test::MyNonVarUnion(), newret );
- Test::MyNonVarUnion_var
- newval= newval_p;
-
- newval->valLong( a.valLong() << 1 );
- c.valLong( c.valLong() + 1 );
-
- newret.valLong( static_cast<CORBA::Long>( 7 ) );
-
- b= newval._retn();
- return newret;
- }
-
- //-----------------------------------------------------------
-
- Test::MyVarUnion *TestVarUnion(
- const Test::MyVarUnion &a,
- Test::MyVarUnion_out b,
- Test::MyVarUnion &c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC (( CORBA::SystemException ))
- {
- ACE_DEBUG( (LM_INFO, ". in TestVarUnion\n") );
- if (static_cast<CORBA::Short>( 1 ) != a._d())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (static_cast<CORBA::Long>( 1 ) != a.valLong())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (static_cast<CORBA::Short>( 1 ) != c._d())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (static_cast<CORBA::Long>( 3 ) != c.valLong())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
-
- Test::MyVarUnion *newval_p;
- ACE_NEW_RETURN( newval_p, Test::MyVarUnion(), 0 );
- Test::MyVarUnion_var
- newval= newval_p;
-
- newval->valLong( a.valLong() << 1 );
- c.valLong( c.valLong() + 1 );
-
- Test::MyVarUnion_var
- newret_p;
- ACE_NEW_RETURN( newret_p, Test::MyVarUnion(), 0 );
- Test::MyVarUnion_var
- newret= newret_p;
- newret->valLong( static_cast<CORBA::Short>( 7 ) );
-
- b= newval._retn();
- return newret._retn();
- }
-
- //-----------------------------------------------------------
-
- Test::MySeqOfLong *TestSeqOfLong (
- const Test::MySeqOfLong &a,
- Test::MySeqOfLong_out b,
- Test::MySeqOfLong &c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- ACE_DEBUG( (LM_INFO, ". in TestSeqOfLong\n") );
- if (1u != a.length())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect length of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (static_cast<CORBA::Long>( 1 ) != a[0])
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (1u != c.length())
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect length of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (static_cast<CORBA::Long>( 3 ) != c[0])
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
-
- Test::MySeqOfLong *newval_p;
- ACE_NEW_RETURN( newval_p, Test::MySeqOfLong(1), 0 );
- Test::MySeqOfLong_var
- newval= newval_p;
-
- newval->length(1);
- newval[0]= a[0] << 1;
- c[0]+= 1;
-
- Test::MySeqOfLong *newret_p;
- ACE_NEW_RETURN( newret_p, Test::MySeqOfLong(1), 0 );
- Test::MySeqOfLong_var
- newret= newret_p;
- newret->length( 1 );
- newret[0]= static_cast<CORBA::Long>( 7 );
-
- b= newval._retn();
- return newret._retn();
- }
-
- //-----------------------------------------------------------
-
- CORBA::Any *TestAny(
- const CORBA::Any &a,
- CORBA::Any_out b,
- CORBA::Any &c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- ACE_DEBUG( (LM_INFO, ". in TestAny\n") );
- CORBA::Long aL;
- CORBA::Long cL;
- if (a >>= aL)
- {
- if (static_cast<CORBA::Long>( 1 ) != aL)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- }
- else
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect any type for parameter a\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- if (c >>= cL)
- {
- if (static_cast<CORBA::Long>( 3 ) != cL)
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
- }
- else
- {
- ACE_DEBUG( (LM_INFO, "* Incorrect any type for parameter c\n") );
- ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 );
- }
-
- CORBA::Any *newval_p;
- ACE_NEW_RETURN( newval_p, CORBA::Any(), 0 );
- CORBA::Any_var
- newval= newval_p;
-
- newval<<= aL << 1;
- c<<= cL + 1;
-
- CORBA::Any *newret_p;
- ACE_NEW_RETURN( newret_p, CORBA::Any(), 0 );
- CORBA::Any_var
- newret= newret_p;
- newret<<= static_cast<CORBA::Long>( 7 );
-
- b= newval._retn();
- return newret._retn();
- }
-
- //-----------------------------------------------------------
-
- void ShutdownServer(
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- ACE_DEBUG( (LM_INFO, ". in ShutdownServer\n") );
- orb->shutdown(0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-};
-
-// Here is our Regression test class that actually tests the problem with
-// the interceptor's arguments.
-
-class AnInterceptor : public PortableInterceptor::ServerRequestInterceptor
-{
-public:
- char *name( ACE_ENV_SINGLE_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- return const_cast<char *>("");
- }
-
- void destroy( ACE_ENV_SINGLE_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- }
-
- void receive_request_service_contexts(
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC( (CORBA::SystemException,
- PortableInterceptor::ForwardRequest) )
- {
- }
-
- // Note this helper only deals with the types inserted into
- // the any that we defined for this test.
- static void display_any( const CORBA::Any &arg )
- {
- const CORBA::Any *holding;
- const Test::MyVarStruct *vS;
- const Test::MyNonVarStruct *fS;
- const char *pString;
- CORBA::Long theLong;
- const Test::MyVarUnion *vU;
- const Test::MyNonVarUnion *fU;
- const Test::MySeqOfLong *sL;
-
- if (arg >>= vS)
- {
- ACE_DEBUG( (LM_INFO, "MyVarStruct (") );
- if (vS)
- ACE_DEBUG( (LM_INFO, vS->val.in()) );
- else
- ACE_DEBUG( (LM_INFO, "*Null*") );
- }
- else if (arg >>= fS)
- {
- ACE_DEBUG( (LM_INFO, "MyNonVarStruct (") );
- if (fS)
- ACE_DEBUG( (LM_INFO, "%d", fS->val) );
- else
- ACE_DEBUG( (LM_INFO, "*Null*") );
- }
- else if (arg >>= pString)
- {
- ACE_DEBUG( (LM_INFO, "String (") );
- if (pString)
- ACE_DEBUG( (LM_INFO, pString) );
- else
- ACE_DEBUG( (LM_INFO, "*Null*") );
- }
- else if (arg >>= theLong)
- ACE_DEBUG( (LM_INFO, "Long (%d", theLong) );
- else if (arg >>= fU)
- {
- ACE_DEBUG( (LM_INFO, "MyNonVarUnion (") );
- if (fU) switch (fU->_d())
- {
- case 1:
- ACE_DEBUG( (LM_INFO, "Long %d", fU->valLong()) );
- break;
-
- case 2:
- ACE_DEBUG( (LM_INFO, "Short %d", fU->valShort()) );
- break;
-
- default:
- ACE_DEBUG( (LM_INFO, "*Unknown*") );
- }
- else
- ACE_DEBUG( (LM_INFO, "*Null*") );
- }
- else if (arg >>= vU)
- {
- ACE_DEBUG( (LM_INFO, "MyVarUnion (") );
- if (vU) switch (vU->_d())
- {
- case 1:
- ACE_DEBUG( (LM_INFO, "Long %d", vU->valLong()) );
- break;
-
- case 2:
- ACE_DEBUG( (LM_INFO, "String %s", vU->valString()) );
- break;
-
- default:
- ACE_DEBUG( (LM_INFO, "*Unknown*") );
- }
- else
- ACE_DEBUG( (LM_INFO, "*Null*") );
- }
- else if (arg >>= sL)
- {
- ACE_DEBUG( (LM_INFO, "MySeqOfLong (") );
- if (sL)
- {
- if (0u < sL->length())
- {
- for (unsigned int i= 0u; i < sL->length() - 1u; ++i)
- ACE_DEBUG( (LM_INFO, "%d, ", (*sL)[ i ]) );
- ACE_DEBUG( (LM_INFO, "%d", (*sL)[ sL->length() - 1u ]) );
- }
- else
- ACE_DEBUG( (LM_INFO, "*Empty*") );
- }
- else
- ACE_DEBUG( (LM_INFO, "*Null*") );
- }
- else if (arg >>= holding)
- {
- ACE_DEBUG( (LM_INFO, "Any (") );
- if (holding)
- {
- if (*holding >>= theLong)
- ACE_DEBUG( (LM_INFO, "Long %d", theLong) );
- else
- ACE_DEBUG( (LM_INFO, "*Not Long*") );
- }
- else
- ACE_DEBUG( (LM_INFO, "*Null*") );
- }
- else
- ACE_DEBUG( (LM_INFO, "Unknown (") );
- ACE_DEBUG( (LM_INFO, ") parameter\n") );
- }
-
- // Useful parameter dumping helper method.-----------| Note this VAR
- // which will automatically delete after the call! V
- static void display_arg_list( Dynamic::ParameterList_var param_list )
- {
- for (unsigned int i= 0u; i < param_list->length(); ++i)
- {
- ACE_DEBUG( (LM_INFO, " param %d is an ", i) );
- switch( (*param_list)[i].mode )
- {
- case CORBA::PARAM_IN:
- ACE_DEBUG( (LM_INFO, "in ") );
- break;
-
- case CORBA::PARAM_OUT:
- ACE_DEBUG( (LM_INFO, "out ") );
- break;
-
- case CORBA::PARAM_INOUT:
- ACE_DEBUG( (LM_INFO, "inout ") );
- break;
-
- default:
- ACE_DEBUG( (LM_INFO, "non-directional ") );
- break;
- }
-
- display_any( (*param_list)[i].argument );
- }
- }
-
- void receive_request(
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException,
- PortableInterceptor::ForwardRequest) )
- {
- ACE_DEBUG( (LM_INFO, "AnInterceptor::receive_request\n") );
- Dynamic::ParameterList
- *pArgs= ri->arguments( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_CHECK;
- display_arg_list( pArgs );
- }
-
- // This send_reply() method would cause the problem due to it's
- // ri->arguments() call. When the returned arguments list was
- // deleted (due to the display_arg_list( Dynamic::ParameterList_var ))
- // going out of scope, the "Owned" out pointer 'Argument B' would
- // be premiturely deleted before being sent back to the client.
- void send_reply(
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- ACE_DEBUG( (LM_INFO, "AnInterceptor::send_reply\n") );
- Dynamic::ParameterList
- *pArgs= ri->arguments( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_CHECK;
- display_arg_list( pArgs );
- ACE_DEBUG( (LM_INFO, " result is an ") );
- CORBA::Any
- *pAny= ri->result( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_CHECK;
- display_any( CORBA::Any_var( pAny ).in() );
- ACE_DEBUG( (LM_INFO, "\n") );
- }
-
- void send_exception(
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC( (CORBA::SystemException,
- PortableInterceptor::ForwardRequest) )
- {
- }
-
- void send_other(
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC( (CORBA::SystemException,
- PortableInterceptor::ForwardRequest) )
- {
- }
-};
-
-class Initialiser : public PortableInterceptor::ORBInitializer
-{
-public:
- Initialiser( AnInterceptor* interceptor )
- {
- this->interceptor_= interceptor;
- }
-
- void pre_init(
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- }
-
- void post_init(
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC( (CORBA::SystemException) )
- {
- info->add_server_request_interceptor( interceptor_ );
- }
-
-private:
- AnInterceptor *interceptor_;
-};
-
-int main( int argc, char *argv[] )
-{
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG( (LM_INFO, "Server start\n") );
- AnInterceptor
- interceptor;
- PortableInterceptor::ORBInitializer_ptr
- initialiser_p;
- ACE_NEW_RETURN( initialiser_p, Initialiser( &interceptor ), -1 );
- PortableInterceptor::ORBInitializer_var
- initialiser= initialiser_p;
- PortableInterceptor::register_orb_initializer( initialiser.in() );
-
- orb= CORBA::ORB_init( argc, argv, 0 ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- CORBA::Object_var
- Object = orb->resolve_initial_references( "RootPOA" ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- PortableServer::POA_var rootPOA=
- PortableServer::POA::_narrow( Object.in() ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- PortableServer::POAManager_var
- rootPOAMgr = rootPOA->the_POAManager( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_TRY_CHECK;
-
- FooImpl
- phooey;
- PortableServer::ObjectId_var
- phooeyId= rootPOA->activate_object( &phooey ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- CORBA::Object_var
- phooeyObj= rootPOA->id_to_reference( phooeyId.in() ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- CORBA::String_var
- stringifiedObj= orb->object_to_string( phooeyObj.in() ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
- ofstream file( "server.ior" );
- file << stringifiedObj;
- file.close();
-
- rootPOAMgr->activate( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_TRY_CHECK;
-
- orb->run( 0 ACE_ENV_ARG_PARAMETER );
- ACE_TRY_CHECK;
-
- orb->destroy( ACE_ENV_SINGLE_ARG_PARAMETER );
- ACE_TRY_CHECK;
- }
- ACE_CATCH( CORBA::SystemException, exception )
- {
- ACE_PRINT_EXCEPTION( exception, "CORBA::SystemException: " );
- return -1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION( ACE_ANY_EXCEPTION, "CORBA::Exception: " );
- return -1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG( (LM_ERROR, "Unexpected general exception.\n") );
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG( (LM_INFO, "Server stopped\n") );
- return 0;
-}
diff --git a/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc b/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc
deleted file mode 100644
index bf8946a0384..00000000000
--- a/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable {
- exename = server
- idlflags += -Gp -Gd -Sa -St
- Source_Files {
- server.cpp
- MyInterfaceImpl.cpp
- }
-}
-
-project(*Client): taoserver, iortable {
- exename = client
- idlflags += -Gp -Gd -Sa -St
- after += *Server
- Source_Files {
- client.cpp
- MyInterfaceImpl.cpp
- }
-}
diff --git a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp b/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp
deleted file mode 100644
index da5c2832189..00000000000
--- a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-
-#include "MyInterfaceImpl.h"
-
-const char*
-MyInterfaceImpl::my_string = "a string";
-
-MyInterfaceImpl::MyInterfaceImpl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-CORBA::Boolean
-MyInterfaceImpl::myMethod (const char* mystring ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return mystring == my_string;
-}
-
diff --git a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h b/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h
deleted file mode 100644
index a7f76261396..00000000000
--- a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// $Id$
-//
-
-#include "TestS.h"
-
-class MyInterfaceImpl
- : public virtual POA_MyInterface
-{
- public:
- MyInterfaceImpl (CORBA::ORB_ptr orb);
-
- static const char* my_string;
-
- // = The skeleton methods
- virtual CORBA::Boolean myMethod (const char* stringParam ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
diff --git a/TAO/tests/Bug_2289_Regression/README b/TAO/tests/Bug_2289_Regression/README
deleted file mode 100644
index 0e4df56f029..00000000000
--- a/TAO/tests/Bug_2289_Regression/README
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id$
-
-This test checks that collocation optimisation takes effect after a location forward is received to an in process servant.
-
-It comprises:
-1/ A trivial IDL interface (Test.idl) with a single method that passes a string and returns a boolean, this interface is implemented with a servant (MyInterfaceImpl) that returns true if the address of the string passed matches the address of a static string defined as a public member of the servant.
-2/ A server which initialises a listener and binds a file:// type IOR for the client's servant into its IORTable against a name.
-4/ A client which initialises an in process MyInterfaceImpl servant.
-
-The client uses a corbaloc based on the server's endpoint and the name that its (the client's) reference is bound against in the server IORTable.
-
-Narrowing this results in a remote is_a which causes the server ORB to send a locate_forward to the client directing it to the 'in process' servant.
-
-If the fix is present the client ORB will pass the string by reference and the addresses will be equal in the servant - if the fix is not present it will attempt to marshal and demarshal the string, the addresses will differ, causing the test to fail.
-
-__Regression Output__
-
-[sm@beatrice Bug_2289_Regression]$ ./run_test.pl
-Test failed
-ERROR: Bug #TAO135 Regression failed. Non zero result from client.
-
-__Successful Output__
-
-[sm@beatrice Bug_2289_Regression]$ ./run_test.pl
-Test succeeded
-INFO: /home/sm/doc_cvs/ACE_wrappers/TAO/tests/Bug_2289_Regression/server being killed.
diff --git a/TAO/tests/Bug_2289_Regression/Test.idl b/TAO/tests/Bug_2289_Regression/Test.idl
deleted file mode 100644
index 0a599c8fbd3..00000000000
--- a/TAO/tests/Bug_2289_Regression/Test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-typedef string MyString;
-
-interface MyInterface
-{
- boolean myMethod (in MyString stringParam);
-};
diff --git a/TAO/tests/Bug_2289_Regression/client.cpp b/TAO/tests/Bug_2289_Regression/client.cpp
deleted file mode 100644
index cb82452c574..00000000000
--- a/TAO/tests/Bug_2289_Regression/client.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-//
-// $Id$
-//
-#include "TestS.h"
-#include "MyInterfaceImpl.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-const char *server_ior = "";
-
-const char *ior_output_file = "client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int result = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- MyInterfaceImpl *test_impl;
- ACE_NEW_RETURN (test_impl,
- MyInterfaceImpl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- MyInterface_var test_ref =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test_ref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file != 0)
- {
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK
-
- CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- MyInterface_var server =
- MyInterface::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil server reference <%s>\n",
- ior.in()),
- 1);
- }
-
-
- CORBA::Boolean temp = server->myMethod (MyInterfaceImpl::my_string ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (temp)
- {
- ACE_DEBUG ((LM_DEBUG, "Test succeeded\n"));
- }
- else
- {
- ACE_DEBUG ((LM_ERROR, "Test failed\n"));
- result = 1;
- }
-
- //hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- //ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return result;
-}
diff --git a/TAO/tests/Bug_2289_Regression/run_test.pl b/TAO/tests/Bug_2289_Regression/run_test.pl
deleted file mode 100755
index f25f0ae4f60..00000000000
--- a/TAO/tests/Bug_2289_Regression/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-$client_ior_file = PerlACE::LocalFile ("client.ior");
-unlink $server_ior_file;
-unlink $client_ior_file;
-
-# The client and server processes
-if (PerlACE::is_vxworks_test()) {
- $SERVER = new PerlACE::ProcessVX(PerlACE::LocalFile("server"));
-}
-else {
- $SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-}
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-# We want the server to run on a fixed port
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-
-$SERVER->Arguments("-ORBEndpoint iiop://:$port -ORBDottedDecimalAddresses 1");
-
-# Fire up the server
-$sv = $SERVER->Spawn();
-
-if ($sv != 0) {
- print STDERR "ERROR: server returned $sv\n";
- exit 1;
-}
-
-# We can wait on the IOR file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-$CLIENT->Arguments("-k corbaloc::127.0.0.1:$port/collocated_ior_bound_in_remote_iortable -ORBDottedDecimalAddresses 1 -ORBCollocationStrategy thru_poa");
-if ($CLIENT->SpawnWaitKill (60) != 0)
-{
- print STDERR "ERROR: Bug 2289 Regression failed. Non zero result from client.\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-unlink $server_ior_file;
-unlink $client_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_2289_Regression/server.cpp b/TAO/tests/Bug_2289_Regression/server.cpp
deleted file mode 100644
index 47f749d99bd..00000000000
--- a/TAO/tests/Bug_2289_Regression/server.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//
-// $Id$
-//
-
-#include "MyInterfaceImpl.h"
-#include "TestS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/IORTable/IORTable.h"
-
-ACE_RCSID (Hello,
- server,
- "server.cpp,v 1.6 2003/11/01 11:15:11 dhinton Exp")
-
-const char *ior_output_file = "server.ior";
-
-const char *client_ior = "file://client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- client_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- MyInterfaceImpl *test_impl;
- ACE_NEW_RETURN (test_impl,
- MyInterfaceImpl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- MyInterface_var test_ref =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test_ref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file != 0)
- {
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var table_object =
- orb->resolve_initial_references ("IORTable"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (adapter.in ()))
- {
- ACE_ERROR ((LM_ERROR, "Nil IORTable\n"));
- }
- else
- {
- adapter->bind ("collocated_ior_bound_in_remote_iortable", client_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc b/TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc
deleted file mode 100644
index f362da7ae93..00000000000
--- a/TAO/tests/Bug_2319_Regression/Bug_2319_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*server) : taoserver, amh {
- source_files {
- server.cpp
- }
-}
diff --git a/TAO/tests/Bug_2319_Regression/Test.idl b/TAO/tests/Bug_2319_Regression/Test.idl
deleted file mode 100644
index ef304de303a..00000000000
--- a/TAO/tests/Bug_2319_Regression/Test.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// $Id$
-//
-
-/// A simple module to avoid namespace pollution
-module Test
-{
-
- /// Use a timestamp to measure the roundtrip delay
- typedef unsigned long long Timestamp;
-
- /// Measure roundtrip Delay
- interface Roundtrip
- {
- oneway void test_method (in Timestamp send_time);
- };
-};
diff --git a/TAO/tests/Bug_2319_Regression/run_test.pl b/TAO/tests/Bug_2319_Regression/run_test.pl
deleted file mode 100755
index 1c118935b70..00000000000
--- a/TAO/tests/Bug_2319_Regression/run_test.pl
+++ /dev/null
@@ -1,24 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that tests AMH exceptions
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$AMH = new PerlACE::Process ("server", "");
-
-# Run the AMH server.
-$AMH->Spawn ();
-
-$amhserver= $AMH->WaitKill (60);
-if ($amhserver != 0) {
- print STDERR "ERROR: AMH Server returned $amhserver\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2319_Regression/server.cpp b/TAO/tests/Bug_2319_Regression/server.cpp
deleted file mode 100644
index 8bf1e026102..00000000000
--- a/TAO/tests/Bug_2319_Regression/server.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-
-// $Id$
-
-#include "ace/Thread_Manager.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/Get_Opt.h"
-
-#include "TestS.h"
-#include "TestC.h"
-
-int num_calls = 10; // total calls client is going to make
-const int sleep_time = 1; // sleep for 1 sec on each call
-
-// This should equal num_calls within 'sleep * num_calls' seconds
-int calls_received = 0;
-
-const char *ior = "file://test.ior";
-const char *ior_file = "test.ior";
-
-
-
-/***************************/
-/*** Servant Declaration ***/
-/***************************/
-
-class ST_AMH_Servant
- : public virtual POA_Test::AMH_Roundtrip
- {
- public:
-
- ST_AMH_Servant (CORBA::ORB_ptr orb);
-
- void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- protected:
- CORBA::ORB_ptr orb_;
- };
-
-
-
-/****************************/
-/**** Server Declaration ****/
-/****************************/
-
-/**
- Class that performs all 'dirty' initialisation work that is common to
- all the AMH servers and 'hides' all the common ORB functions.
- */
-class ST_AMH_Server
- {
- public:
- ST_AMH_Server (int *argc, char **argv);
- virtual ~ST_AMH_Server ();
-
- /// ORB inititalisation stuff
- int start_orb_and_poa (const CORBA::ORB_var &_orb);
-
- /// register the servant with the poa
- virtual void register_servant (ST_AMH_Servant *servant);
-
- /// orb-perform_work () abstraction
- virtual void run_event_loop ();
-
- public:
-
- protected:
- int *argc_;
- char **argv_;
- char *ior_output_file_;
- CORBA::ORB_ptr orb_;
- PortableServer::POA_var root_poa_;
-
- private:
- /// Write servant IOR to file specified with the '-o' option
- int write_ior_to_file (CORBA::String_var ior);
- };
-
-
-
-// ------------------------------------------------------------------------
-// ------------------------------------------------------------------------
-// ------------------------------------------------------------------------
-
-
-
-// ------------------------------------------------------------------------
-//
-int parse_args (int argc, char *argv[])
-{
-ACE_Get_Opt get_opts (argc, argv, "n:");
-int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- num_calls = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- default:
- break;
- }
- return 0;
-}
-
-
-
-
-/***************************/
-/*** Servant Definition ***/
-/***************************/
-
-// ------------------------------------------------------------------------
-//
-ST_AMH_Servant::ST_AMH_Servant (CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-// ------------------------------------------------------------------------
-//
-void
-ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- printf("Recieved Timestamp # %d \n", calls_received);
- ACE_OS::sleep(1);
- calls_received++;
-
- ACE_UNUSED_ARG (send_time);
- ACE_UNUSED_ARG (_tao_rh);
-
- // When _tao_rh destructor is called, it shouldn't send anything to
- // the client as well
-}
-
-
-
-
-
-/*** Server Declaration ***/
-
-// ------------------------------------------------------------------------
-//
-ST_AMH_Server::ST_AMH_Server (int* argc, char **argv)
- : argc_ (argc), argv_ (argv)
-{
- this->ior_output_file_ = const_cast<char*>(ior_file);
-}
-
-// ------------------------------------------------------------------------
-//
-ST_AMH_Server::~ST_AMH_Server ()
-{
- ACE_TRY_NEW_ENV
- {
- this->root_poa_->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-
-}
-
-// ------------------------------------------------------------------------
-//
-int ST_AMH_Server::start_orb_and_poa (const CORBA::ORB_var &_orb)
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_ = CORBA::ORB::_duplicate(_orb.in ());
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- this->root_poa_ = PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ------------------------------------------------------------------------
-//
-void ST_AMH_Server::register_servant (ST_AMH_Servant *servant)
-{
- ACE_TRY_NEW_ENV
- {
- Test::Roundtrip_var roundtrip = servant->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var iorstr = this->orb_->object_to_string(roundtrip.in ());
- ACE_TRY_CHECK;
-
- (void) this->write_ior_to_file(iorstr);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- }
- ACE_ENDTRY;
-}
-
-// ------------------------------------------------------------------------
-//
-void ST_AMH_Server::run_event_loop ()
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- ACE_Time_Value period (1, 0);
- while (1)
- {
- this->orb_->perform_work (&period);
- ACE_TRY_CHECK;
-
- // when all calls from client have been recieved, exit
- if (calls_received == num_calls )
- return;
- }
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {}
- ACE_ENDTRY;
-}
-
-// ------------------------------------------------------------------------
-//
-int
-ST_AMH_Server::write_ior_to_file (CORBA::String_var iorstr)
-{
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ST_AMH_Server::ior_output_file_, "w");
- if (output_file == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ST_AMH_Server::ior_output_file_));
- return -1;
- }
-
- ACE_OS::fprintf (output_file, "%s", iorstr.in ());
- ACE_OS::fclose (output_file);
- return 0;
-}
-
-
-// ------------------------------------------------------------------------
-//
-static ACE_THR_FUNC_RETURN start_server(void* _arg)
-{
-ST_AMH_Server *amh_server = static_cast<ST_AMH_Server*>(_arg);
- amh_server->run_event_loop();
- return 0;
-}
-
-// ------------------------------------------------------------------------
-//
-static ACE_THR_FUNC_RETURN start_client(void* _arg)
-{
-Test::Roundtrip_var roundtrip(static_cast<Test::Roundtrip_ptr>(_arg));
-
- // Do a couple of calls on the server. If the sever is trying to
- // do something stupid like sending an exception to us, then it
- // won't be able to handle more than 1 request from us.
-Test::Timestamp time = 10;
-
- for (int i = 0; i < num_calls; i++)
- {
- roundtrip->test_method(time);
- ACE_DEBUG ((LM_DEBUG, "Sent call # %d \n", i));
- ACE_TRY_CHECK;
- }
-
- return 0;
-}
-
-
-// ------------------------------------------------------------------------
-//
-int main (int argc, char *argv[])
-{
- if (parse_args (argc, argv) != 0)
- return 1;
-
-ST_AMH_Server amh_server (&argc, argv);
-CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "");
-
- ACE_TRY_CHECK;
-
- amh_server.start_orb_and_poa(orb);
-
-ST_AMH_Servant servant(orb.in());
-
- amh_server.register_servant(&servant);
-
- CORBA::Object_var object = orb->string_to_object(ior);
- ACE_TRY_CHECK;
-
- Test::Roundtrip_var roundtrip = Test::Roundtrip::_narrow(object.in ());
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil(roundtrip.in()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
-
- ACE_thread_t serverThr;
- ACE_thread_t clientThr;
-
- ACE_Thread_Manager::instance()->spawn(start_server,
- (void*)&amh_server,
- THR_NEW_LWP | THR_JOINABLE,
- &serverThr
- );
-
- ACE_Thread_Manager::instance()->spawn(start_client,
- (void*)roundtrip.in (),
- THR_NEW_LWP | THR_JOINABLE,
- &clientThr
- );
-
- ACE_Thread_Manager::instance()->join(clientThr);
- printf("End client\n");
- ACE_Thread_Manager::instance()->join(serverThr);
- printf("End server\n");
-
- orb->destroy();
- ACE_TRY_CHECK;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc b/TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc
deleted file mode 100644
index 5fce9b69306..00000000000
--- a/TAO/tests/Bug_2328_Regression/Bug_2328_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, codeset {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2328_Regression/Hello.cpp b/TAO/tests/Bug_2328_Regression/Hello.cpp
deleted file mode 100644
index ac4c1c6fe85..00000000000
--- a/TAO/tests/Bug_2328_Regression/Hello.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (const char * A, const char * B, const char * C)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Received: <%s>, <%s>, <%s>\n", A, B, C));
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2328_Regression/Hello.h b/TAO/tests/Bug_2328_Regression/Hello.h
deleted file mode 100644
index 4ef97cd1b6c..00000000000
--- a/TAO/tests/Bug_2328_Regression/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (const char * A, const char * B, const char * C ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2328_Regression/README b/TAO/tests/Bug_2328_Regression/README
deleted file mode 100644
index 53f14a09bed..00000000000
--- a/TAO/tests/Bug_2328_Regression/README
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
-
-@page Bug_2328_Regression README File
-
-This test sends 3 strings to the server. The server is using the codeset
-library, the client is configured that it doesn't use it. This gives a marshal
-exception in TAO 1.4.7 because it uses UTF8 Latin1 to demarshal the strings
-which then causes things to go wrong in the stream.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Bug_2328_Regression/Test.idl b/TAO/tests/Bug_2328_Regression/Test.idl
deleted file mode 100644
index 528f0c5485c..00000000000
--- a/TAO/tests/Bug_2328_Regression/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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 (in string A, in string B, in string C);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Bug_2328_Regression/client.cpp b/TAO/tests/Bug_2328_Regression/client.cpp
deleted file mode 100644
index d39919e7d85..00000000000
--- a/TAO/tests/Bug_2328_Regression/client.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var A = CORBA::string_dup ("DKWC");
- CORBA::String_var B = CORBA::string_dup ("kwc");
- CORBA::String_var C = CORBA::string_dup ("MV-files");
- CORBA::String_var the_string =
- hello->get_string (A.in (), B.in (), C.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2328_Regression/run_test.pl b/TAO/tests/Bug_2328_Regression/run_test.pl
deleted file mode 100755
index f5831bdb8e9..00000000000
--- a/TAO/tests/Bug_2328_Regression/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBNegotiateCodesets 0");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2328_Regression/server.cpp b/TAO/tests/Bug_2328_Regression/server.cpp
deleted file mode 100644
index 69fe7692d76..00000000000
--- a/TAO/tests/Bug_2328_Regression/server.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/Codeset/Codeset.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc b/TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc
deleted file mode 100644
index 7223fb9069c..00000000000
--- a/TAO/tests/Bug_2345_Regression/Bug_2345_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server) : taoserver, imr_client, exceptions {
- Source_Files {
- server.cpp
- }
-}
diff --git a/TAO/tests/Bug_2345_Regression/run_test.pl b/TAO/tests/Bug_2345_Regression/run_test.pl
deleted file mode 100755
index fa8e977afd2..00000000000
--- a/TAO/tests/Bug_2345_Regression/run_test.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-ORBUseIMR 1 -ORBDefaultInitRef corbaloc:iiop:localhost:12345");
-
-$server = $SV->SpawnWaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2345_Regression/server.cpp b/TAO/tests/Bug_2345_Regression/server.cpp
deleted file mode 100644
index f134a745d3b..00000000000
--- a/TAO/tests/Bug_2345_Regression/server.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id$
-
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/ImR_Client/ImR_Client.h"
-
-int main(int argc, char* argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB::_nil();
-
- // Initialize the ORB.
- //
- orb = CORBA::ORB_init(argc, argv);
- CORBA::Object_var poa_obj = orb->resolve_initial_references("RootPOA");
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow(poa_obj.in ());
-
- // Create a PERSISTENT POA
- //
- // Create the policy list
- CORBA::PolicyList policies(2);
- policies.length(2);
- policies[0] = root_poa->create_lifespan_policy(PortableServer::PERSISTENT);
- policies[1] = root_poa->create_id_assignment_policy(PortableServer::USER_ID);
-
- // create the poa.
- // for ORBUseIMR=1 -ORBDefaultInitRef corbaloc:iiop:<HOST>:<PORT>
- // this will cause an access violation if no IMR server is found.
- // The access violation WILL NOT HAPPEN if a POAManager is created and
- // given as a parameter to create_POA (instead of a nil POAManager)
- PortableServer::POA_var persistent_poa =
- root_poa->create_POA("myPoa", PortableServer::POAManager::_nil(), policies);
-
- return 0;
- }
- catch (CORBA::Exception&)
- {
- // ... normally print an error here
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc b/TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc
deleted file mode 100644
index 3d5cf5b5deb..00000000000
--- a/TAO/tests/Bug_2349_Regression/Bug_2349_Regression.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*server): taoserver, exceptions {
- idlflags += -Sa -St
- Source_Files {
- server.cpp
- }
-}
-
-project(*client): taoclient, exceptions {
- after += *Server
- Source_Files {
- fooC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2349_Regression/client.cpp b/TAO/tests/Bug_2349_Regression/client.cpp
deleted file mode 100644
index c4a618f29f2..00000000000
--- a/TAO/tests/Bug_2349_Regression/client.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id$
-
-#include "fooC.h"
-#include "ace/Log_Msg.h"
-
-const char* ior = "file://server.ior";
-
-int
-main (int argc, char** argv)
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var tmp = orb->string_to_object(ior);
-
- foo_var server = foo::_narrow(tmp.in ());
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil foo reference <%s>\n",
- ior),
- 1);
- }
-
- server->destroy ();
-
- server->shutdown ();
-
- orb->destroy ();
- }
- catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("CORBA::Exception");
- }
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2349_Regression/foo.idl b/TAO/tests/Bug_2349_Regression/foo.idl
deleted file mode 100644
index a31000cea9f..00000000000
--- a/TAO/tests/Bug_2349_Regression/foo.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface foo
-{
- oneway void destroy ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2349_Regression/run_test.pl b/TAO/tests/Bug_2349_Regression/run_test.pl
deleted file mode 100755
index 356e2015525..00000000000
--- a/TAO/tests/Bug_2349_Regression/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-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::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-$CL = new PerlACE::Process ("client");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (10);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2349_Regression/server.cpp b/TAO/tests/Bug_2349_Regression/server.cpp
deleted file mode 100644
index 9e3b0abce15..00000000000
--- a/TAO/tests/Bug_2349_Regression/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "fooS.h"
-#include "ace/OS_NS_stdio.h"
-
-const char* ior_output_file = "server.ior";
-
-class foo_i: public POA_foo
-{
-public:
- foo_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)) {
- }
-
- void shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void destroy ()
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-void
-foo_i::shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
-
-void
-foo_i::destroy ()
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- bool expected_exception_raised = false;
-
- ACE_TRY
- {
- // This should case an BAD_INV_ORDER exception
- this->orb_->destroy ();
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
- {
- if ((ex.minor() & 0xFFFU) == 3)
- {
- expected_exception_raised = true;
- }
- }
- ACE_ENDTRY;
-
- if (!expected_exception_raised)
- ACE_ERROR ((LM_ERROR, "ERROR: Caught incorrect exception\n"));
- else
- ACE_DEBUG ((LM_DEBUG, "Caught correct exception\n"));
-}
-
-
-int
-main (int argc, char** argv)
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var poa_object =
- orb->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 ();
-
- foo_i* server_impl = 0;
- ACE_NEW_RETURN (server_impl,
- foo_i (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(server_impl);
-
- foo_var server = server_impl->_this ();
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ());
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate ();
-
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
- }
- catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("CORBA::Exception");
- }
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc b/TAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc
deleted file mode 100755
index d428b0fce50..00000000000
--- a/TAO/tests/Bug_2375_Regression/Bug_2375_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Test) : taoserver, valuetype {
- exename = test
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2375_Regression/README b/TAO/tests/Bug_2375_Regression/README
deleted file mode 100755
index 97b642530a1..00000000000
--- a/TAO/tests/Bug_2375_Regression/README
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-A build only test to check that the c++ source produced from an IDL file with a valuetype factory in it compiles OK.
-
-If it builds it's passed.
diff --git a/TAO/tests/Bug_2375_Regression/test.cpp b/TAO/tests/Bug_2375_Regression/test.cpp
deleted file mode 100755
index 2a2d57db0e7..00000000000
--- a/TAO/tests/Bug_2375_Regression/test.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-#include "testC.h"
-class MyTestValuetypeFactory : public TestValuetype_init {
-public:
- virtual TestValuetype* create (::CORBA::Boolean, ::CORBA::Short) {return 0;};
- virtual TAO_OBV_CREATE_RETURN_TYPE (TestValuetype) create_for_unmarshal (void) {return 0;};
-};
-int main (int , char *[]) {
- MyTestValuetypeFactory myFactory;
- return 0;
-}
diff --git a/TAO/tests/Bug_2375_Regression/test.idl b/TAO/tests/Bug_2375_Regression/test.idl
deleted file mode 100755
index a6ee7413825..00000000000
--- a/TAO/tests/Bug_2375_Regression/test.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-valuetype TestValuetype {
- factory create(in boolean b, in short s);
-};
-
diff --git a/TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc b/TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc
deleted file mode 100644
index 6397809c1be..00000000000
--- a/TAO/tests/Bug_2399_Regression/Bug_2399_Regression.mpc
+++ /dev/null
@@ -1,11 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Test) : taoserver {
- exename = test
- idlflags += -t ./mytmp
-
- Source_Files {
- test.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2399_Regression/README b/TAO/tests/Bug_2399_Regression/README
deleted file mode 100644
index a4c048250b6..00000000000
--- a/TAO/tests/Bug_2399_Regression/README
+++ /dev/null
@@ -1,8 +0,0 @@
-# $Id$
-
-This is a build only test. A failure in the IDL compilation will probably indicate a regression.
-
-The IDL is compiled with a temporary file location specified using the -t parameter. The location is ./mytmp/.
-
-The file included.idl in ./mytmp/. is uncompilable - the test is intended to prove that it is not getting included instead of the correct included.idl (the one in *this* directory).
-
diff --git a/TAO/tests/Bug_2399_Regression/included.idl b/TAO/tests/Bug_2399_Regression/included.idl
deleted file mode 100644
index ed8e9a102a1..00000000000
--- a/TAO/tests/Bug_2399_Regression/included.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-interface Parent
-{
-};
diff --git a/TAO/tests/Bug_2399_Regression/mytmp/included.idl b/TAO/tests/Bug_2399_Regression/mytmp/included.idl
deleted file mode 100644
index df4a6fa7b06..00000000000
--- a/TAO/tests/Bug_2399_Regression/mytmp/included.idl
+++ /dev/null
@@ -1,3 +0,0 @@
-// $Id$
-
-This file should not be compiled at all.
diff --git a/TAO/tests/Bug_2399_Regression/test.cpp b/TAO/tests/Bug_2399_Regression/test.cpp
deleted file mode 100644
index 1b3f75330f2..00000000000
--- a/TAO/tests/Bug_2399_Regression/test.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-int
-main (int , char *[])
-{
- return 0;
-}
-
diff --git a/TAO/tests/Bug_2399_Regression/test.idl b/TAO/tests/Bug_2399_Regression/test.idl
deleted file mode 100644
index b0e1cbac672..00000000000
--- a/TAO/tests/Bug_2399_Regression/test.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-#include "included.idl"
-
-interface Child : Parent
-{
-};
diff --git a/TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc b/TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc
deleted file mode 100644
index 27d1cc5fd95..00000000000
--- a/TAO/tests/Bug_2417_Regression/Bug_2417_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging, threads {
- Source_Files {
- publisher_impl.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, threads {
- exename = client
- after += *Server
- Source_Files {
- subscriber_impl.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2417_Regression/client.cpp b/TAO/tests/Bug_2417_Regression/client.cpp
deleted file mode 100644
index df96fb1565d..00000000000
--- a/TAO/tests/Bug_2417_Regression/client.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id$
-
-#include "subscriber_impl.h"
-#include "publisherC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-class ThreadPool : public ACE_Task_Base
-{
-public:
- ThreadPool (CORBA::ORB_ptr orb);
- virtual int svc (void);
-private:
- CORBA::ORB_var orb_;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
- CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1);
-
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager();
-
- Subscriber_impl subscriber(orb.in ());
- Subscriber_var subscriber_var = subscriber._this();
-
- CORBA::Object_var object = orb->string_to_object("file://ior.out");
- Publisher_var publisher = Publisher::_narrow(object.in());
-
- publisher->subscribe(subscriber_var.in());
-
- poa_manager->activate();
-
- ThreadPool pool (orb.in ());
- if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot activate client threads\n"), 1);
-
- pool.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-ThreadPool::ThreadPool(CORBA::ORB_ptr orb)
-: orb_(CORBA::ORB::_duplicate (orb))
-{
-}
-
-int ThreadPool::svc (void)
-{
- try
- {
- this->orb_->run ();
- }
- catch (...)
- {
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2417_Regression/publisher.idl b/TAO/tests/Bug_2417_Regression/publisher.idl
deleted file mode 100644
index 51fb10a1e23..00000000000
--- a/TAO/tests/Bug_2417_Regression/publisher.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-#include "subscriber.idl"
-
-interface Publisher
-{
- void subscribe(in Subscriber _subscriber);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2417_Regression/publisher_impl.cpp b/TAO/tests/Bug_2417_Regression/publisher_impl.cpp
deleted file mode 100644
index 7c1084b7be0..00000000000
--- a/TAO/tests/Bug_2417_Regression/publisher_impl.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-// $Id$
-
-#include "publisher_impl.h"
-#include "ace/OS_NS_sys_time.h"
-#include "ace/Task.h"
-#include "ace/Process_Mutex.h"
-#include "ace/OS_NS_unistd.h"
-#include <vector>
-
-using namespace std;
-
-struct _Subscriber
-{
- Subscriber_var subscriber;
- bool unsubscribed;
- unsigned int count;
-};
-
-class Publisher_impl::Worker : public ACE_Task_Base
-{
-public:
- Worker(Publisher_impl * _owner);
- ~Worker();
- void addSubscriber(Subscriber_ptr subscriber);
- virtual int svc (void);
- void terminate();
-private:
- bool terminated;
- vector<_Subscriber> subscribers;
- ACE_Thread_Mutex mutex;
- Publisher_impl * owner;
-};
-
-Publisher_impl::Worker::Worker(Publisher_impl * _owner)
- : owner(_owner)
-{
- terminated = false;
-}
-
-Publisher_impl::Worker::~Worker()
-{
- terminated = true;
-}
-
-void Publisher_impl::Worker::addSubscriber(Subscriber_ptr subscriber)
-{
- ACE_Guard<ACE_Thread_Mutex> guard(mutex, 1, 1);
- subscribers.push_back(_Subscriber());
- _Subscriber& s = subscribers.back();
- s.unsubscribed = false;
- s.subscriber = Subscriber::_duplicate(subscriber);
- s.count = 0;
-}
-
-int Publisher_impl::Worker::svc (void)
-{
- double data = 0.0;
- bool doShutdown = false;
- unsigned long iteration = 0;
- ACE_Time_Value tv;
- tv.set(0.01);
- while (!terminated)
- {
- data += 0.01;
- ++iteration;
- {
- ACE_Guard<ACE_Thread_Mutex> guard(mutex, 1, 1);
- doShutdown = subscribers.size() > 0;
- for (vector<_Subscriber>::iterator iter = subscribers.begin();
- iter != subscribers.end(); ++iter)
- {
- if (!iter->unsubscribed)
- {
- doShutdown = false;
- try
- {
- if (!CORBA::is_nil(iter->subscriber.in ()))
- iter->subscriber->onData(data);
- else
- iter->unsubscribed = true;
- ++iter->count;
- }
- catch (...)
- {
- iter->unsubscribed = true;
- }
- }
- }
- }
- if (iteration % 200 == 0)
- {
- ACE_Guard<ACE_Thread_Mutex> guard(mutex, 1, 1);
- for (vector<_Subscriber>::iterator iter = subscribers.begin();
- iter != subscribers.end(); ++iter)
- {
- if (!iter->unsubscribed)
- {
- try
- {
- iter->subscriber->isAlive();
- }
- catch (...)
- {
- iter->unsubscribed = true;
- }
- }
- }
- }
- if (doShutdown)
- owner->shutdown();
- else
- ACE_OS::sleep(tv);
- }
- return 0;
-}
-
-void Publisher_impl::Worker::terminate()
-{
- terminated = true;
-}
-
-Publisher_impl::Publisher_impl(CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
- worker = new Worker(this);
- worker->activate();
-}
-
-Publisher_impl::~Publisher_impl()
-{
- worker->terminate();
- worker->thr_mgr()->wait();
- delete worker;
-}
-
-void subscribe (
- ::Subscriber_ptr subscriber
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
-void
-Publisher_impl::subscribe(
- ::Subscriber_ptr subscriber
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- worker->addSubscriber(subscriber);
-}
-
-void
-Publisher_impl::shutdown (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- this->orb_->shutdown (0);
- worker->terminate();
-}
diff --git a/TAO/tests/Bug_2417_Regression/publisher_impl.h b/TAO/tests/Bug_2417_Regression/publisher_impl.h
deleted file mode 100644
index 43a62ae54ac..00000000000
--- a/TAO/tests/Bug_2417_Regression/publisher_impl.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-
-#ifndef EXPLOIT_PUBLISHER_IMPL_H
-#define EXPLOIT_PUBLISHER_IMPL_H
-
-#include "publisherS.h"
-#include "subscriberC.h"
-
-class Publisher_impl : public POA_Publisher
-{
- public:
- Publisher_impl(CORBA::ORB_ptr orb);
- ~Publisher_impl();
-
- virtual void subscribe (
- ::Subscriber_ptr subscriber
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void shutdown (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- private:
- CORBA::ORB_var orb_;
- class Worker;
- friend class Worker;
- Worker * worker;
-};
-
-#endif
diff --git a/TAO/tests/Bug_2417_Regression/run_test.pl b/TAO/tests/Bug_2417_Regression/run_test.pl
deleted file mode 100755
index 21cd1ff1714..00000000000
--- a/TAO/tests/Bug_2417_Regression/run_test.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("ior.out");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-
-$CL1 = new PerlACE::Process ("client", "");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn ();
-
-$client = $CL1->WaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-$server = $SV->WaitKill (35);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status
diff --git a/TAO/tests/Bug_2417_Regression/server.cpp b/TAO/tests/Bug_2417_Regression/server.cpp
deleted file mode 100644
index 8a8ba4c1a2c..00000000000
--- a/TAO/tests/Bug_2417_Regression/server.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-#include "publisher_impl.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-class ThreadPool : public ACE_Task_Base
-{
-public:
- ThreadPool (CORBA::ORB_ptr orb);
- virtual int svc (void);
-private:
- CORBA::ORB_var orb_;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
- CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1);
-
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager();
-
- Publisher_impl publisher(orb.in ());
- Publisher_var publisher_var = publisher._this();
-
- CORBA::String_var ior = orb->object_to_string(publisher_var.in());
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in()));
-
- // output the ior
- FILE *output_file= ACE_OS::fopen ("ior.out", "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: ior.out"), 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate();
-
- const CORBA::Object_var pmobj ( orb->resolve_initial_references( "ORBPolicyManager" ) );
- CORBA::PolicyManager_var policy_manager = CORBA::PolicyManager::_narrow( pmobj.in() );
-
- CORBA::Any orb_level;
- orb_level <<= Messaging::SYNC_NONE;
- CORBA::PolicyList policy_list;
- policy_list.length(1);
- policy_list[0] = orb->create_policy(Messaging::SYNC_SCOPE_POLICY_TYPE, orb_level);
- policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE);
-
- ThreadPool pool (orb.in ());
- if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot activate client threads\n"), 1);
-
- pool.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-ThreadPool::ThreadPool(CORBA::ORB_ptr orb)
-: orb_(CORBA::ORB::_duplicate (orb))
-{
-}
-
-int ThreadPool::svc (void)
-{
- try
- {
- this->orb_->run ();
- }
- catch (...)
- {
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2417_Regression/subscriber.idl b/TAO/tests/Bug_2417_Regression/subscriber.idl
deleted file mode 100644
index 4bc284d2979..00000000000
--- a/TAO/tests/Bug_2417_Regression/subscriber.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-interface Subscriber
-{
- oneway void onData(in double value);
- boolean isAlive();
-};
diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
deleted file mode 100644
index 61f25e23349..00000000000
--- a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-#include "subscriber_impl.h"
-#include "ace/OS_NS_stdio.h"
-
-Subscriber_impl::Subscriber_impl(CORBA::ORB_ptr orb)
-: orb_ (CORBA::ORB::_duplicate (orb))
-, count(0)
-{
-}
-
-Subscriber_impl::~Subscriber_impl()
-{
-}
-
-void
-Subscriber_impl::onData (
- ::CORBA::Double
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- ++count;
- if (count > 100)
- shutdown();
-}
-
-::CORBA::Boolean
-Subscriber_impl::isAlive (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- return true;
-}
-
-void Subscriber_impl::shutdown()
-{
- this->orb_->shutdown (0);
-}
-
diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.h b/TAO/tests/Bug_2417_Regression/subscriber_impl.h
deleted file mode 100644
index 4b37f8f7529..00000000000
--- a/TAO/tests/Bug_2417_Regression/subscriber_impl.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id$
-
-#ifndef EXPLOIT_PUBLISHER_IMPL_H
-#define EXPLOIT_PUBLISHER_IMPL_H
-
-#include "subscriberS.h"
-
-class Subscriber_impl : public POA_Subscriber
-{
- public:
- Subscriber_impl(CORBA::ORB_ptr orb);
- ~Subscriber_impl();
-
- virtual void onData (
- ::CORBA::Double value
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
- virtual ::CORBA::Boolean isAlive (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- void shutdown();
- private:
- CORBA::ORB_var orb_;
- unsigned int count;
-};
-
-#endif
diff --git a/TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc b/TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc
deleted file mode 100644
index 073f1f25679..00000000000
--- a/TAO/tests/Bug_2419_Regression/Bug_2419_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Client) : taoserver, messaging {
- exename = client
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2419_Regression/README b/TAO/tests/Bug_2419_Regression/README
deleted file mode 100644
index 0adb564c7ae..00000000000
--- a/TAO/tests/Bug_2419_Regression/README
+++ /dev/null
@@ -1,3 +0,0 @@
-// $Id$
-
-This is a build only test - if it compiles it passes. See the bugzilla ticket for details.
diff --git a/TAO/tests/Bug_2419_Regression/abstract_parent.idl b/TAO/tests/Bug_2419_Regression/abstract_parent.idl
deleted file mode 100644
index 84e5521f296..00000000000
--- a/TAO/tests/Bug_2419_Regression/abstract_parent.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-abstract interface abstract_parent
-{
- void method (in abstract_parent aParent);
-};
diff --git a/TAO/tests/Bug_2419_Regression/client.cpp b/TAO/tests/Bug_2419_Regression/client.cpp
deleted file mode 100644
index 326096e87fa..00000000000
--- a/TAO/tests/Bug_2419_Regression/client.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "local_childS.h"
-
-int main (int, char*[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_2419_Regression/local_child.idl b/TAO/tests/Bug_2419_Regression/local_child.idl
deleted file mode 100644
index f993399b138..00000000000
--- a/TAO/tests/Bug_2419_Regression/local_child.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-#include "abstract_parent.idl"
-
-local interface local_child : abstract_parent
-{
-};
diff --git a/TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc b/TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc
deleted file mode 100644
index 72053dc671f..00000000000
--- a/TAO/tests/Bug_2424_Regression/Bug_2424_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-project (*Client) : taoserver {
- exename = client
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl b/TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl
deleted file mode 100644
index 0e5d486d864..00000000000
--- a/TAO/tests/Bug_2424_Regression/OneLineCosNaming.idl
+++ /dev/null
@@ -1,2 +0,0 @@
-// $Id$
-/** * CORBA Common Object Services: Naming Service. * <p> * The detailed specification is available from the * <a href="http://www.omg.org">Object Management Group</a>. * * @author OMG * @version Version 00-11-01 */ module CosNaming { typedef string Istring; struct NameComponent { Istring id; Istring kind; }; typedef sequence <NameComponent> Name; enum BindingType { nobject, ncontext }; struct Binding { Name binding_name; BindingType binding_type; }; typedef sequence <Binding> BindingList; interface BindingIterator; /** * The NamingContext interface provides operations which support the following: * <ul> * <li> binding objects * <li> name resolution * <li> unbinding * <li> creating naming contexts * <li> deleting contexts * <li> listing a naming context * </ul> */ interface NamingContext { enum NotFoundReason { missing_node, not_context, not_object }; /** * Indicates the name does not identify a binding. */ exception NotFound { NotFoundReason why; Name rest_of_name; }; /** * Indicates that the implementation has given up for some reason. The * client, however, may be able to continue the operation at the returned * naming context. */ exception CannotProceed { NamingContext cxt; Name rest_of_name; }; /** * Indicates the name is invalid. (A name of length 0 is invalid; * implementations may place other restrictions on names.) */ exception InvalidName {}; /** * Indicates an object is already bound to the specified name. Only one * object can be bound to a particular name in a context. */ exception AlreadyBound {}; /** * Indicates that a naming context has bindings. */ exception NotEmpty {}; /** * Creates a binding of a name and an object in the naming * context. Naming contexts that are bound using bind do not * participate in name resolution when compound names are passed to be * resolved. A bind operation that is passed a compound name is * defined as follows: * * <pre> * ctx->bind(< c1 ; c2 ; ... ; cn >, obj) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind(< cn >, obj) * </pre> * * @parm n - binding name. * @parm obj - object to bind. * @raises AlreadyBound - if the name is bound in the context. */ void bind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName, AlreadyBound); /** * Creates a binding of a name and an object in the naming context * even if the name is already bound in the context. Naming contexts * that are bound using rebind do not participate in name resolution * when compound names are passed to be resolved. * * @parm n - binding name. * @parm obj - object to bind. */ void rebind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName); /** * Names an object that is a naming context. Naming contexts that are * bound using bind_context() participate in name resolution when * compound names are passed to be resolved. A bind_context operation * that is passed a compound name is defined as follows: * <pre> * ctx->bind_context(< c1 ; c2 ; ... ; cn >, nc) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind_context(< cn >, nc) * </pre> * * @parm n - binding name. * @parm nc - naming context to bind. * @raises AlreadyBound - if the name is bound in the context. */ void bind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName, AlreadyBound); /** * Creates a binding of a name and a naming context in the naming * context even if the name is already bound in the context. Naming * contexts that are bound using rebind_context() participate in name * resolution when compound names are passed to be resolved. * * @parm n - binding name. * @parm nc - naming context to bind. */ void rebind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName); /** * The resolve operation is the process of retrieving an object bound * to a name in a given context. The given name must exactly match the * bound name. The naming service does not return the type of the * object. Clients are responsible for "narrowing" the object to the * appropriate type. That is, clients typically cast the returned * object from Object to a more specialized interface. Names can have * multiple components; therefore, name resolution can traverse * multiple contexts. * A compound resolve is defined as follows: * <pre> * ctx->resolve(< c1 ; c2 ; ... ; cn >) := * ctx->resolve(< c1 ; c2 ; ... ; cn-1 >)->resolve(< cn >) * </pre> * * @parm n - binding name. * @returns bound object. */ Object resolve (in Name n) raises (NotFound, CannotProceed, InvalidName); /** * The unbind operation removes a name binding from a context. * A unbind operation that is passed a compound name is defined as follows: * <pre> * ctx->unbind(< c1 ; c2 ; ... ; cn >) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->unbind(< cn >) * </pre> * * @parm n - binding name. */ void unbind (in Name n) raises (NotFound, CannotProceed, InvalidName); /** * This operation returns a naming context implemented by the same * naming server as the context on which the operation was * invoked. The new context is not bound to any name. * * @returns new binding context. */ NamingContext new_context (); /** * This operation creates a new context and binds it to the name * supplied as an argument. The newly-created context is implemented * by the same naming server as the context in which it was bound * (that is, the naming server that implements the context denoted by * the name argument excluding the last component). A bind_new_context * that is passed a compound name is defined as follows: * * <pre> * ctx->bind_new_context(< c1 ; c2 ; ... ; cn >) := * (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind_new_context(< cn >) * </pre> * * @parm n - binding name. * @returns new binding context. * @raises AlreadyBound - if the name is bound in the context. */ NamingContext bind_new_context (in Name n) raises (NotFound, CannotProceed, InvalidName, AlreadyBound); /** * The destroy operation deletes a naming context. The list operation * allows a client to iterate through a set of bindings in a naming * context. * * @raises NotEmpty - if the naming context contains bindings. */ void destroy () raises (NotEmpty); /** * The list operation returns at most the requested number of bindings in * BindingList bl. * <ul> * <li> If the naming context contains additional bindings, the list * operation returns a BindingIterator with the additional bindings. * <li> If the naming context does not contain additional bindings, the * binding iterator is a nil object reference. * </ul> * * @parm how_many - maximum number of binding to return in bl. * @parm bl - list of bindings. * @parm bi - iterator over remaining bindings. */ void list (in unsigned long how_many, out BindingList bl, out BindingIterator bi); }; /** * The BindingIterator interface allows a client to iterate through the * bindings using the next_one or next_n operations. */ interface BindingIterator { /** * This operation returns the next binding. If there are no more * bindings, false is returned. * * @parm b - next binding. */ boolean next_one (out Binding b); /** * This operation returns at most the requested number of bindings. * * @parm how_many - maximum number of binding to return in bl. * @parm bl - list of bindings. */ boolean next_n (in unsigned long how_many, out BindingList bl); /** * This operation destroys the iterator. */ void destroy (); }; /** * The NamingContextExt Interface provides the extensions to the * NamingContext Interface as proposed by the Interoperable * Naming Service Extension. */ interface NamingContextExt: NamingContext { typedef string StringName; typedef string Address; typedef string URLString; /** * This operation accepts a Name and returns a stringified Name. * * @param n - Name (a sequence of NameComponents) * @raises InvalidName - if the Name is invalid. */ StringName to_string (in Name n) raises (InvalidName); /** * This operation accepts a StringifiedName and returns a Name. * * @param n - a StringifiedName * @raises InvalidName - if the Name is invalid. */ Name to_name (in StringName sn) raises (InvalidName); /** * Indicates a syntactically invalid address component. */ exception InvalidAddress {}; /** * This operation accepts a URL address component and a stringified * name and returns a URL string. * * @param n - a Stringified name. * @raises addr - URL address component. */ URLString to_url (in Address addr, in StringName sn) raises (InvalidAddress, InvalidName); /** * This is a convenience operation that performs a resolve in the same * manner as NamingContext::resolve. * * @param n - a Stringified name. * @raises NotFound, CannotProceed, InvalidName */ Object resolve_str (in StringName n) raises (NotFound, CannotProceed, InvalidName); }; };
diff --git a/TAO/tests/Bug_2424_Regression/README b/TAO/tests/Bug_2424_Regression/README
deleted file mode 100644
index a0e0c8a1dad..00000000000
--- a/TAO/tests/Bug_2424_Regression/README
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-This is a compile only test to check that the IDL compiler can deal with IDL containing unfeasibly long lines. If it builds - it's passed.
-
-The file OneLineCosNaming.idl is the complete IDL for the Naming Service, including comments, with all the newlines removed.
diff --git a/TAO/tests/Bug_2424_Regression/client.cpp b/TAO/tests/Bug_2424_Regression/client.cpp
deleted file mode 100644
index 4bca89b3009..00000000000
--- a/TAO/tests/Bug_2424_Regression/client.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "OneLineCosNamingC.h"
-
-int main (int, char*[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc b/TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc
deleted file mode 100644
index 27af500c3e6..00000000000
--- a/TAO/tests/Bug_2429_Regression/Bug_2429_Regression.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server) : taoserver, messaging {
- exename = server
- idlflags += -Ge 1 -GC
-
- Source_Files {
- server.cpp
- ChildServant.cpp
- }
-}
-
-project(*Client) : taoclient, messaging {
- exename = client
- idlflags += -Ge 1 -GC
-
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2429_Regression/Child.idl b/TAO/tests/Bug_2429_Regression/Child.idl
deleted file mode 100644
index 166b36367ce..00000000000
--- a/TAO/tests/Bug_2429_Regression/Child.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "Parent.idl"
-
-interface Child : Parent
-{
- void childMethod ();
-};
diff --git a/TAO/tests/Bug_2429_Regression/ChildServant.cpp b/TAO/tests/Bug_2429_Regression/ChildServant.cpp
deleted file mode 100644
index f6617bc55d9..00000000000
--- a/TAO/tests/Bug_2429_Regression/ChildServant.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-#include "ChildServant.h"
-
-ChildServant::ChildServant(CORBA::ORB_ptr orb)
-: orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-void
-ChildServant::childMethod ()
-ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No-op
-}
-
-void
-ChildServant::parentMethod ()
-ACE_THROW_SPEC((CORBA::SystemException))
-{
- // Just throw an exception
- ACE_THROW (CORBA::INTERNAL ());
-}
-
-void
-ChildServant::shutdown ()
-ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2429_Regression/ChildServant.h b/TAO/tests/Bug_2429_Regression/ChildServant.h
deleted file mode 100644
index 55d601d3cc0..00000000000
--- a/TAO/tests/Bug_2429_Regression/ChildServant.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef CHILDSERVANT_H
-#define CHILDSERVANT_H
-
-// $Id$
-
-#include "ChildS.h"
-
-class ChildServant
- : public virtual POA_Child
-{
- public:
- ChildServant (CORBA::ORB_ptr orb);
- virtual void parentMethod ()
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void childMethod ()
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
- CORBA::ORB_var orb_;
-};
-
-#endif
diff --git a/TAO/tests/Bug_2429_Regression/Parent.idl b/TAO/tests/Bug_2429_Regression/Parent.idl
deleted file mode 100644
index b142f1939e3..00000000000
--- a/TAO/tests/Bug_2429_Regression/Parent.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface Parent
-{
- void parentMethod ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2429_Regression/README b/TAO/tests/Bug_2429_Regression/README
deleted file mode 100644
index f5f06b3dffb..00000000000
--- a/TAO/tests/Bug_2429_Regression/README
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Id$
-
-This test makes a call via AMI and then waits to receive a call back. The server throws an exception so the client expects to receive that. The method called is a method inherited from a parent interface (parentMethod).
-
-_Expected Success Result_
-
-Successfully received an Internal Excep*ion as expected.
-event loop finished
-
-_Regression Result_
-
-_Perfect_Hash_OpTable:find for operation 'parentMethod_excep' (length=18) failed
-ERROR: /home/sm/bugs/tao321/client timedout
-ERROR: Regression - Non zero result from client or client timed out.
-
-
diff --git a/TAO/tests/Bug_2429_Regression/client.cpp b/TAO/tests/Bug_2429_Regression/client.cpp
deleted file mode 100644
index ded3a38e9d6..00000000000
--- a/TAO/tests/Bug_2429_Regression/client.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "tao/Messaging/Messaging.h"
-#include "ChildS.h"
-
-class Reply_Handler
- : public POA_AMI_ChildHandler
-{
- public:
- Reply_Handler()
- : parentMethod_count (0),
- parentMethod_excep_count (0)
- {
- }
-
- virtual void
- childMethod (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- }
-
- virtual void
- childMethod_excep (Messaging::ExceptionHolder *
- excep_holder ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_TRY
- {
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Reply_Handler::childMethod_excep: ");
- }
- ACE_ENDTRY;
- }
-
- virtual void
- parentMethod (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "client: parentMethod reply %d @ %T\n",
- ++parentMethod_count));
-
- }
-
- virtual void
- parentMethod_excep (Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_TRY
- {
- ++parentMethod_excep_count;
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::INTERNAL, iex)
- {
- ACE_DEBUG ((LM_DEBUG, "Successfully received an Internal Excep*ion as expected.\n"));
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Reply_Handler::childMethod_excep: ");
- }
- ACE_ENDTRY;
- }
-
- CORBA::ULong reply_count (void) { return parentMethod_count + parentMethod_excep_count; };
-
- private:
- // Count of replies and excep
- CORBA::ULong parentMethod_count;
- CORBA::ULong parentMethod_excep_count;
-};
-
-// Server ior.
-static const char * server_ior = "file://server.ior";
-
-static int
-client_parse_args(int argc, char *argv[])
-{
- ACE_Get_Opt
- get_opts(argc, argv, "f:");
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'f':
- server_ior = get_opts.opt_arg();
- break;
- case '?':
- default:
- ACE_DEBUG((LM_ERROR,
- "usage: %s "
- "-f server IOR file\n"));
- return 1;
- }
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main(int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- CORBA::ORB_var orb;
-
- ACE_TRY
- {
- // Initialize the ORB.
- orb = CORBA::ORB_init(argc, argv, 0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize options based on command-line arguments.
- int parse_args_result = client_parse_args(argc, argv);
- if (parse_args_result != 0)
- {
- return 1;
- }
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get an object reference from the nominated file
- object = orb->string_to_object (server_ior);
-
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Child_var child = Child::_narrow (object.in() ACE_ENV_ARG_PARAMETER);
-
- Reply_Handler reply_handler_servant;
-
- AMI_ChildHandler_var reply_handler_object =
- reply_handler_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke the AMI parentMethod
- child->sendc_parentMethod (reply_handler_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Loop until all replies have been received.
- while (reply_handler_servant.reply_count () == 0)
- {
- orb->perform_work ();
- }
-
- // Shutdown server.
- child->shutdown ();
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2429_Regression/run_test.pl b/TAO/tests/Bug_2429_Regression/run_test.pl
deleted file mode 100755
index 542e46da4ff..00000000000
--- a/TAO/tests/Bug_2429_Regression/run_test.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-#$Id$
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-unlink $server_ior_file;
-
-# The client and server processes
-$SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-$SERVER->Arguments("-o $server_ior_file");
-
-# Fire up the server
-$SERVER->Spawn();
-
-# We can wait on the IOR file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-$CLIENT->Arguments("-f file://$server_ior_file");
-if ($CLIENT->SpawnWaitKill (10) != 0)
-{
- print STDERR "ERROR: Regression - Non zero result from client or client timed out.\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-unlink $server_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_2429_Regression/server.cpp b/TAO/tests/Bug_2429_Regression/server.cpp
deleted file mode 100644
index 8059c43febb..00000000000
--- a/TAO/tests/Bug_2429_Regression/server.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id$
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ChildServant.h"
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- ChildServant servant (orb.in ());
-
- Child_var server =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc b/TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc
deleted file mode 100644
index 0360d9e7fd1..00000000000
--- a/TAO/tests/Bug_2494_Regression/Bug_2494_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sc -St
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- idlflags += -Sc -St
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Bug_2494_Regression/README b/TAO/tests/Bug_2494_Regression/README
deleted file mode 100644
index 726419360b1..00000000000
--- a/TAO/tests/Bug_2494_Regression/README
+++ /dev/null
@@ -1,34 +0,0 @@
-# $Id$
-
-Description:
-
- This test a modification of MT_Server. In this case the client is also
-multi-threaded. The client sends very large strings to the server, which it
-echoes back, for the sake of keeping the server busy doing I/O. When the
-client is abruptly killed, the server should close the connection and continue
-running.
-
-Expected output:
- The server prints out the IOR of the object it serves and the
-results of server shutdown (aborted or shutdown cleanly).
-
- Regression:
-Activated as
-<IOR:012a2a2a1600000049444c3a53696d706c655f5365727665723a312e30002a2a0100000000000000740000000101022a130000006f6369313332392e6f63697765622e636f6d002a19842a2a1b00000014010f0052535420c93244520b04000000000001000000010000002a020000000000000008000000012a2a2a004f41540100000018000000012a2a2a0100010001000000010001050901010000000000>
-***Client has been killed***
-ACE_ASSERT (32395|3067820976): file Transport.cpp, line 172 assertion
-failed for 'this->head_ == 0'.Aborting...
-ERROR: cannot find file
-</tao_builds/mitza/1.4a/ACE_wrappers/TAO/tests/Bug_2494_Regression/server_terminated>
--- server has not shut down cleanly.
-(perl script returns 1)
-
- Correct run:
-Activated as
-<IOR:012a2a2a1600000049444c3a53696d706c655f5365727665723a312e30002a2a0100000000000000740000000101022a130000006f6369313332392e6f63697765622e636f6d002a34842a2a1b00000014010f0052535488d03244438d04000000000001000000010000002a020000000000000008000000012a2a2a004f41540100000018000000012a2a2a0100010001000000010001050901010000000000>
-***Client has been killed***
-event loop finished
-(perl script returns 0)
-
-How to run:
- Use the run_test.pl script to run it.
diff --git a/TAO/tests/Bug_2494_Regression/client.cpp b/TAO/tests/Bug_2494_Regression/client.cpp
deleted file mode 100644
index 25d1df2ae3d..00000000000
--- a/TAO/tests/Bug_2494_Regression/client.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_string.h"
-#include "testC.h"
-
-ACE_RCSID(Bug_2494_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int nthreads = 5;
-int do_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "[-n <nthreads> | -x]"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-namespace
-{
- const char *twohundredbytes =
- "12345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890"
- ;
-}
-
-struct Worker : ACE_Task_Base
-{
-
- Worker (Simple_Server_ptr srv)
- : srv_(Simple_Server::_duplicate(srv))
- {
- }
-
- Simple_Server_var srv_;
-
- int svc ()
- {
- char* str = CORBA::string_alloc (200*2000 + 1);
- if (!str) return 1;
- str[0] = CORBA::Char('\0');
- for (int i=0; i < 2000; ++i)
- {
- ACE_OS::strcat(str, twohundredbytes);
- }
-
- while (1)
- {
- try
- {
- const char *ret = srv_->test_method (str);
- ACE_TRY_CHECK;
- if (0 != ACE_OS::strcmp (str, ret)) return 1;
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Exception caught: \n%s\n"),
- ACE_TEXT_CHAR_TO_TCHAR (ex._info ().c_str ())));
- return 1;
- }
- }
- return 0;
- }
-
-};
-
-int
-main (int argc, char *argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object = orb->string_to_object (ior);
-
- Simple_Server_var server = Simple_Server::_narrow (object.in ());
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior), 1);
- }
-
- if (do_shutdown)
- {
- server->shutdown ();
- }
- else
- {
- Worker wrk (server.in ());
- wrk.activate (THR_NEW_LWP|THR_JOINABLE|THR_INHERIT_SCHED, nthreads);
- wrk.thr_mgr ()->wait ();
- }
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR, ACE_TEXT ("(%P|%t) Exception caught: \n%s\n"),
- ACE_TEXT_CHAR_TO_TCHAR (ex._info ().c_str ())));
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2494_Regression/run_test.pl b/TAO/tests/Bug_2494_Regression/run_test.pl
deleted file mode 100755
index 1183cac469c..00000000000
--- a/TAO/tests/Bug_2494_Regression/run_test.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$srv_threads = '4';
-$cli_threads = '30';
-$iorfile = PerlACE::LocalFile ("test.ior");
-$srvdownfile = PerlACE::LocalFile ("server_terminated");
-
-unlink $iorfile;
-unlink $srvdownfile;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile -n $srv_threads");
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -n $cli_threads");
-$CLS = new PerlACE::Process ("client", "-k file://$iorfile -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL->Spawn ();
-#Client will not terminate on its own, kill it after 30 seconds
-$CL->TimedWait (30);
-$CL->Kill (1);
-#The parameter '1' (above) indicates that an error return value should not
-#cause this test to fail.
-
-print "***Client has been killed***\n";
-
-#Server should still be running at this point, now start the client that asks
-#the server to shut itself down
-
-$client = $CLS->SpawnWaitKill (5);
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-#Server should now be shut down
-if (PerlACE::waitforfile_timed ($srvdownfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$srvdownfile>".
- " -- server has not shut down cleanly.\n";
- $SV->Kill ();
- exit 1;
-}
-
-$server = $SV->WaitKill (1);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-unlink $srvdownfile;
-
-exit $status
diff --git a/TAO/tests/Bug_2494_Regression/server.cpp b/TAO/tests/Bug_2494_Regression/server.cpp
deleted file mode 100644
index 8a87e86c160..00000000000
--- a/TAO/tests/Bug_2494_Regression/server.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(Bug_2494_Regression, server, "$Id$")
-
-const char *ior_output_file = "file://test.ior";
-int nthreads = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Worker : public ACE_Task_Base
-{
- // = TITLE
- // Run a server thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run server threads
- //
-public:
- Worker (CORBA::ORB_ptr orb);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-int
-main (int argc, char *argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ());
-
- PortableServer::POAManager_var poa_manager = root_poa->the_POAManager ();
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server = server_impl._this ();
-
- CORBA::String_var ior = orb->object_to_string (server.in ());
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate ();
-
- Worker worker (orb.in ());
- if (worker.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- worker.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- const char *fname = "server_terminated";
- FILE *output_file= ACE_OS::fopen (fname, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing: ",
- fname),
- 1);
- ACE_OS::fprintf (output_file, "%s", "OK\n");
- ACE_OS::fclose (output_file);
- }
- catch (CORBA::Exception& ex)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
-
- return 0;
-}
-
-// ****************************************************************
-
-Worker::Worker (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker::svc (void)
-{
- try
- {
- this->orb_->run ();
- }
- catch (CORBA::Exception&)
- {
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_2494_Regression/test.idl b/TAO/tests/Bug_2494_Regression/test.idl
deleted file mode 100644
index 335009e627f..00000000000
--- a/TAO/tests/Bug_2494_Regression/test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server
-{
- string test_method (in string str);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2494_Regression/test_i.cpp b/TAO/tests/Bug_2494_Regression/test_i.cpp
deleted file mode 100644
index bfccb378f26..00000000000
--- a/TAO/tests/Bug_2494_Regression/test_i.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_unistd.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.inl"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(Bug_2494_Regression, test_i, "$Id$")
-
-char *
-Simple_Server_i::test_method (const char *x)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n"));
- ACE_Time_Value tv (2);
- ACE_OS::sleep (tv);
- return CORBA::string_dup(x);
-}
-
-void
-Simple_Server_i::shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/Bug_2494_Regression/test_i.h b/TAO/tests/Bug_2494_Regression/test_i.h
deleted file mode 100644
index cd8971dc7a6..00000000000
--- a/TAO/tests/Bug_2494_Regression/test_i.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id$
-
-#ifndef TAO_BUG_2494_REGRESSION_TEST_I_H
-#define TAO_BUG_2494_REGRESSION_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- char *test_method (const char *x)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown ()
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.inl"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_BUG_2494_REGRESSION_TEST_I_H */
diff --git a/TAO/tests/Bug_2494_Regression/test_i.inl b/TAO/tests/Bug_2494_Regression/test_i.inl
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/Bug_2494_Regression/test_i.inl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/Bug_2503_Regression/Bug_2503_Regression.mpc b/TAO/tests/Bug_2503_Regression/Bug_2503_Regression.mpc
deleted file mode 100644
index 8541c4b3c74..00000000000
--- a/TAO/tests/Bug_2503_Regression/Bug_2503_Regression.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): messaging, taoserver, exceptions, ami {
- Source_Files {
- test_i.cpp
- common.cpp
- server.cpp
- }
-}
-
-project(*Client): messaging, taoexe, portableserver, exceptions, ami {
- after += *Server
- Source_Files {
- test_i.cpp
- common.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2503_Regression/Test.idl b/TAO/tests/Bug_2503_Regression/Test.idl
deleted file mode 100644
index f1988af976b..00000000000
--- a/TAO/tests/Bug_2503_Regression/Test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface Test
-{
- void the_operation(out long x);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Bug_2503_Regression/client.cpp b/TAO/tests/Bug_2503_Regression/client.cpp
deleted file mode 100644
index 67bbc811fcd..00000000000
--- a/TAO/tests/Bug_2503_Regression/client.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "common.h"
-#include "ace/Get_Opt.h"
-
-void parse_args(int argc, char * argv[]);
-void test_remote_calls(CORBA::ORB_ptr orb);
-void test_colocated_calls(CORBA::ORB_ptr orb);
-
-int
-main(int argc, char * argv[])
-{
- try
- {
- ACE_DEBUG ((LM_DEBUG, "Starting client\n"));
- CORBA::ORB_var orb = initialize_orb_and_poa(argc, argv);
-
- parse_args(argc, argv);
-
- ACE_DEBUG ((LM_DEBUG, "Testing remote\n"));
- test_remote_calls(orb.in());
-
- ACE_DEBUG ((LM_DEBUG, "Testing colocated\n"));
- test_colocated_calls(orb.in());
-
- ACE_DEBUG ((LM_DEBUG, "Testing ready\n"));
- }
- catch(...)
- {
- report_exception();
- return 1;
- }
-
- return 0;
-}
-
-const char *ior_argument = "file://test.ior";
-int niterations = 100;
-
-void
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 'k':
- ior_argument = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- throw "Usage: [-k ior] [-i iteration_count]";
- }
- }
-}
-
-void test_impl(
- CORBA::ORB_ptr orb,
- char const * ior,
- bool shutdown)
-{
- CORBA::Object_var object = orb->string_to_object(ior);
- Test_var test = Test::_narrow(object.in());
-
- if(CORBA::is_nil(test.in()))
- {
- throw "Nil reference after narrow";
- }
-
- for(int i = 0; i != niterations; ++i)
- {
- test->sendc_the_operation(AMI_TestHandler::_nil());
- }
-
- ACE_Time_Value wait_for_responses_interval(1, 0);
- orb->run(wait_for_responses_interval);
-
- if (shutdown)
- test->shutdown ();
-}
-
-void test_remote_calls(CORBA::ORB_ptr orb)
-{
- test_impl(orb, ior_argument, true);
-}
-
-void test_colocated_calls(CORBA::ORB_ptr orb)
-{
- test_i servant (orb);
- CORBA::String_var ior =
- servant.create_and_activate_server();
-
- test_impl(orb, ior.in(), false);
-}
diff --git a/TAO/tests/Bug_2503_Regression/common.cpp b/TAO/tests/Bug_2503_Regression/common.cpp
deleted file mode 100644
index c295a6eb141..00000000000
--- a/TAO/tests/Bug_2503_Regression/common.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-#include "common.h"
-#include "tao/PortableServer/PortableServer.h"
-
-CORBA::ORB_ptr
-initialize_orb_and_poa(int & argc, char * argv[])
-{
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ());
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager ();
-
- poa_manager->activate ();
-
- return orb._retn();
-}
-
-void report_exception()
-{
- try
- {
- throw;
- }
- catch(CORBA::Exception & ex)
- {
- ACE_PRINT_EXCEPTION (ex, "CORBA Exception raised:");
- }
- catch(char const * msg)
- {
- ACE_ERROR ((LM_ERROR, "Exception (char const*) raised: %s\n",
- msg));
- }
- catch(...)
- {
- ACE_ERROR ((LM_ERROR, "Unknown exception raised\n"));
- }
-}
diff --git a/TAO/tests/Bug_2503_Regression/common.h b/TAO/tests/Bug_2503_Regression/common.h
deleted file mode 100644
index f4c08c7035f..00000000000
--- a/TAO/tests/Bug_2503_Regression/common.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-
-#ifndef common_h
-#define common_h
-
-#include "tao/ORB.h"
-
-CORBA::ORB_ptr initialize_orb_and_poa(int & argc, char * argv[]);
-void report_exception();
-
-#endif // common_h
-
diff --git a/TAO/tests/Bug_2503_Regression/run_test.pl b/TAO/tests/Bug_2503_Regression/run_test.pl
deleted file mode 100755
index 8df523760ef..00000000000
--- a/TAO/tests/Bug_2503_Regression/run_test.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBDebugLevel 10");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2503_Regression/server.cpp b/TAO/tests/Bug_2503_Regression/server.cpp
deleted file mode 100644
index 558335e4e37..00000000000
--- a/TAO/tests/Bug_2503_Regression/server.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "common.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-void parse_args(int argc, char * argv[]);
-void write_ior_to_file(char const * ior);
-
-int
-main(int argc, char * argv[])
-{
- try
- {
- CORBA::ORB_var orb = initialize_orb_and_poa(argc, argv);
-
- parse_args(argc, argv);
-
- test_i servant (orb.in());
- CORBA::String_var ior =
- servant.create_and_activate_server();
-
- write_ior_to_file(ior.in());
-
- orb->run();
- }
- catch(...)
- {
- report_exception();
- return 1;
- }
- return 0;
-}
-
-namespace
-{
-const char *ior_output_file = "test.ior";
-}
-
-void
-parse_args(int argc, char * argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- throw "Usage: server [-o iorfile]\n";
- }
- }
-}
-
-void write_ior_to_file(char const * ior)
-{
- if (ior_output_file == 0)
- {
- return;
- }
-
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- {
- throw "Cannot open output file to write the IOR";
- }
-
- ACE_OS::fprintf (output_file, "%s", ior);
- ACE_OS::fclose (output_file);
-}
diff --git a/TAO/tests/Bug_2503_Regression/test_i.cpp b/TAO/tests/Bug_2503_Regression/test_i.cpp
deleted file mode 100644
index c610f1d4768..00000000000
--- a/TAO/tests/Bug_2503_Regression/test_i.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#include "tao/Utils/Servant_Var.h"
-
-test_i::
-test_i(CORBA::ORB_ptr orb)
-{
- this->orb_ = CORBA::ORB::_duplicate (orb);
-}
-
-void test_i::
-the_operation(CORBA::Long & x)
- throw(CORBA::SystemException)
-{
- x = 42;
-}
-
-char *
-test_i::
-create_and_activate_server()
-{
- TAO::Utils::Servant_Var<test_i> impl(
- new test_i (this->orb_.in ()));
-
- Test_var ref = impl->_this();
-
- return this->orb_->object_to_string(ref.in());
-}
-
-void
-test_i::shutdown (void)
- throw (CORBA::SystemException)
-{
- if (!CORBA::is_nil (this->orb_.in ()))
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/Bug_2503_Regression/test_i.h b/TAO/tests/Bug_2503_Regression/test_i.h
deleted file mode 100644
index 9c5f2e07fa3..00000000000
--- a/TAO/tests/Bug_2503_Regression/test_i.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// $Id$
-
-#ifndef test_i_h
-#define test_i_h
-
-#include "TestS.h"
-
-class test_i
- : public POA_Test
-{
-public:
- test_i(CORBA::ORB_ptr);
-
- virtual void the_operation(CORBA::Long & x)
- throw(CORBA::SystemException);
-
- virtual void shutdown (void)
- throw (CORBA::SystemException);
-
- char * create_and_activate_server(void);
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif // test_i_h
diff --git a/TAO/tests/Bug_2542_Regression/Bug_2542_Regression.mpc b/TAO/tests/Bug_2542_Regression/Bug_2542_Regression.mpc
deleted file mode 100644
index 5c0d4c58398..00000000000
--- a/TAO/tests/Bug_2542_Regression/Bug_2542_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project : taoclient, anytypecode, codecfactory, valuetype {
- Source_Files {
- bug_2542_regression.cpp
- }
-}
diff --git a/TAO/tests/Bug_2542_Regression/Test.idl b/TAO/tests/Bug_2542_Regression/Test.idl
deleted file mode 100644
index fbb96883a37..00000000000
--- a/TAO/tests/Bug_2542_Regression/Test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-// $Id$
-
-valuetype LongValue long;
-
-valuetype Value
-{
- public LongValue l;
-};
-
diff --git a/TAO/tests/Bug_2542_Regression/bug_2542_regression.cpp b/TAO/tests/Bug_2542_Regression/bug_2542_regression.cpp
deleted file mode 100644
index 2d353c4ea24..00000000000
--- a/TAO/tests/Bug_2542_Regression/bug_2542_regression.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/CodecFactory/CodecFactory.h"
-
-ACE_RCSID (Bug_2542_Regression,
- bug_2542_regression,
- "$Id$")
-
-int main (int argc, char* argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init(argc,argv);
- CORBA::Object_var object =
- orb->resolve_initial_references("CodecFactory");
-
- IOP::CodecFactory_var codec_factory =
- IOP::CodecFactory::_narrow(object.in ());
- IOP::Encoding e = {IOP::ENCODING_CDR_ENCAPS,1,2};
-
- IOP::Codec_var codec = codec_factory->create_codec(e);
-
- CORBA::Any any_o;
- Value* value = new OBV_Value;
- any_o <<= &value;
-
- CORBA::OctetSeq_var bin = codec->encode(any_o);
- CORBA::Any_var any_n = codec->decode(bin.in ());
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught a CORBA exception \n");
- return 1;
- }
- ACE_CATCHALL
- {
- return 1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (1);
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2542_Regression/run_test.pl b/TAO/tests/Bug_2542_Regression/run_test.pl
deleted file mode 100755
index 7634915c348..00000000000
--- a/TAO/tests/Bug_2542_Regression/run_test.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("client");
-}
-else {
- $SV = new PerlACE::Process ("client");
-}
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: client returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2543_Regression/Bug_2543_Regression.mpc b/TAO/tests/Bug_2543_Regression/Bug_2543_Regression.mpc
deleted file mode 100644
index be2c40753b0..00000000000
--- a/TAO/tests/Bug_2543_Regression/Bug_2543_Regression.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project : taoclient, anytypecode, codecfactory, valuetype {
- Source_Files {
- bug_2543_regression.cpp
- }
-}
diff --git a/TAO/tests/Bug_2543_Regression/Test.idl b/TAO/tests/Bug_2543_Regression/Test.idl
deleted file mode 100644
index ac8ac65cbcf..00000000000
--- a/TAO/tests/Bug_2543_Regression/Test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-// $Id$
-
-valuetype Base
-{
- public long l;
-};
-
-typedef sequence<Base> BaseSeq;
-
-valuetype Value : Base
-{
- public string s;
-};
diff --git a/TAO/tests/Bug_2543_Regression/bug_2543_regression.cpp b/TAO/tests/Bug_2543_Regression/bug_2543_regression.cpp
deleted file mode 100644
index e5a057e822b..00000000000
--- a/TAO/tests/Bug_2543_Regression/bug_2543_regression.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/CodecFactory/CodecFactory.h"
-
-ACE_RCSID (Bug_2543_Regression,
- bug_2543_regression,
- "$Id$")
-
-int main (int argc, char* argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init(argc,argv);
-
- orb->register_value_factory(
- Base::_tao_obv_static_repository_id(),
- new Base_init);
- orb->register_value_factory(
- Value::_tao_obv_static_repository_id(),
- new Value_init);
-
- CORBA::Object_var object =
- orb->resolve_initial_references("CodecFactory");
-
- IOP::CodecFactory_var codec_factory =
- IOP::CodecFactory::_narrow(object.in ());
- IOP::Encoding e = {IOP::ENCODING_CDR_ENCAPS,1,2};
-
- IOP::Codec_var codec = codec_factory->create_codec(e);
-
-
- CORBA::Any any_o;
- BaseSeq values;
- values.length(1);
- values[0] = new OBV_Value(1,"An instance of Value");
- any_o <<= values;
- any_o.type(_tc_BaseSeq);
-
- CORBA::OctetSeq_var bin = codec->encode(any_o);
- CORBA::Any_var any_n = codec->decode(bin.in ());
-
- const BaseSeq * out = 0;
- if (!(any_n.in () >>= out))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error: extract out of any failed\n"),
- 1);
- }
- if (ACE_OS::strcmp( (*out)[0]->_tao_obv_repository_id(),
- Value::_tao_obv_static_repository_id()) != 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "Error: wrong type!\n"), 1);
- }
-
- orb->destroy();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught a CORBA exception \n");
- return 1;
- }
- ACE_CATCHALL
- {
- return 1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (1);
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2543_Regression/run_test.pl b/TAO/tests/Bug_2543_Regression/run_test.pl
deleted file mode 100755
index 7634915c348..00000000000
--- a/TAO/tests/Bug_2543_Regression/run_test.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("client");
-}
-else {
- $SV = new PerlACE::Process ("client");
-}
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: client returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_2549_Regression/Bug_2549_Regression.mpc b/TAO/tests/Bug_2549_Regression/Bug_2549_Regression.mpc
deleted file mode 100644
index 29aca4c4f5d..00000000000
--- a/TAO/tests/Bug_2549_Regression/Bug_2549_Regression.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Test) : taoserver, messaging, rtcorba, objreftemplate, rtscheduling, rtportableserver {
- exename = test
-
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/Bug_2549_Regression/README b/TAO/tests/Bug_2549_Regression/README
deleted file mode 100644
index b899ad017ed..00000000000
--- a/TAO/tests/Bug_2549_Regression/README
+++ /dev/null
@@ -1,4 +0,0 @@
-# $Id$
-
-This is a compile only test. If it compiles, it's passed. It tests that you can include the new include pidls whilst the old pidls exist in the file but within ifdefs without it all going horribly wrong.
-
diff --git a/TAO/tests/Bug_2549_Regression/test.cpp b/TAO/tests/Bug_2549_Regression/test.cpp
deleted file mode 100644
index 68acdde0f3b..00000000000
--- a/TAO/tests/Bug_2549_Regression/test.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-#include "testS.h"
-
-int main (int, char*[])
-{
- return 0;
-}
diff --git a/TAO/tests/Bug_2549_Regression/test.idl b/TAO/tests/Bug_2549_Regression/test.idl
deleted file mode 100644
index f727112c408..00000000000
--- a/TAO/tests/Bug_2549_Regression/test.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-// $Id$
-
-#include "tao/PortableServer/PortableServer_include.pidl"
-#include "tao/CodecFactory/IOP_Codec_include.pidl"
-#include "tao/ObjRefTemplate/ObjectReferenceTemplate_include.pidl"
-#include "tao/PI_Server/PI_Server_include.pidl"
-#include "tao/RTCORBA/RTCORBA_include.pidl"
-#include "tao/RTPortableServer/RTPortableServer_include.pidl"
-#include "tao/RTScheduling/RTScheduler_include.pidl"
-
-#ifdef I_AM_NOT_DEFINED_AT_ALL
-#include "tao/CodecFactory/IOP_Codec.pidl"
-#include "tao/ObjRefTemplate/ObjectReferenceTemplate.pidl"
-#include "tao/PI_Server/PI_Server.pidl"
-#include "tao/PortableServer/PortableServer.pidl"
-#include "tao/RTCORBA/RTCORBA.pidl"
-#include "tao/RTPortableServer/RTPortableServer.pidl"
-#include "tao/RTScheduling/RTScheduler.pidl"
-#endif
diff --git a/TAO/tests/Bug_2593_Regression/Bug_2593_Regression.mpc b/TAO/tests/Bug_2593_Regression/Bug_2593_Regression.mpc
deleted file mode 100644
index cd7cfb7f305..00000000000
--- a/TAO/tests/Bug_2593_Regression/Bug_2593_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, strategies {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2593_Regression/Hello.cpp b/TAO/tests/Bug_2593_Regression/Hello.cpp
deleted file mode 100644
index 70af3ea8a11..00000000000
--- a/TAO/tests/Bug_2593_Regression/Hello.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2593_Regression/Hello.h b/TAO/tests/Bug_2593_Regression/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/Bug_2593_Regression/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2593_Regression/README b/TAO/tests/Bug_2593_Regression/README
deleted file mode 100644
index 8da60d5bbb4..00000000000
--- a/TAO/tests/Bug_2593_Regression/README
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-
-@page Bug 2593 Regression Test README File
-
-This test is used to demonstrate that TAO can successfully connect
-with a server even if the server's IOR contains profiles the client
-doesn't know about.
-
-When TAO 1.5.2 was released it was discovered that TAO could no longer
-tolerate unknown profiles. This test is designed to ensure that
-problem is caught before another release is cut.
-
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Bug_2593_Regression/Test.idl b/TAO/tests/Bug_2593_Regression/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Bug_2593_Regression/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Bug_2593_Regression/client.cpp b/TAO/tests/Bug_2593_Regression/client.cpp
deleted file mode 100644
index f85722246b5..00000000000
--- a/TAO/tests/Bug_2593_Regression/client.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2593_Regression/run_test.pl b/TAO/tests/Bug_2593_Regression/run_test.pl
deleted file mode 100755
index e7edaf3fbc2..00000000000
--- a/TAO/tests/Bug_2593_Regression/run_test.pl
+++ /dev/null
@@ -1,67 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$debug_level = '0';
-
-foreach $i (@ARGV) {
- if ($i eq '-debug') {
- $debug_level = '10';
- }
-}
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-$endpoints = "-ORBEndpoint shmiop://12345 -ORBEndpoint iiop://:4444";
-$debug_conf = "-ORBDebugLevel $debug_level";
-$svc_conf = "-ORBSvcConf server.conf";
-
-$server_opts = "-o $iorfile $svc_conf $endpoints $debug_conf";
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", $server_opts);
-}
-else {
- $SV = new PerlACE::Process ("server", $server_opts);
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2593_Regression/server.conf b/TAO/tests/Bug_2593_Regression/server.conf
deleted file mode 100644
index 8737dcbfdb6..00000000000
--- a/TAO/tests/Bug_2593_Regression/server.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# $Id$
-
-#This conf file is used to give the server some extra protocols
-
-dynamic SHMIOP_Factory Service_Object *TAO_Strategies:_make_TAO_SHMIOP_Protocol_Factory () ""
-
-dynamic Advanced_Resource_Factory Service_Object *
- TAO_Strategies:_make_TAO_Advanced_Resource_Factory ()
- "-ORBProtocolFactory SHMIOP_Factory -ORBProtocolFactory IIOP_Factory"
-
diff --git a/TAO/tests/Bug_2593_Regression/server.cpp b/TAO/tests/Bug_2593_Regression/server.cpp
deleted file mode 100644
index 3b309f50f0d..00000000000
--- a/TAO/tests/Bug_2593_Regression/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s\n",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Bug_2595_Regression/Bug_2595_Regression.mpc b/TAO/tests/Bug_2595_Regression/Bug_2595_Regression.mpc
deleted file mode 100644
index 9a1892855d9..00000000000
--- a/TAO/tests/Bug_2595_Regression/Bug_2595_Regression.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Bug_2595_Regression/Hello.cpp b/TAO/tests/Bug_2595_Regression/Hello.cpp
deleted file mode 100644
index b15677087ce..00000000000
--- a/TAO/tests/Bug_2595_Regression/Hello.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Hello::op (
- ::Test::Fls_out fstruct,
- ::Test::Vls_out vstruct
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- Test::Fls a = {5, 1.0};
- fstruct = a;
- vstruct = new Test::Vls;
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Bug_2595_Regression/Hello.h b/TAO/tests/Bug_2595_Regression/Hello.h
deleted file mode 100644
index 211615c355b..00000000000
--- a/TAO/tests/Bug_2595_Regression/Hello.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $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);
-
- virtual void op (
- ::Test::Fls_out fstruct,
- ::Test::Vls_out vstruct
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to convert strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Bug_2595_Regression/Test.idl b/TAO/tests/Bug_2595_Regression/Test.idl
deleted file mode 100644
index 0f79743ef52..00000000000
--- a/TAO/tests/Bug_2595_Regression/Test.idl
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file Test.idl
- *
- * $Id$
- *
- */
-//=============================================================================
-
-
-module Test
-{
- struct Fls
- {
- long l_mem;
- double d_mem;
- };
-
- struct Vls
- {
- double d_mem;
- string s_mem;
- };
-
- /// A very simple interface
- interface Hello
- {
- void op(out Fls fstruct, out Vls vstruct);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Bug_2595_Regression/client.cpp b/TAO/tests/Bug_2595_Regression/client.cpp
deleted file mode 100644
index 9b3fa9bbc8f..00000000000
--- a/TAO/tests/Bug_2595_Regression/client.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-void get_stringList2(Test::Hello_var hello);
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- Test::Fls_var fstruct;
- Test::Vls_var vstruct;
-
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - op test 1\n"));
- hello->op(fstruct.out(), vstruct.out());
-
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - op test 2\n"));
- hello->op(fstruct, vstruct.out());
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
diff --git a/TAO/tests/Bug_2595_Regression/run_test.pl b/TAO/tests/Bug_2595_Regression/run_test.pl
deleted file mode 100755
index 5d02e3606f1..00000000000
--- a/TAO/tests/Bug_2595_Regression/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Bug_2595_Regression/server.cpp b/TAO/tests/Bug_2595_Regression/server.cpp
deleted file mode 100644
index 177aad4d1d8..00000000000
--- a/TAO/tests/Bug_2595_Regression/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CDR/.cvsignore b/TAO/tests/CDR/.cvsignore
deleted file mode 100644
index 3ea558ca364..00000000000
--- a/TAO/tests/CDR/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-alignment
-allocator
-basic_types
-growth
-octet_sequence
-tc
diff --git a/TAO/tests/CDR/CDR.mpc b/TAO/tests/CDR/CDR.mpc
deleted file mode 100644
index cfbc027a2b2..00000000000
--- a/TAO/tests/CDR/CDR.mpc
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Alignment) : taoexe {
- exename = alignment
-
- Source_Files {
- alignment.cpp
- }
-}
-
-project(*Allocator) : taoexe {
- exename = allocator
-
- Source_Files {
- allocator.cpp
- }
-}
-
-project(*Basic Types) : taoexe, anytypecode {
- exename = basic_types
-
- Source_Files {
- basic_types.cpp
- }
-}
-
-project(*Growth) : taoexe {
- exename = growth
-
- Source_Files {
- growth.cpp
- }
-}
-
-project(*Octet Sequence) : taoexe {
- exename = octet_sequence
-
- Source_Files {
- octet_sequence.cpp
- }
-}
-
-project(*Tc) : taoexe, anytypecode {
- exename = tc
-
- Source_Files {
- tc.cpp
- }
-}
-
diff --git a/TAO/tests/CDR/README b/TAO/tests/CDR/README
deleted file mode 100644
index 0a6c4192d6e..00000000000
--- a/TAO/tests/CDR/README
+++ /dev/null
@@ -1,32 +0,0 @@
-# $Id$
-
-This directory contains the following tests for the CDR stream class;
-
- . basic_types
-
- Simply encodes a lot of CORBA::Octets, CORBA::Short and
- CORBA::Long into a CDR stream and then decodes them;
- verifying that the same results are obtained.
-
- . growth
-
- Helps measure how the growth strategy affects the
- performance of CDR streams.
-
- . tc
-
- TAO implements TypeCodes using a CDR buffer (this was
- inherited from the Sun IIOP engine), this test verifies that
- some of the basic TypeCodes actually are able to interpret
- their CDR buffers.
-
- . allocator
-
- Measure the performance and predictability of TSS vs. global
- allocators.
-
- . alignment
-
- A test for a very subtle alignment problem on the octet
- sequence optimizations. Does not happen now, but this is
- the regression test.
diff --git a/TAO/tests/CDR/alignment.cpp b/TAO/tests/CDR/alignment.cpp
deleted file mode 100644
index 70cbd85c629..00000000000
--- a/TAO/tests/CDR/alignment.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CDR
-//
-// = FILENAME
-// alignment.cpp
-//
-// = DESCRIPTION
-// Verifies that octet sequence marshaling does not affect
-// marshaling.
-//
-// = AUTHORS
-// Carlos O'Ryan (coryan@cs.wustl.edu)
-//
-// ============================================================================
-
-#include "tao/CDR.h"
-
-#include "ace/Log_Msg.h"
-
-int main(int, char*[])
-{
- int status = 0;
-
- for (CORBA::ULong i = 16; i != 64; ++i)
- {
- ACE_Message_Block mb (i + ACE_CDR::MAX_ALIGNMENT);
- ACE_CDR::mb_align (&mb);
- mb.wr_ptr (i);
-
- CORBA::Double dbl = i;
-
- TAO_OutputCDR cdr;
- cdr.write_ulong (i); // length
- cdr.write_octet_array_mb (&mb);
- cdr.write_double (dbl);
- cdr.write_double (dbl);
-
- TAO_InputCDR input (cdr);
-
- CORBA::ULong len;
-
- input.read_ulong (len);
-
- if (len != i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: mismatched lengths,"
- " got %d, expected %d\n",
- len, i));
- }
-
- ACE_Message_Block read_mb (len + ACE_CDR::MAX_ALIGNMENT);
- ACE_CDR::mb_align (&mb);
- mb.wr_ptr (len);
- input.read_char_array (mb.rd_ptr (), len);
-
- CORBA::Double read_dbl;
- if (input.read_double (read_dbl) == 0)
- ACE_DEBUG ((LM_DEBUG, "Failure reading double...\n"));
-
- if (read_dbl != dbl)
- {
- status = 1;
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: mismatched doubles,"
- " got %f, expected %f\n",
- read_dbl, dbl));
- for (const ACE_Message_Block *j = cdr.begin ();
- j != cdr.end ();
- j = j->cont ())
- {
- ACE_HEX_DUMP ((LM_DEBUG,
- j->rd_ptr (),
- j->length (),
- "Output CDR stream"));
- }
- TAO_InputCDR debug (cdr);
- ACE_HEX_DUMP ((LM_DEBUG,
- debug.rd_ptr (),
- debug.length (),
- "Input CDR stream"));
- }
- }
-
- return status;
-}
diff --git a/TAO/tests/CDR/allocator.cpp b/TAO/tests/CDR/allocator.cpp
deleted file mode 100644
index dfbae63cc44..00000000000
--- a/TAO/tests/CDR/allocator.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CDR
-//
-// = FILENAME
-// allocator.cpp
-//
-// = DESCRIPTION
-// Compares the performance of a TSS allocator, with no locks, to
-// the global allocator (with locks) even in the abscence of
-// contention.
-// The idea behind this test is to measure the predictability of
-// each allocator, specially under the light of potential
-// fragmentation in the main allocator.
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "tao/ORB_Core.h"
-#include "tao/ORB.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-
-ACE_RCSID(CDR, allocator, "$Id$")
-
-#define DEFAULT_BUFFER_SIZE 512
-
-class Application_Simulator
-{
- // = DESCRIPTION
- // Tries to simulate the behavior of an application: it randomly
- // acquires and releases memory, of variable sizes.
- // The intention is to produce some level of fragmentation in main
- // memory.
-
-public:
- Application_Simulator (int max_fragments,
- int max_fragment_size);
- // Constructor, limits the amount of fragmentation and memory this
- // class takes.
-
- ~Application_Simulator (void);
- // Destructor, releases any memory left behind.
-
- void upcall (ACE_RANDR_TYPE& seed);
- // Simulate an upcall. The class allocates some memory and then
- // releases some memory too, the amount of memory allocated and the
- // number of allocations is random.
-
-private:
- char** buffers_;
- // The allocated buffers.
-
- int max_fragments_;
- // The size of the <buffers_> array.
-
- int max_fragment_size_;
- // The maximum size of any element of <buffers_>
-};
-
-int
-main (int argc, char *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;
- ACE_RANDR_TYPE seed = time(0);
-
- ACE_Get_Opt get_opt (argc, argv, "tn:f:m:s:a:b:r:q");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- 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_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);
-
- int* argument_sizes;
- ACE_NEW_RETURN (argument_sizes, int[max_arguments], 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;
-
- for (int i = 0; i < iterations; ++i)
- {
- simulator.upcall (seed);
-
- // @@ TODO this is the place to put the other allocators.
- ACE_High_Res_Timer cdr_encoding;
- for (int j = 0; j < repeat; ++j)
- {
- 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 ();
- }
-
- 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 = ACE_HRTIME_CONVERSION(usecs) / repeat;
-
- if (!quiet)
- ACE_OS::printf ("AVE: %d %f\n",
- i, average);
-
- }
- return 0;
-}
-
-Application_Simulator::Application_Simulator (int max_fragments,
- int max_fragment_size)
- : max_fragments_ (max_fragments),
- max_fragment_size_ (max_fragment_size)
-{
- ACE_NEW (buffers_, char*[this->max_fragments_]);
- for (char** i = this->buffers_;
- i != this->buffers_ + this->max_fragments_;
- ++i)
- *i = 0;
-}
-
-Application_Simulator::~Application_Simulator (void)
-{
- for (char** i = this->buffers_;
- i != this->buffers_ + this->max_fragments_;
- ++i)
- {
- if (*i != 0)
- {
- delete[] *i;
- *i = 0;
- }
- }
- delete[] this->buffers_;
- this->buffers_ = 0;
-}
-
-void
-Application_Simulator::upcall (ACE_RANDR_TYPE& seed)
-{
- for (char** i = this->buffers_;
- i != this->buffers_ + this->max_fragments_;
- ++i)
- {
- if (*i != 0)
- {
- if (ACE_OS::rand_r (seed) % 10000 < 5000)
- {
- delete[] *i;
- *i = 0;
- }
- }
- else
- {
- if (ACE_OS::rand_r (seed) % 10000 < 5000)
- {
- int size = ACE_OS::rand_r (seed) %
- this->max_fragment_size_ + 1;
- ACE_NEW (*i, char[size]);
- }
- }
- }
-}
diff --git a/TAO/tests/CDR/basic_types.cpp b/TAO/tests/CDR/basic_types.cpp
deleted file mode 100644
index a1035e4c150..00000000000
--- a/TAO/tests/CDR/basic_types.cpp
+++ /dev/null
@@ -1,287 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CDR
-//
-// = FILENAME
-// basic_types.cpp
-//
-// = DESCRIPTION
-// Test the basic funcionality of a CDR stream by encoding some
-// basic types and then decoding them again.
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "tao/ORB.h"
-#include "tao/debug.h"
-#include "tao/CDR.h"
-#include "tao/AnyTypeCode/Any.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (CDR,
- basic_types,
- "$Id$")
-
-static int n = 4096;
-static int nloops = 100;
-
-struct CDR_Test_Types
-{
- CDR_Test_Types (void);
-
- CORBA::Octet o;
- CORBA::Short s;
- CORBA::Long l;
- const char* str;
- CORBA::Double d;
- CORBA::Any any;
-
- enum {
- ARRAY_SIZE = 10
- };
-
- CORBA::Short a[ARRAY_SIZE];
-};
-
-CDR_Test_Types::CDR_Test_Types (void)
- : o (1), s (2), l (4),
- str ("abc"), d (8)
-{
- any <<= CORBA::Short (s);
-
- for (int i = 0; i < CDR_Test_Types::ARRAY_SIZE; ++i)
- {
- a[i] = i;
- }
-}
-
-static int
-test_put (TAO_OutputCDR &cdr, CDR_Test_Types &test_types)
-{
- for (int i = 0; i < n; ++i)
- {
- if (cdr.write_octet (test_types.o) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "write_octet[%d] failed\n",
- i),
- 1);
- if (cdr.write_short (test_types.s) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "write_short[%d] failed\n",
- i),
- 1);
- if (cdr.write_octet (test_types.o) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "write_octet-2[%d] failed\n",
- i),
- 1);
- if (cdr.write_long (test_types.l) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "write_long[%d] failed\n",
- i),
- 1);
- if (cdr.write_long (test_types.l) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "write_long-2[%d] failed\n",
- i),
- 1);
-#if 0
- if (cdr.write_string (test_types.str) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "write_string[%d] failed\n",
- i),
- 1);
-#endif
- if (!(cdr << test_types.any))
- ACE_ERROR_RETURN ((LM_ERROR,
- "encode Any [%d] failed\n",
- i),
- 1);
- }
-
- return 0;
-}
-
-static int
-test_get (TAO_InputCDR &cdr, const CDR_Test_Types &test_types)
-{
- CORBA::Octet xo;
- CORBA::Short xs;
- CORBA::Long xl;
- CORBA::Any any;
-
- for (int i = 0; i < n; ++i)
- {
- if (cdr.read_octet (xo) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "read_octet[%d] failed\n",
- i),
- 1);
- if (xo != test_types.o)
- ACE_ERROR_RETURN ((LM_ERROR,
- "octet[%d] differs\n",
- i),
- 1);
- if (cdr.read_short (xs) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "read_short[%d] failed\n",
- i), 1);
- if (xs != test_types.s)
- ACE_ERROR_RETURN ((LM_ERROR,
- "short[%d] differs\n",
- i),
- 1);
- if (cdr.read_octet (xo) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "read_octet-2[%d] failed\n",
- i),
- 1);
- if (xo != test_types.o)
- ACE_ERROR_RETURN ((LM_ERROR,
- "octet-2[%d] differs\n",
- i),
- 1);
- if (cdr.read_long (xl) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "read_long[%d] failed\n",
- i),
- 1);
- if (xl != test_types.l)
- ACE_ERROR_RETURN ((LM_ERROR,
- "long[%d] differs\n",
- i),
- 1);
- if (cdr.read_long (xl) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "read_long-2[%d] failed\n",
- i),
- 1);
- if (xl != test_types.l)
- ACE_ERROR_RETURN ((LM_ERROR,
- "long-2[%d] differs\n",
- i),
- 1);
-#if 0
- CORBA::String xstr;
- if (cdr.read_string (xstr) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "read_string2[%d] failed\n",
- i),
- 1);
- if (ACE_OS::strcmp (xstr, test_types.str) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "string[%d] differs\n",
- i),
- 1);
- CORBA::string_free (xstr);
-#endif
- if (cdr >> any)
- {
- CORBA::Short s;
- if (any >>= s)
- {
- if (test_types.s != s)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Any short mismatch [%d != %d in loop %d]\n",
- test_types.s,
- s,
- i),
- 1);
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "Any did not receive a short [%d] \n",
- i),
- 1);
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "Any decode failed [%d] \n",
- i),
- 1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Get_Opt get_opt (argc, argv, "dn:l:");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt)
- {
- case 'd':
- TAO_debug_level++;
- break;
- case 'n':
- n = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 'l':
- nloops = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case '?':
- default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "-d debug"
- "-n <num> "
- "-l <loops> "
- "\n",
- argv[0]));
- return -1;
- }
- }
-
- for (int i = 0; i < nloops; ++i)
- {
- TAO_OutputCDR output;
- CDR_Test_Types test_types;
-
- if (test_put (output, test_types) != 0)
- {
- return 1;
- }
- TAO_InputCDR input (output);
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Output CDR: \n"));
- ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64));
- ACE_DEBUG ((LM_DEBUG, "Input CDR: \n"));
- ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64));
- }
-
- if (test_get (input, test_types) != 0)
- {
- return 1;
- }
- }
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Basic_Types");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CDR/growth.cpp b/TAO/tests/CDR/growth.cpp
deleted file mode 100644
index cc70e4ea277..00000000000
--- a/TAO/tests/CDR/growth.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CDR
-//
-// = FILENAME
-// growth.cpp
-//
-// = DESCRIPTION
-// Helps in measuring how the growth strategy affects the
-// performance of CDR streams.
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Log_Msg.h"
-
-#include "tao/ORB.h"
-#include "tao/debug.h"
-#include "tao/CDR.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(CDR, growth, "$Id$")
-
-static int
-test_write (TAO_OutputCDR &cdr, int n)
-{
- CORBA::Long l = 0xdeadbeef;
-
- for (int i = 0; i < n; ++i)
- {
- if (cdr.write_long (l) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "write_long[%d] failed\n",
- i),
- 1);
- }
-
- return 0;
-}
-
-static int
-test_read (TAO_InputCDR &cdr, int n)
-{
- CORBA::Long xl;
-
- for (int i = 0; i < n; ++i)
- {
- if (cdr.read_long (xl) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "read_long[%d] failed\n",
- i),
- 1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int n = 100;
- int low = 64;
- int hi = 4096;
- int s = 4;
- int quiet = 0;
-
- ACE_Get_Opt get_opt (argc, argv, "dn:l:h:s:q");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt)
- {
- case 'd':
- TAO_debug_level++;
- break;
- case 'n':
- n = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 'l':
- low = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 'h':
- hi = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 's':
- s = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 'q':
- quiet = 1;
- break;
- case '?':
- default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "-d debug"
- "-l low "
- "-h high "
- "-s step "
- "-n n "
- "\n"
- "Writes and then reads longs to a CDR stream "
- "starting from <low> up to <high> incrementing "
- "by <step>, at each step run <n> iterations to "
- "average."
- "\n",
- argv[0]));
- return -1;
- }
- }
-
- for (int x = low; x <= hi; x += s)
- {
- ACE_High_Res_Timer writing;
- ACE_High_Res_Timer reading;
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "\nx= %d\n", x));
-
- for (int i = 0; i < n; ++i)
- {
- writing.start_incr ();
- TAO_OutputCDR output;
-
- if (test_write (output, x) != 0)
- {
- return 1;
- }
- writing.stop_incr ();
-
- reading.start_incr ();
- TAO_InputCDR input (output);
- if (test_read (input, x) != 0)
- {
- return 1;
- }
- reading.stop_incr ();
- }
- double m = n * x;
-
- ACE_Time_Value wtv;
- writing.elapsed_time_incr (wtv);
- ACE_hrtime_t wusecs = wtv.sec ();
- wusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS);
- wusecs += wtv.usec ();
-
- ACE_Time_Value rtv;
- reading.elapsed_time_incr (rtv);
- ACE_hrtime_t rusecs = rtv.sec ();
- rusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS);
- rusecs += rtv.usec ();
-
- double write_average = ACE_HRTIME_CONVERSION(wusecs) / m;
- double read_average = ACE_HRTIME_CONVERSION(rusecs) / m;
- if (!quiet)
- ACE_OS::printf ("AVE: %d %f %f\n",
- x, write_average, read_average);
- }
- return 0;
-}
diff --git a/TAO/tests/CDR/octet_sequence.cpp b/TAO/tests/CDR/octet_sequence.cpp
deleted file mode 100644
index fd8a8026ab5..00000000000
--- a/TAO/tests/CDR/octet_sequence.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CDR
-//
-// = FILENAME
-// octet_sequence.cpp
-//
-// = DESCRIPTION
-// Verifies that reference counting is performed correctly for octet
-// sequence marshaling.
-//
-// = AUTHORS
-// Dave Meyer (dmeyer@std.saic.com)
-// Carlos O'Ryan (coryan@cs.wustl.edu)
-//
-// ============================================================================
-
-#include "ace/Log_Msg.h"
-
-#include "tao/CDR.h"
-#include "ace/OS_NS_string.h"
-
-ACE_Message_Block * m1;
-ACE_Message_Block * m2;
-ACE_Message_Block * m3;
-
-void dump(const char * msg)
-{
- ACE_DEBUG ((LM_INFO,
- "%s\n"
- "m1: %d\n"
- "m2: %d\n"
- "m3: %d\n",
- msg,
- m1->data_block()->reference_count(),
- m2->data_block()->reference_count(),
- m3->data_block()->reference_count()));
-}
-
-int main(int, char*[])
-{
- // setup mb's
- char buf[1024];
- m1=new ACE_Message_Block(1024);
- ACE_OS::memset(buf,'1',512);
- m1->copy(buf,512);
- m2=new ACE_Message_Block(1024);
- ACE_OS::memset(buf,'2',512);
- m2->copy(buf,512);
- m3=new ACE_Message_Block(1024);
- ACE_OS::memset(buf,'3',512);
- m3->copy(buf,512);
-
- m1->cont(m2);
- m2->cont(m3);
- dump("expect 1,1,1");
-
- ACE_Message_Block* m = ACE_Message_Block::duplicate (m1);
- dump("expect 2,2,2");
-
- {
- TAO_OutputCDR cdr;
- cdr.write_octet_array_mb(m1);
- dump("expect 3,3,3"); // that's what I expected, anyway
- ACE_DEBUG ((LM_INFO, "total cdr length is %u\n",
- static_cast<u_int> (cdr.total_length())));
- }
- dump("expect 2,2,2"); // that's what I expected, anyway
-
- ACE_Message_Block::release (m);
- dump("expect 1,1,1"); // that's what I expected, anyway
- ACE_Message_Block::release (m1);
-
- return 0;
-}
diff --git a/TAO/tests/CDR/run_test.pl b/TAO/tests/CDR/run_test.pl
deleted file mode 100755
index eeaf6f75224..00000000000
--- a/TAO/tests/CDR/run_test.pl
+++ /dev/null
@@ -1,36 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$brace="\#\#\#\#\#";
-%tests = ("basic_types" => "-n 256 -l 10",
- "tc" => "",
- "growth" => "-l 64 -h 256 -s 4 -n 10 -q",
- "alignment" => "",
- "allocator" => "-q");
-$test = "";
-$args = "";
-$status = 0;
-print STDERR "\n";
-
-while (($test,$args) = each %tests) {
- print STDERR "\n$brace $test $args test BEGUN\n";
- $TST = new PerlACE::Process ($test, $args);
- print STDERR "\tRUNNING $test\n";
-
- $retval = $TST->SpawnWaitKill (90);
-
- if ($retval != 0) {
- print STDERR "ERROR $brace $test $args, exit value $retval\n";
- $status = 1;
- }
- print STDERR "$brace $test FINISHED successfully\n";
-}
-
-exit $status;
diff --git a/TAO/tests/CDR/tc.cpp b/TAO/tests/CDR/tc.cpp
deleted file mode 100644
index 0b814f3d523..00000000000
--- a/TAO/tests/CDR/tc.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CDR
-//
-// = FILENAME
-// tc.cpp
-//
-// = DESCRIPTION
-// Verify that the basic typecodes are able to interpret their CDR
-// buffers.
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "tao/AnyTypeCode/TypeCode_Constants.h"
-#include "tao/ORB.h"
-#include "tao/SystemException.h"
-#include "tao/debug.h"
-
-#include "ace/Log_Msg.h"
-
-
-ACE_RCSID (CDR,
- tc,
- "$Id$")
-
-// In this version of TAO typecodes are based on CDR, we have to
-// verify that CDR offers the services needed for Typecode...
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- static const CORBA::TypeCode_ptr tcs[]=
- {
- CORBA::_tc_null,
- CORBA::_tc_void,
- CORBA::_tc_short,
- CORBA::_tc_long,
- CORBA::_tc_ushort,
- CORBA::_tc_ulong,
- CORBA::_tc_float,
- CORBA::_tc_double,
- CORBA::_tc_boolean,
- CORBA::_tc_char,
- CORBA::_tc_octet,
- CORBA::_tc_any,
- CORBA::_tc_TypeCode,
- CORBA::_tc_Principal,
- CORBA::_tc_Object,
- // CORBA::_tc_struct,
- // CORBA::_tc_union,
- // CORBA::_tc_enum,
- CORBA::_tc_string,
- // CORBA::_tc_sequence,
- // CORBA::_tc_array,
- // CORBA::_tc_alias,
- // CORBA::_tc_except,
- CORBA::_tc_longlong,
- CORBA::_tc_ulonglong,
- CORBA::_tc_longdouble,
- CORBA::_tc_wchar,
- CORBA::_tc_wstring,
- CORBA::_tc_UNKNOWN,
- CORBA::_tc_BAD_PARAM,
- CORBA::_tc_NO_MEMORY,
- CORBA::_tc_IMP_LIMIT,
- CORBA::_tc_COMM_FAILURE,
- CORBA::_tc_INV_OBJREF,
- CORBA::_tc_OBJECT_NOT_EXIST,
- CORBA::_tc_NO_PERMISSION,
- CORBA::_tc_INTERNAL,
- CORBA::_tc_MARSHAL,
- CORBA::_tc_INITIALIZE,
- CORBA::_tc_NO_IMPLEMENT,
- CORBA::_tc_BAD_TYPECODE,
- CORBA::_tc_BAD_OPERATION,
- CORBA::_tc_NO_RESOURCES,
- CORBA::_tc_NO_RESPONSE,
- CORBA::_tc_PERSIST_STORE,
- CORBA::_tc_BAD_INV_ORDER,
- CORBA::_tc_TRANSIENT,
- CORBA::_tc_FREE_MEM,
- CORBA::_tc_INV_IDENT,
- CORBA::_tc_INV_FLAG,
- CORBA::_tc_INTF_REPOS,
- CORBA::_tc_BAD_CONTEXT,
- CORBA::_tc_OBJ_ADAPTER,
- CORBA::_tc_DATA_CONVERSION,
- CORBA::TypeCode::_tc_Bounds,
- CORBA::TypeCode::_tc_BadKind
- };
-
- static int n = sizeof (tcs) / sizeof (tcs[0]);
-
- for (const CORBA::TypeCode_ptr *i = tcs;
- i != tcs + n;
- ++i)
- {
- CORBA::TypeCode_ptr tc = *i;
-
- CORBA::TCKind k = tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- switch (k)
- {
- case CORBA::tk_objref:
- case CORBA::tk_struct:
- case CORBA::tk_union:
- case CORBA::tk_enum:
- case CORBA::tk_alias:
- case CORBA::tk_except:
- {
- const char *id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *name = tc->name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong length = 0;
- // tc->length (TAO_TRY_ENV);
- // ACE_TRY_CHECK;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "ID = '%s'\n"
- "%{%{ NAME = %s%$"
- " KIND = %d%$"
- " LENGTH = %d"
- "%}%}\n",
- (id?id:"empty ID"),
- (name?name:"empty name"),
- k,
- length));
- }
- break;
- }
- default:
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "basic type: %d\n",
- k));
- }
- break;
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TC");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc b/TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc
deleted file mode 100644
index 016caef75ef..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/CSD_TP_Broken.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_b {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_b {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp
deleted file mode 100644
index 0fbab91f139..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_ClientEngine.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-
-ClientApp::ClientApp()
-: TestAppBase("TP_Test_3_Client"),
- client_task_ (true), // shutdown orb after client is done.
- num_servants_ (1),
- num_csd_threads_ (1),
- num_orb_threads_ (1),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
-
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(this->orb_.in(), num_servants_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ClientApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_B obj ref.
- Foo_B_var foo = RefHelper<Foo_B>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->servants_.create_and_activate(1, // number of callback servants
- this->poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ServantListType::T_stub_var cb = this->servants_.objref(0);
-
- // Create the ClientEngine object, and give it the Foo_B and Callback object
- // references.
- ClientEngine_Handle engine
- = new Foo_B_ClientEngine(foo.in(), cb.in (), this->client_id_);
- this->client_task_.add_engine(engine.in());
-}
-
-
-void
-ClientApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::run_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->client_task_.open() != 0)
- {
- ACE_THROW (TestAppException ());
- }
-}
-
-
-void
-ClientApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-PortableServer::POA_ptr
-ClientApp::create_poa(CORBA::ORB_ptr orb, const char* poa_name ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-bool
-ClientApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->client_task_.failure_count () > 0)
- {
- return false;
- }
-
- return true;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h
deleted file mode 100644
index 846384224f5..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ClientApp.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "ServantList_T.h"
-#include "Callback_i.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
-
- typedef ServantList<Callback_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask client_task_;
-
- ACE_CString exe_name_;
-
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
-
- ACE_CString ior_;
- unsigned client_kind_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp
deleted file mode 100644
index e48955f8c06..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_SimpleClientEngine.h"
-#include "Callback_i.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_3_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init(this->orb_.in(), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_poa_ = this->create_poa(this->orb_.in(),
- "CallbackPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
-// We don't apply the strategy for this test to show that the bug isn't
-// part of the CSD ThreadPool Strategy code.
-#if 0
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-#endif
-
- // Use another poa and strategy for callbacks. This would resolve
- // the deadlock situation that happens when having number of csd
- // threads less than number of collocated clients.
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_tp_strategy_ = new TAO::CSD::TP_Strategy();
-// We don't apply the strategy for this test to show that the bug isn't
-// part of the CSD ThreadPool Strategy code.
-#if 0
- if (!this->cb_tp_strategy_->apply_to(this->cb_poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to callback poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-#endif
- }
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->foo_servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ == 0)
- return;
-
- this->cb_servants_.create_and_activate(1, // number of callback servants
- this->cb_poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CallbackServantListType::T_stub_var cb = this->cb_servants_.objref(0);
-
- unsigned client_id = this->num_remote_clients_;
-
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- client_id ++;
- // Dole out the servant object references in a round-robin fashion.
- unsigned servant_index = i % this->num_servants_;
-
- FooServantListType::T_stub_var foo
- = this->foo_servants_.objref(servant_index);
- ClientEngine_Handle engine
- = new Foo_B_SimpleClientEngine(foo.in(), cb.in (), client_id, true);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- return true;
-#if 0
- // Check whether the clients return any errors.
- if (this->num_collocated_clients_ > 0
- && this->collocated_client_task_.failure_count () > 0)
- {
- return false;
- }
-
- Foo_B_Statistics stats (this->num_remote_clients_,
- this->num_collocated_clients_);
-
- Foo_B_SimpleClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->foo_servants_.servant(i)->gather_stats (stats);
- }
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_servants_.servant (0)->gather_stats (stats);
- }
-
- return stats.actual_vs_expected ();
-#endif
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h
deleted file mode 100644
index c90b7671534..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/ServerApp.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "Foo_B_i.h"
-#include "Callback_i.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_B_i> FooServantListType;
- typedef ServantList<Callback_i> CallbackServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- PortableServer::POA_var cb_poa_;
- TAO::CSD::TP_Strategy_Handle cb_tp_strategy_;
-
- FooServantListType foo_servants_;
- CallbackServantListType cb_servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl b/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl
deleted file mode 100755
index 6d3802bc59f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- $num_csd_threads=1;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
-# "-ORBNegotiateCodesets 0 " .
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-else {
- $SV = new PerlACE::Process("server_main",
-# "-ORBNegotiateCodesets 0 " .
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-
-$SV->Spawn();
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client_id = $i + 1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/Broken/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/README b/TAO/tests/CSD_Strategy_Tests/README
deleted file mode 100644
index 4ab0940d42b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/README
+++ /dev/null
@@ -1,117 +0,0 @@
-This directory contains tests for the Custom Servant Dispatching (CSD)
-feature implemented within TAO. Specifically, these tests use the reference
-implementation CSD Strategy, called the Thread Pool (TP) CSD Strategy.
-
-Each sub-directory should contain its own README file which describes the
-contents of the particular sub-directory in more detail. The following
-is a list of sub-directories located here under the
-$TAO_ROOT/tests/CSD_Strategy_Tests directory:
-
-TP_Test_Lib
------------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Test" library (ie, libCSD_TP_Test.so). This library contains
- infrastructure code used by all of the CSD test applications. The
- purpose of this library is code re-use and ease of maintenance (ie,
- change/fix something in this library, and all applications using it
- will gain the benefit.)
-
-
-TP_Foo_A
---------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Foo_A" library (ie, libCSD_TP_Foo_A.so). This library contains
- one IDL file which declares the "Foo_A" interface. All of the other
- source code in this library is used to support client and/or server
- applications that will use the Foo_A interface.
-
-
-TP_Foo_B
---------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Foo_B" library (ie, libCSD_TP_Foo_B.so). This library contains
- one IDL file which declares the "Foo_B" interface. All of the other
- source code in this library is used to support client and/or server
- applications that will use the Foo_B interface.
-
-
-TP_Foo_C
---------
-
- This sub-directory contains source code used to build the
- "CSD_TP_Foo_C" library (ie, libCSD_TP_Foo_C.so). This library contains
- one IDL file which declares the "Foo_C" interface. All of the other
- source code in this library is used to support client and/or server
- applications that will use the Foo_C interface.
-
-
-TP_Test_1
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_A interface (see the TP_Foo_A directory).
- This particular pair of applications do not use all of the infrastructure
- types made available to them by the TP_Test_Lib.
-
- The TP_Test_1 application code is really more of an example than a test.
- Other test applications (ie, TP_Test_2) do the same thing as TP_Test_1,
- except that the other test applications take advantage of the
- infrastructure types provided by the TP_Test_Lib. Another big difference
- is that the TP_Test_1 does not perform any "actual" vs. "expected"
- results checking - and the other TP tests do perform these checks.
-
-
-TP_Test_2
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_A interface (see the TP_Foo_A directory).
-
- The Foo_A interface is a simple interface with just a few simple
- operations (both one-way and two-way).
-
- Each launched client application (ie, client process) represents a
- "remote" client of a Foo_A servant object that lives in a server
- process. The server application can be instructed, upon start up,
- to use any number of "collocated clients". Each collocated client is
- essentially a new thread in the server process that will perform the
- same logic that is performed by the remote client application.
-
-
-TP_Test_3
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_B interface (see the TP_Foo_B directory).
-
- The Foo_B interface has a rich set of operations, using a wide variety
- of argument types.
-
- The TP_Test_3 applications are nearly identical to their TP_Test_2
- counterparts, except for the fact that Foo_B is the interface type
- used in TP_Test_3, and Foo_A is the interface type used in TP_Test_2.
-
-
-TP_Test_4
----------
-
- This sub-directory contains source code that is used to build a
- client application and a server application. These applications
- make use of the Foo_C interface (see the TP_Foo_C directory).
-
- The Foo_C interface is a simple interface with just a few simple
- operations (both one-way and two-way). It is nearly (if not exactly)
- identical to the Foo_A interface.
-
- The TP_Test_4 applications are nearly identical to the TP_Test_2
- applications with one significant difference: the TP_Test_4 server
- application makes use of the "custom requests" feature provided by
- the CSD Thread Pool Strategy. These custom requests are performed
- by the collocated client code within the server application.
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp
deleted file mode 100644
index db2d1ec202e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id$
-#include "AppHelper.h"
-
-void
-AppHelper::ref_to_file(CORBA::ORB_ptr orb,
- CORBA::Object_ptr obj,
- const char* filename
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var ior = orb->object_to_string(obj);
-
- FILE* ior_file = ACE_OS::fopen(filename, (const ACE_TCHAR *)("w"));
-
- if (ior_file == 0)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Cannot open output file [%s] to write IOR.",
- filename));
- ACE_THROW (TestAppException());
- }
-
- ACE_OS::fprintf(ior_file, "%s", ior.in());
- ACE_OS::fclose(ior_file);
-}
-
-
-PortableServer::POA_ptr
-AppHelper::create_poa(const char* name,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr mgr,
- CORBA::PolicyList& policies
- ACE_ENV_ARG_DECL)
-{
- PortableServer::POA_var child_poa = root_poa->create_POA(name,
- mgr,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- if (CORBA::is_nil(child_poa.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to create child POA: %s.\n", name));
- ACE_THROW_RETURN (TestAppException(), PortableServer::POA::_nil ());
- }
-
- return child_poa._retn();
-}
-
-
-CORBA::Object_ptr
-AppHelper::activate_servant(PortableServer::POA_ptr poa,
- PortableServer::Servant servant
- ACE_ENV_ARG_DECL)
-{
- // Activate the servant using the Child POA.
- PortableServer::ObjectId_var oid
- = poa->activate_object(servant ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- CORBA::Object_var obj
- = poa->servant_to_reference(servant ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil(obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to convert servant_to_ref.\n"));
- ACE_THROW_RETURN (TestAppException(), CORBA::Object::_nil ());
- }
-
- return obj._retn();
-}
-
-
-bool
-AppHelper::validate_connection (CORBA::Object_ptr obj)
-{
- for (CORBA::ULong j = 0; j != 100; ++j)
- {
- ACE_TRY_NEW_ENV
- {
-#if (TAO_HAS_CORBA_MESSAGING == 1)
- CORBA::PolicyList_var unused;
- obj->_validate_connection (unused
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#else
- obj->_is_a ("Not_An_IDL_Type"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_MESSAGING == 1 */
- return true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
- }
-
- return false;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h
deleted file mode 100644
index 06a6ac721a2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// $Id$
-#ifndef APPHELPER_H
-#define APPHELPER_H
-
-#include "CSD_TP_Test_Export.h"
-#include "TestAppExceptionC.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/ORB.h"
-#include "ace/OS.h"
-#include "ace/Log_Msg.h"
-
-
-template <typename T>
-struct RefHelper
-{
- typedef typename T::_ptr_type T_ptr;
- typedef typename T::_var_type T_var;
-
- static T_ptr string_to_ref(CORBA::ORB_ptr orb,
- const char* ior
- ACE_ENV_ARG_DECL)
- {
- CORBA::Object_var obj = orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN(T::_nil ());
-
- if (CORBA::is_nil(obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to convert IOR string to obj ref.\n"));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- T_var t_obj = T::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN(T::_nil ());
-
- if (CORBA::is_nil(t_obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to narrow obj ref to T interface.\n"));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- return t_obj._retn();
- }
-
- static T_ptr resolve_initial_ref(CORBA::ORB_ptr orb,
- const char* name
- ACE_ENV_ARG_DECL)
- {
- CORBA::Object_var obj
- = orb->resolve_initial_references(name ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (T::_nil ());
-
- if (CORBA::is_nil(obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to resolve initial ref for '%s'.\n",
- name));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- T_var t_obj = T::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (T::_nil ());
-
-
- if (CORBA::is_nil(t_obj.in()))
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to narrow resolved initial ref '%s'.\n",
- name));
- ACE_THROW_RETURN (TestAppException(), T::_nil ());
- }
-
- return t_obj._retn();
- }
-
-};
-
-struct CSD_TP_Test_Export AppHelper
-{
-
- static void ref_to_file(CORBA::ORB_ptr orb,
- CORBA::Object_ptr obj,
- const char* filename
- ACE_ENV_ARG_DECL);
-
- static PortableServer::POA_ptr create_poa
- (const char* name,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr mgr,
- CORBA::PolicyList& policies
- ACE_ENV_ARG_DECL);
-
- static CORBA::Object_ptr activate_servant(PortableServer::POA_ptr poa,
- PortableServer::Servant servant
- ACE_ENV_ARG_DECL);
-
- // This helper method is used because there is a chance that the
- // initial CORBA request made to the target ORB will fail during
- // connection establishment with a TRANSIENT CORBA SystemException.
- // This occurs for some platforms (ie, windows) when several clients
- // make their initial CORBA request to the same ORB at the same time,
- // causing the ORB to attempt to handle several connection establishments
- // at one time. Apparently, under certain conditions, it will throw the
- // TRANSIENT exception to tell the client application to "try again later".
- // The analogy is making a phone call. Sometimes you get a busy tone.
- // This means "try again later".
- // This helper function will retry until the connection establishment
- // works - or until it decides that enough is enough.
- static bool validate_connection (CORBA::Object_ptr obj);
-};
-
-#endif
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp
deleted file mode 100644
index 53dec90290a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_unistd.h"
-
-
-AppShutdown::AppShutdown()
- : num_clients_(0),
- num_clients_shutdown_(0)
-{
-}
-
-
-AppShutdown::~AppShutdown()
-{
-}
-
-
-void
-AppShutdown::init(CORBA::ORB_ptr orb,
- unsigned num_clients
- ACE_ENV_ARG_DECL)
-{
- if ((!CORBA::is_nil(this->orb_.in())) ||
- (CORBA::is_nil(orb)) ||
- (num_clients == 0))
- {
- // Already init()'ed, or bad argument values.
- ACE_THROW(TestAppException());
- }
- else
- {
- this->orb_ = CORBA::ORB::_duplicate(orb);
- this->num_clients_ = num_clients;
- this->num_clients_shutdown_ = 0;
- }
-}
-
-
-void
-AppShutdown::wait ()
-{
- this->orb_shutdown_task_.wait();
-}
-
-
-void
-AppShutdown::client_done()
-{
- if ((this->num_clients_ == 0) || (CORBA::is_nil(this->orb_.in())))
- {
- ACE_ERROR((LM_ERROR, "(%P|%t) AppShutdown was never initialized.\n"));
- return;
- }
-
- unsigned cur_shutdown;
-
- {
- GuardType guard(this->lock_);
- cur_shutdown = ++this->num_clients_shutdown_;
- }
-
- if (cur_shutdown == this->num_clients_)
- {
- // Sleep for one second before shutting down the ORB. This
- // is a poor-man version of "wait until the CSD request queue drains".
- ACE_OS::sleep(1);
- this->orb_shutdown_task_.orb(this->orb_.in());
- if (this->orb_shutdown_task_.open(0) != 0)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t) AppShutdown failed to create orb "\
- "shutdown thread.\n"));
- return;
- }
- }
-}
-
-
-AppShutdown*
-AppShutdown::instance ()
-{
- static AppShutdown app_shutdown;
- return &app_shutdown;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h
deleted file mode 100644
index d79c2aababf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppShutdown.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-#ifndef APP_SHUTDOWN_H
-#define APP_SHUTDOWN_H
-
-#include "CSD_TP_Test_Export.h"
-#include "OrbShutdownTask.h"
-#include "tao/ORB.h"
-
-class CSD_TP_Test_Export AppShutdown
-{
- public:
-
- AppShutdown();
- virtual ~AppShutdown();
-
- void init(CORBA::ORB_ptr orb,
- unsigned num_clients
- ACE_ENV_ARG_DECL);
-
- void wait ();
-
- void client_done();
-
- static AppShutdown* instance ();
-
- private:
-
- typedef ACE_SYNCH_MUTEX LockType;
- typedef ACE_Guard<LockType> GuardType;
-
- LockType lock_;
- CORBA::ORB_var orb_;
- unsigned num_clients_;
- unsigned num_clients_shutdown_;
-
- OrbShutdownTask orb_shutdown_task_;
-};
-
-
-#define TheAppShutdown AppShutdown::instance()
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h
deleted file mode 100644
index 9ebd7dc8f34..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Test
-// ------------------------------
-#ifndef CSD_TP_TEST_EXPORT_H
-#define CSD_TP_TEST_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_TEST_HAS_DLL)
-# define CSD_TP_TEST_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_TEST_HAS_DLL */
-
-#if !defined (CSD_TP_TEST_HAS_DLL)
-# define CSD_TP_TEST_HAS_DLL 1
-#endif /* ! CSD_TP_TEST_HAS_DLL */
-
-#if defined (CSD_TP_TEST_HAS_DLL) && (CSD_TP_TEST_HAS_DLL == 1)
-# if defined (CSD_TP_TEST_BUILD_DLL)
-# define CSD_TP_Test_Export ACE_Proper_Export_Flag
-# define CSD_TP_TEST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_TEST_BUILD_DLL */
-# define CSD_TP_Test_Export ACE_Proper_Import_Flag
-# define CSD_TP_TEST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_TEST_BUILD_DLL */
-#else /* CSD_TP_TEST_HAS_DLL == 1 */
-# define CSD_TP_Test_Export
-# define CSD_TP_TEST_SINGLETON_DECLARATION(T)
-# define CSD_TP_TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_TEST_HAS_DLL == 1 */
-
-// Set CSD_TP_TEST_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_TEST_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_TEST_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_TEST_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_TEST_NTRACE */
-
-#if (CSD_TP_TEST_NTRACE == 1)
-# define CSD_TP_TEST_TRACE(X)
-#else /* (CSD_TP_TEST_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_TEST_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_TEST_NTRACE == 1) */
-
-#endif /* CSD_TP_TEST_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc
deleted file mode 100644
index 453ea84a1f0..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CSD_TP_Test_Lib.mpc
+++ /dev/null
@@ -1,39 +0,0 @@
-//$Id$
-project : taolib_with_idl, csd_threadpool {
- sharedname = CSD_TP_Test
- dynamicflags = CSD_TP_TEST_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Test_Export \
- -Wb,export_include=CSD_TP_Test_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- FooException.idl
- TestAppException.idl
- CancelledException.idl
- CustomException.idl
- }
-
- Source_Files {
- AppHelper.cpp
- AppShutdown.cpp
- ClientEngine.cpp
- ClientTask.cpp
- OrbRunner.cpp
- OrbTask.cpp
- TestAppBase.cpp
- StatisticsHelper.cpp
- OrbShutdownTask.cpp
- FooExceptionC.cpp
- FooExceptionS.cpp
- TestAppExceptionC.cpp
- TestAppExceptionS.cpp
- CancelledExceptionC.cpp
- CancelledExceptionS.cpp
- CustomExceptionC.cpp
- CustomExceptionS.cpp
- }
-
- Template_Files {
- ServantList_T.cpp
- }
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl
deleted file mode 100644
index 8f9afcf68de..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CancelledException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef CANCELAPPXCEPTION_IDL
-#define CANCELAPPXCEPTION_IDL
-
-exception CancelledException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp
deleted file mode 100644
index 361bb3cd465..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-#include "ClientEngine.h"
-
-
-ClientEngine::ClientEngine()
-{
-}
-
-
-ClientEngine::~ClientEngine()
-{
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h
deleted file mode 100644
index 3fdd3efd233..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientEngine.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef CLIENT_ENGINE_H
-#define CLIENT_ENGINE_H
-
-#include "CSD_TP_Test_Export.h"
-#include "tao/Intrusive_Ref_Count_Base_T.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-#include "tao/Environment.h"
-#include "ace/Synch.h"
-#include "ace/CORBA_macros.h"
-
-
-class ClientEngine;
-typedef TAO_Intrusive_Ref_Count_Handle<ClientEngine> ClientEngine_Handle;
-
-
-class CSD_TP_Test_Export ClientEngine : public TAO_Intrusive_Ref_Count_Base<ACE_SYNCH_MUTEX>
-{
- public:
-
- ClientEngine();
- virtual ~ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL) = 0;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp
deleted file mode 100644
index 00d92a17608..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-#include "ClientTask.h"
-#include "ClientEngine.h"
-#include "AppShutdown.h"
-#include "ace/SString.h"
-
-
-ClientTask::ClientTask(bool shutdown_after_done)
-: shutdown_after_done_(shutdown_after_done),
- failure_count_(0)
-{
-}
-
-
-ClientTask::~ClientTask()
-{
-}
-
-
-void
-ClientTask::add_engine(ClientEngine* engine)
-{
- // Pass in false so that _add_ref() is called.
- ClientEngine_Handle engine_handle(engine,false);
- this->engines_.push_back(engine_handle);
-}
-
-
-int
-ClientTask::open(void*)
-{
- size_t num_threads = this->engines_.size();
-
- if (num_threads == 0)
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) ClientTask cannot activate 0 threads.\n"),
- -1);
- }
-
- if (this->activate(THR_NEW_LWP | THR_JOINABLE, num_threads) != 0)
- {
- // Assumes that when activate returns non-zero return code that
- // no threads were activated.
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) ClientTask failed to activate "
- "the %d client threads.\n", num_threads),
- -1);
- }
-
- return 0;
-}
-
-
-int
-ClientTask::svc()
-{
- ClientEngine_Handle engine;
-
- {
- GuardType guard(this->lock_);
- this->engines_.get(engine, this->engines_.size() - 1);
- this->engines_.pop_back();
- }
-
- ACE_TRY_NEW_ENV
- {
- bool exec_ret = engine->execute(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (exec_ret == false)
- {
- GuardType guard(this->lock_);
- this->failure_count_ ++;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "ClientTask::svc Caught exception from execute():");
-
- GuardType guard(this->lock_);
- this->failure_count_ ++;
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) ClientTask::svc caught unknown (...) exception "\
- "in execute() " ));
- GuardType guard(this->lock_);
- this->failure_count_ ++;
- }
- ACE_ENDTRY;
-
- if(this->shutdown_after_done_)
- {
- // This is used to shutdown orb for a client application
- // with an orb running.
- TheAppShutdown->client_done ();
- }
-
- return 0;
-}
-
-
-int
-ClientTask::close(u_long)
-{
- return 0;
-}
-
-
-unsigned
-ClientTask::failure_count () const
-{
- return this->failure_count_;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h
deleted file mode 100644
index cc3de7ec8a2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ClientTask.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ClientTask.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef CLIENT_TASK_H
-#define CLIENT_TASK_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ClientEngine.h"
-#include "ace/Task.h"
-#include "ace/Vector_T.h"
-#include "ace/Synch.h"
-
-
-class CSD_TP_Test_Export ClientTask : public ACE_Task_Base
-{
- public:
-
- ClientTask(bool shutdown_after_done = false);
- virtual ~ClientTask();
-
- void add_engine(ClientEngine* engine);
-
- virtual int open(void* arg = 0);
- virtual int svc();
- virtual int close(u_long);
-
- unsigned failure_count () const;
-
- private:
-
- typedef ACE_SYNCH_MUTEX LockType;
- typedef ACE_Guard<LockType> GuardType;
-
- typedef ACE_Vector<ClientEngine_Handle> EngineVector;
-
- LockType lock_;
- EngineVector engines_;
- bool shutdown_after_done_;
- unsigned failure_count_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl
deleted file mode 100644
index 794900c41ce..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/CustomException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef CUSTOMEXCEPTION_IDL
-#define CUSTOMEXCEPTION_IDL
-
-exception CustomException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl
deleted file mode 100644
index 4f76953e24c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/FooException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef FOOEXCEPTION_IDL
-#define FOOEXCEPTION_IDL
-
-exception FooException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp
deleted file mode 100644
index 0cc9c9bd5ad..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id$
-#include "OrbRunner.h"
-#include "OrbTask.h"
-#include "TestAppExceptionC.h"
-
-
-OrbRunner::OrbRunner(CORBA::ORB_ptr orb, unsigned num_orb_threads)
- : orb_(CORBA::ORB::_duplicate(orb)),
- num_orb_threads_(num_orb_threads)
-{
-}
-
-
-OrbRunner::~OrbRunner()
-{
-}
-
-
-void
-OrbRunner::run(ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_ASSERT(this->num_orb_threads_ > 0);
-
- // If the num_orb_threads_ is exactly one, then just use the current
- // (mainline) thread to run the ORB event loop.
- if (this->num_orb_threads_ == 1)
- {
- // Since the num_orb_threads_ is exactly one, we just use the current
- // (mainline) thread to run the ORB event loop.
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- // The num_orb_threads_ is greater than 1, so we will use an OrbTask
- // (active object) to run the ORB event loop in (num_orb_threads_ - 1)
- // threads. We use the current (mainline) thread as the other thread
- // running the ORB event loop.
- OrbTask orb_task(this->orb_.in(), this->num_orb_threads_ - 1);
-
- // Activate the OrbTask worker threads
- if (orb_task.open(0) != 0)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Failed to open the OrbTask.\n"));
- ACE_THROW(TestAppException());
- }
-
- // This will use the current (mainline) thread to run the ORB event loop.
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Now that the current thread has unblocked from running the orb,
- // make sure to wait for all of the worker threads to complete.
- orb_task.wait();
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h
deleted file mode 100644
index 71c7c4e358c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbRunner.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-#ifndef ORB_RUNNER_H
-#define ORB_RUNNER_H
-
-#include "CSD_TP_Test_Export.h"
-#include "tao/ORB.h"
-
-class CSD_TP_Test_Export OrbRunner
-{
- public:
-
- OrbRunner(CORBA::ORB_ptr orb, unsigned num_orb_threads = 1);
- virtual ~OrbRunner();
-
- void run(ACE_ENV_SINGLE_ARG_DECL);
-
-
- private:
-
- CORBA::ORB_var orb_;
- unsigned num_orb_threads_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp
deleted file mode 100644
index 79ba1ba3f5e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbShutdownTask.cpp
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#include "OrbShutdownTask.h"
-#include "ace/CORBA_macros.h"
-#include "ace/OS_NS_unistd.h"
-
-
-OrbShutdownTask::OrbShutdownTask()
-{
-}
-
-
-OrbShutdownTask::~OrbShutdownTask()
-{
-}
-
-
-void
-OrbShutdownTask::orb(CORBA::ORB_ptr orb)
-{
- this->orb_ = CORBA::ORB::_duplicate(orb);
-}
-
-
-int
-OrbShutdownTask::open(void*)
-{
- if (this->activate(THR_NEW_LWP | THR_JOINABLE, 1) != 0)
- {
- // Assumes that when activate returns non-zero return code that
- // no threads were activated.
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbShutdownTask failed to open().\n"),
- -1);
- }
-
- return 0;
-}
-
-
-int
-OrbShutdownTask::svc()
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Exception raised by ORB::shutdown() call "
- "in OrbShutdownTask::svc().\n"));
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-int
-OrbShutdownTask::close(u_long)
-{
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h
deleted file mode 100644
index 221251a7d3f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbShutdownTask.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbShutdownTask.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef ORB_SHUTDOWN_TASK_H
-#define ORB_SHUTDOWN_TASK_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ace/Task.h"
-#include "tao/ORB.h"
-
-
-class CSD_TP_Test_Export OrbShutdownTask : public ACE_Task_Base
-{
- public:
-
- OrbShutdownTask();
- virtual ~OrbShutdownTask();
-
- void orb(CORBA::ORB_ptr orb);
-
- virtual int open(void*);
- virtual int svc();
- virtual int close(u_long);
-
-
- private:
-
- CORBA::ORB_var orb_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp
deleted file mode 100644
index ff6ad717898..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbTask.cpp
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#include "OrbTask.h"
-#include "ace/CORBA_macros.h"
-
-namespace { enum { MAX_ORB_TASK_WORKER_THREADS = 20 }; }
-
-
-OrbTask::OrbTask(CORBA::ORB_ptr orb, unsigned num_threads)
- : orb_(CORBA::ORB::_duplicate(orb)),
- num_threads_(num_threads)
-{
-}
-
-
-OrbTask::~OrbTask()
-{
-}
-
-
-int
-OrbTask::open(void*)
-{
- if (this->num_threads_ < 1)
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to open. "
- "num_threads_ (%d) is less-than 1.\n",
- this->num_threads_),
- -1);
- }
-
- if (this->num_threads_ > MAX_ORB_TASK_WORKER_THREADS)
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to open. "
- "num_threads_ (%d) is too large. Max is %d.\n",
- this->num_threads_, MAX_ORB_TASK_WORKER_THREADS),
- -1);
- }
-
- if (CORBA::is_nil(this->orb_.in()))
- {
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to open. "
- "ORB object reference is nil.\n"),
- -1);
- }
-
- if (this->activate(THR_NEW_LWP | THR_JOINABLE, this->num_threads_) != 0)
- {
- // Assumes that when activate returns non-zero return code that
- // no threads were activated.
- ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) OrbTask failed to activate "
- "(%d) worker threads.\n",
- this->num_threads_),
- -1);
- }
-
- return 0;
-}
-
-
-int
-OrbTask::svc()
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Exception raised by ORB::run() method. "
- "OrbTask is stopping.\n"));
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-int
-OrbTask::close(u_long)
-{
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h
deleted file mode 100644
index dc01e3ca191..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/OrbTask.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file OrbTask.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef ORB_TASK_H
-#define ORB_TASK_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ace/Task.h"
-#include "tao/ORB.h"
-
-class CSD_TP_Test_Export OrbTask : public ACE_Task_Base
-{
- public:
-
- OrbTask(CORBA::ORB_ptr orb, unsigned num_threads = 1);
- virtual ~OrbTask();
-
- virtual int open(void* x = 0);
- virtual int svc();
- virtual int close(u_long);
-
-
- private:
-
- CORBA::ORB_var orb_;
- unsigned num_threads_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp
deleted file mode 100644
index 2727c975253..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// $Id$
-#include "ServantList_T.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-
-
-template <typename T>
-ServantList<T>::ServantList()
-{
-}
-
-
-template <typename T>
-ServantList<T>::~ServantList()
-{
-}
-
-
-template <typename T>
-void
-ServantList<T>::create_and_activate(unsigned num_servants,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- const char* ior_fname_prefix
- ACE_ENV_ARG_DECL)
-{
- for (unsigned i = 0; i < num_servants; i++)
- {
- char buf[32];
- ACE_OS::sprintf(buf, "%02d", i + 1);
- ACE_CString filename = ACE_CString(ior_fname_prefix) + "_" + buf + ".ior";
- ServantRecord record;
- record.servant_ = new T();
- record.safe_servant_ = record.servant_;
-
- CORBA::Object_var obj
- = AppHelper::activate_servant(poa,
- record.safe_servant_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- AppHelper::ref_to_file(orb, obj.in(), filename.c_str() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- record.obj_ = T_stub::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(record.obj_.in()))
- {
- ACE_THROW (TestAppException());
- }
-
- this->servant_records_.push_back(record);
- }
-}
-
-
-template <typename T>
-void
-ServantList<T>::create_and_activate(unsigned num_servants,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- for (unsigned i = 0; i < num_servants; i++)
- {
- ServantRecord record;
- record.servant_ = new T();
- record.safe_servant_ = record.servant_;
-
- CORBA::Object_var obj
- = AppHelper::activate_servant(poa,
- record.safe_servant_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- record.obj_ = T_stub::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(record.obj_.in()))
- {
- ACE_THROW (TestAppException());
- }
-
- this->servant_records_.push_back(record);
- }
-}
-
-
-// Code for reference - doesn't work right now
-#if 0
-template <typename T>
-void
-ServantList<T>::deactivate(PortableServer::POA_ptr poa)
-{
- ServantRecord record;
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableServer::ObjectId_var id =
- poa->servant_to_id(record.safe_servant_.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- poa->deactivate_object(id.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "ServantList_T::deactivate_servant ()");
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)ServantList_T::deactivate_servant "
- "Caught unknown exception \n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-#endif
-
-
-template <typename T>
-typename ServantList<T>::T_stub_ptr
-ServantList<T>::objref(unsigned index)
-{
- return T_stub::_duplicate(this->servant_records_[index].obj_.in());
-}
-
-
-template <typename T>
-T*
-ServantList<T>::servant(unsigned index)
-{
- return this->servant_records_[index].servant_;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h
deleted file mode 100644
index 3cc61e42905..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/ServantList_T.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// $Id$
-#ifndef SERVANTLIST_T_H
-#define SERVANTLIST_T_H
-
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/PortableServer/Servant_Base.h"
-#include "ace/Vector_T.h"
-
-
-// The T type is a concrete servant type.
-template <class T>
-class ServantList
-{
- public:
-
- typedef typename T::_stub_type T_stub;
- typedef typename T::_stub_ptr_type T_stub_ptr;
- typedef typename T::_stub_var_type T_stub_var;
-
- ServantList();
- ~ServantList();
-
- /// Activate servant and output ior to a file.
- void create_and_activate(unsigned num_servants,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- const char* ior_fname_prefix
- ACE_ENV_ARG_DECL);
-
- /// Activate servant and not output ior to a file.
- void create_and_activate(unsigned num_servants,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- // Code not used and not working right now - possible future addition.
- //void deactivate(PortableServer::POA_ptr poa);
-
- /// Get a (copy) of one of the object references (for a specific servant).
- T_stub_ptr objref(unsigned index);
- /// This doesn't return a copy.
- T* servant(unsigned index);
-
-
- private:
-
- struct ServantRecord
- {
- T* servant_;
- PortableServer::ServantBase_var safe_servant_;
- T_stub_var obj_;
- };
-
- typedef ACE_Vector<ServantRecord> ServantRecordVector;
-
- ServantRecordVector servant_records_;
-};
-
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ServantList_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("ServantList_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* SERVANTLIST_T_H */
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp
deleted file mode 100644
index 456d7025478..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id$
-#include "StatisticsHelper.h"
-
-// swap function for integers
-void swap ( CORBA::Long& x, CORBA::Long& y )
-{
- CORBA::Long temp;
- temp = x;
- x = y;
- y = temp;
-}
-
-
-void sort ( LongVector & vector )
-{
- unsigned size = vector.size ();
-
- if (size > 0)
- {
- unsigned indexOfMin;
- unsigned pass;
- unsigned j;
-
- for ( pass = 0; pass < size - 1; pass++ )
- {
- indexOfMin = pass;
-
- for ( j = pass + 1; j < size; j++ )
- if ( vector[j] < vector[indexOfMin] )
- indexOfMin = j;
-
- swap ( vector[pass], vector[indexOfMin] );
- }
- }
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h
deleted file mode 100644
index 7f26a4ae165..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/StatisticsHelper.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-#ifndef STATISTICS_HELPER_H
-#define STATISTICS_HELPER_H
-
-#include "CSD_TP_Test_Export.h"
-#include "tao/Basic_Types.h"
-#include "ace/Array.h"
-#include "ace/Vector_T.h"
-#include "ace/SString.h"
-
-
-typedef ACE_Vector< CORBA::Long, 1000 > LongVector;
-typedef ACE_Vector< ACE_CString, 1000 > StringVector;
-typedef ACE_Array< CORBA::Long > LongArray;
-
-
-extern CSD_TP_Test_Export
-void swap ( CORBA::Long& x, CORBA::Long& y );
-
-extern CSD_TP_Test_Export
-void sort ( LongVector & vector );
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp
deleted file mode 100644
index f2a2e97b7a2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-#include "TestAppBase.h"
-
-TestAppBase::TestAppBase(const char* name)
- : name_(name)
-{
-}
-
-
-TestAppBase::~TestAppBase()
-{
-}
-
-
-const char*
-TestAppBase::name() const
-{
- return this->name_.c_str();
-}
-
-
-int
-TestAppBase::run(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int rc = this->run_i(argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Convert 1 to 0. Leave 0 and -1 as they are.
- return (rc == 1) ? 0 : rc;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h
deleted file mode 100644
index 5138ffbf84c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppBase.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id$
-#ifndef TESTAPPBASE_H
-#define TESTAPPBASE_H
-
-#include "CSD_TP_Test_Export.h"
-#include "ace/SString.h"
-#include "tao/Environment.h"
-#include "ace/CORBA_macros.h"
-
-
-class CSD_TP_Test_Export TestAppBase
-{
- public:
-
- virtual ~TestAppBase();
-
- // Returns 0 for success, and -1 for failure.
- int run(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
- const char* name() const;
-
-
- protected:
-
- TestAppBase(const char* name);
-
- // Returns -1 for failure, 0 for success
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL) = 0;
-
-
- private:
-
- ACE_CString name_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl
deleted file mode 100644
index 2ac53939b77..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppException.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#ifndef TESTAPPXCEPTION_IDL
-#define TESTAPPXCEPTION_IDL
-
-exception TestAppException {};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h
deleted file mode 100644
index 062b6fc0c8e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Common/TestAppMain.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-#ifndef TESTAPPMAIN_H
-#define TESTAPPMAIN_H
-
-#include "ace/Log_Msg.h"
-#include "ace/SString.h"
-#include "tao/Exception.h"
-#include "tao/Environment.h"
-
-#define TEST_APP_MAIN(APP_TYPE) \
-int \
-main(int argc, char* argv[]) \
-{ \
- ACE_LOG_MSG->priority_mask(LM_TRACE | \
- LM_DEBUG | \
- LM_INFO | \
- LM_NOTICE | \
- LM_WARNING | \
- LM_ERROR | \
- LM_CRITICAL | \
- LM_ALERT | \
- LM_EMERGENCY, \
- ACE_Log_Msg::PROCESS); \
-\
- APP_TYPE app; \
-\
- ACE_TRY_NEW_ENV \
- { \
- int ret = app.run(argc,argv ACE_ENV_ARG_PARAMETER); \
- ACE_TRY_CHECK; \
- return ret; \
- } \
- ACE_CATCHANY \
- { \
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, \
- "Caught exception:"); \
- } \
- ACE_CATCHALL \
- { \
- ACE_ERROR((LM_ERROR, \
- "(%P|%t) Unknown (...) exception caught in main() " \
- "for App [%d].\n", app.name())); \
- } \
- ACE_ENDTRY; \
- \
- return 1; \
-}
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h
deleted file mode 100644
index 9b855c486d8..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/CSD_TP_Foo_A_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Foo_A
-// ------------------------------
-#ifndef CSD_TP_FOO_A_EXPORT_H
-#define CSD_TP_FOO_A_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_FOO_A_HAS_DLL)
-# define CSD_TP_FOO_A_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_FOO_A_HAS_DLL */
-
-#if !defined (CSD_TP_FOO_A_HAS_DLL)
-# define CSD_TP_FOO_A_HAS_DLL 1
-#endif /* ! CSD_TP_FOO_A_HAS_DLL */
-
-#if defined (CSD_TP_FOO_A_HAS_DLL) && (CSD_TP_FOO_A_HAS_DLL == 1)
-# if defined (CSD_TP_FOO_A_BUILD_DLL)
-# define CSD_TP_Foo_A_Export ACE_Proper_Export_Flag
-# define CSD_TP_FOO_A_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_A_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_FOO_A_BUILD_DLL */
-# define CSD_TP_Foo_A_Export ACE_Proper_Import_Flag
-# define CSD_TP_FOO_A_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_A_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_FOO_A_BUILD_DLL */
-#else /* CSD_TP_FOO_A_HAS_DLL == 1 */
-# define CSD_TP_Foo_A_Export
-# define CSD_TP_FOO_A_SINGLETON_DECLARATION(T)
-# define CSD_TP_FOO_A_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_FOO_A_HAS_DLL == 1 */
-
-// Set CSD_TP_FOO_A_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_FOO_A_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_FOO_A_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_FOO_A_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_FOO_A_NTRACE */
-
-#if (CSD_TP_FOO_A_NTRACE == 1)
-# define CSD_TP_FOO_A_TRACE(X)
-#else /* (CSD_TP_FOO_A_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_FOO_A_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_FOO_A_NTRACE == 1) */
-
-#endif /* CSD_TP_FOO_A_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl
deleted file mode 100644
index e9f3b0345f8..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-#ifndef FOO_A_IDL
-#define FOO_A_IDL
-
-#include "FooException.idl"
-
-interface Foo_A
-{
- /// void return-type, no arguments
- void op1();
-
- /// void return-type, 1 "in" argument
- void op2(in long value);
-
- /// long return-type, 1 "in" argument
- long op3(in long value);
-
- /// one-way version of op2
- oneway void op4(in long value);
-
- /// Operation that always raises an exception.
- void op5() raises (FooException);
-
- /// Client calls this last. The last client to claim that it is
- /// done will cause the server to shutdown.
- void done();
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp
deleted file mode 100644
index bb0d1cf1bf7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id$
-#include "Foo_A_ClientEngine.h"
-#include "Foo_A_Statistics.h"
-#include "TestAppExceptionC.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-
-Foo_A_ClientEngine::Foo_A_ClientEngine(Foo_A_ptr obj,
- unsigned client_id,
- bool collocated)
- : obj_(Foo_A::_duplicate(obj)),
- client_id_ (client_id),
- collocated_ (collocated)
-{
-}
-
-
-Foo_A_ClientEngine::~Foo_A_ClientEngine()
-{
-}
-
-
-bool
-Foo_A_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- // Verify the return values and return the results.
- bool check_validity = true;
-
- CORBA::Long i = this->client_id_;
-
- this->obj_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->op2(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::Long value = this->obj_->op3(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != i)
- {
- check_validity = false;
- }
-
- for (CORBA::Long j = 1; j <= 5; j++)
- {
- this->obj_->op4(495 + (i * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
-
- ACE_TRY
- {
- this->obj_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_A_ClientEngine::expected_results(Foo_A_Statistics& stats)
-{
- stats.expected(1, 1);
- stats.expected(2, 1);
- stats.expected(3, 1);
- stats.expected(4, 5);
- stats.expected(5, 1);
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h
deleted file mode 100644
index 4f49888f34f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_ClientEngine.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_A_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_A_CLIENT_ENGINE_H
-#define FOO_A_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_A_Export.h"
-#include "ClientEngine.h"
-#include "Foo_AC.h"
-
-class Foo_A_Statistics;
-
-class CSD_TP_Foo_A_Export Foo_A_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_A_ClientEngine(Foo_A_ptr obj, unsigned client_id = 0, bool collocated = false);
- virtual ~Foo_A_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_A_Statistics& stats);
-
- private:
-
- Foo_A_var obj_;
- unsigned client_id_;
- bool collocated_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp
deleted file mode 100644
index 1ef8ce83cd7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-// $Id$
-#include "Foo_A_Statistics.h"
-#include "Foo_A_ClientEngine.h"
-
-Foo_A_Statistics::Foo_A_Statistics(unsigned num_clients)
-: num_clients_ (num_clients)
-{
- for (unsigned i = 0; i < 5; i++)
- {
- this->expected_[i] = 0;
- this->actual_[i] = 0;
- }
-}
-
-
-Foo_A_Statistics::~Foo_A_Statistics()
-{
-}
-
-
-void
-Foo_A_Statistics::expected(unsigned op_num, unsigned count)
-{
- this->expected_[op_num-1] = count * this->num_clients_;
-}
-
-
-void
-Foo_A_Statistics::actual(unsigned op_num, unsigned count)
-{
- this->actual_[op_num-1] += count;
-}
-
-
-void
-Foo_A_Statistics::actual_in_values(unsigned op_num, LongVector lv)
-{
- size_t sz = lv.size();
- for (size_t i = 0; i < sz; i++)
- {
- this->actual_in_values_[op_num-1].push_back (lv[i]);
- }
-}
-
-
-bool
-Foo_A_Statistics::actual_vs_expected()
-{
- Foo_A_Statistics stats (1);
- Foo_A_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < 5; i++)
- {
- if (this->expected_[i] != this->actual_[i])
- {
- return false;
- }
-
- // Verify the "in" values.
- // Skip op1/op5 since they do not have any "in" values.
- if (i % 5 == 0 || i % 5 == 4)
- {
- continue;
- }
-
- unsigned actual_size
- = this->actual_in_values_[i].size ();
- unsigned expected_size
- = this->num_clients_ * stats.expected_[i];
- if (actual_size != expected_size)
- {
- return false;
- }
- sort (this->actual_in_values_[i]);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (this->actual_in_values_[i][j] != this->actual_in_values_[i][j + 1] - 1)
- {
- return false;
- }
- }
- }
- return true;
-}
-
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h
deleted file mode 100644
index d5bf9ea2c71..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_Statistics.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id$
-#ifndef STATISTICS_A_H
-#define STATISTICS_A_H
-
-#include "CSD_TP_Foo_A_Export.h"
-#include "StatisticsHelper.h"
-
-
-class CSD_TP_Foo_A_Export Foo_A_Statistics
-{
- public:
-
- Foo_A_Statistics(unsigned num_clients);
-
- virtual ~Foo_A_Statistics();
-
- void expected(unsigned op_num, unsigned count);
- void actual(unsigned op_num, unsigned count);
- void actual_in_values(unsigned op_num, LongVector lv);
-
- bool actual_vs_expected();
-
-
- private:
-
- unsigned num_clients_;
-
- unsigned expected_[5];
- unsigned actual_[5];
-
- LongVector actual_in_values_ [5];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp
deleted file mode 100644
index a3bab7748aa..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// $Id$
-#include "Foo_A_i.h"
-#include "AppShutdown.h"
-
-
-Foo_A_i::Foo_A_i()
-{
- for (unsigned i = 0; i < 5; i++)
- {
- this->op_count_[i] = 0;
- }
-}
-
-
-Foo_A_i::~Foo_A_i()
-{
-}
-
-
-void
-Foo_A_i::op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[0] ++;
-}
-
-
-void
-Foo_A_i::op2(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[1].push_back (value);
- this->op_count_[1] ++;
-}
-
-
-CORBA::Long
-Foo_A_i::op3(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[2].push_back (value);
- this->op_count_[2] ++;
- return value;
-}
-
-
-void
-Foo_A_i::op4(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[3].push_back (value);
- this->op_count_[3] ++;
-}
-
-
-void
-Foo_A_i::op5(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException, FooException))
-{
- this->op_count_[4] ++;
- ACE_THROW (FooException());
-}
-
-
-void
-Foo_A_i::done(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- TheAppShutdown->client_done();
-}
-
-
-void
-Foo_A_i::gather_stats(Foo_A_Statistics& stats)
-{
- for (unsigned i = 0; i < 5; i++)
- {
- stats.actual (i + 1, this->op_count_[i]);
- stats.actual_in_values (i + 1, this->in_values_[i]);
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h
deleted file mode 100644
index 6361baa6ca7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/Foo_A_i.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-#ifndef FOO_A_I_H
-#define FOO_A_I_H
-
-#include "CSD_TP_Foo_A_Export.h"
-#include "Foo_AS.h"
-#include "Foo_A_Statistics.h"
-
-
-class CSD_TP_Foo_A_Export Foo_A_i : public virtual POA_Foo_A
-{
- public:
-
- Foo_A_i();
- virtual ~Foo_A_i();
-
- virtual void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op2(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual CORBA::Long op3(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op4(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException, FooException));
-
- virtual void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void gather_stats (Foo_A_Statistics& stats) ;
-
- private:
-
- LongVector in_values_ [5];
- unsigned op_count_ [5];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc
deleted file mode 100644
index 7f2027a9f5d..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_A/csd_tp_foo_a_lib.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-//$Id$
-project : csd_tp_test_lib {
- sharedname = CSD_TP_Foo_A
- dynamicflags = CSD_TP_FOO_A_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Foo_A_Export -Wb,export_include=CSD_TP_Foo_A_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- Foo_A.idl
- }
-
- Source_Files {
- Foo_AC.cpp
- Foo_AS.cpp
- Foo_A_ClientEngine.cpp
- Foo_A_i.cpp
- Foo_A_Statistics.cpp
- }
-
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h
deleted file mode 100644
index c6e2f4cd967..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/CSD_TP_Foo_B_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Foo_B
-// ------------------------------
-#ifndef CSD_TP_FOO_B_EXPORT_H
-#define CSD_TP_FOO_B_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_FOO_B_HAS_DLL)
-# define CSD_TP_FOO_B_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_FOO_B_HAS_DLL */
-
-#if !defined (CSD_TP_FOO_B_HAS_DLL)
-# define CSD_TP_FOO_B_HAS_DLL 1
-#endif /* ! CSD_TP_FOO_B_HAS_DLL */
-
-#if defined (CSD_TP_FOO_B_HAS_DLL) && (CSD_TP_FOO_B_HAS_DLL == 1)
-# if defined (CSD_TP_FOO_B_BUILD_DLL)
-# define CSD_TP_Foo_B_Export ACE_Proper_Export_Flag
-# define CSD_TP_FOO_B_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_B_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_FOO_B_BUILD_DLL */
-# define CSD_TP_Foo_B_Export ACE_Proper_Import_Flag
-# define CSD_TP_FOO_B_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_B_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_FOO_B_BUILD_DLL */
-#else /* CSD_TP_FOO_B_HAS_DLL == 1 */
-# define CSD_TP_Foo_B_Export
-# define CSD_TP_FOO_B_SINGLETON_DECLARATION(T)
-# define CSD_TP_FOO_B_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_FOO_B_HAS_DLL == 1 */
-
-// Set CSD_TP_FOO_B_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_FOO_B_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_FOO_B_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_FOO_B_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_FOO_B_NTRACE */
-
-#if (CSD_TP_FOO_B_NTRACE == 1)
-# define CSD_TP_FOO_B_TRACE(X)
-#else /* (CSD_TP_FOO_B_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_FOO_B_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_FOO_B_NTRACE == 1) */
-
-#endif /* CSD_TP_FOO_B_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl
deleted file mode 100644
index 49be42260cb..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-#ifndef CALLBACK_IDL
-#define CALLBACK_IDL
-
-interface Callback
-{
- void test_method();
-};
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp
deleted file mode 100644
index 8438b572ce2..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-#include "Callback_i.h"
-
-Callback_i::Callback_i()
- : num_callbacks_(0)
-{
-}
-
-
-Callback_i::~Callback_i ()
-{
-}
-
-
-void
-Callback_i::test_method(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->num_callbacks_ ++;
-}
-
-
-void
-Callback_i::gather_stats(Foo_B_Statistics& stats)
-{
- stats.actual_callbacks(this->num_callbacks_);
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h
deleted file mode 100644
index 8948435ceed..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Callback_i.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id$
-#ifndef CALLBACK_I_H
-#define CALLBACK_I_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "CallbackS.h"
-#include "Foo_B_Statistics.h"
-
-
-class CSD_TP_Foo_B_Export Callback_i
- : public virtual POA_Callback
-{
- public:
-
- Callback_i();
-
- virtual ~Callback_i();
-
- virtual void test_method(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void gather_stats(Foo_B_Statistics& stats);
-
-
- private:
-
- unsigned num_callbacks_;
-};
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl
deleted file mode 100644
index 2b6b7382fab..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B.idl
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id$
-#ifndef FOO_B_IDL
-#define FOO_B_IDL
-
-#include "FooException.idl"
-#include "Callback.idl"
-
-
-typedef sequence<char, 32> Bounded_Var_Size;
-typedef sequence<char> Unbounded_Var_Size;
-typedef long Fixed_Array[20];
-typedef string Var_Array [3];
-
-struct TimeOfDay {
- short hour; // 0 - 23
- short minute; // 0 - 59
- short second; // 0 - 59
-};
-interface Foo_B
-{
- /// void return-type, no arguments
- void op1();
-
- /// void return-type, 1 "in" argument
- void op2(in long value);
-
- /// long return-type, 1 "in" argument
- long op3(in long value);
-
- /// one-way version of op2
- oneway void op4(in long value);
-
- /// Operation that always raises an exception.
- void op5() raises (FooException);
-
- /// Test fixed size "in" argument and the "inout" parameter.
- boolean op6(in TimeOfDay t,
- inout string message);
-
- /// Callback test.
-
- /// Pass the callback object and the server invoke operation on
- /// the callback object reference.
- void op7 (in Callback cb) raises (FooException);
-
- oneway void test_unbounded_string_arg(in string message);
-
- oneway void test_bounded_string_arg(in string<20> message);
-
- oneway void test_fixed_array_arg(in Fixed_Array message);
-
- oneway void test_var_array_arg(in Var_Array messages);
-
- oneway void test_bounded_var_size_arg(in Bounded_Var_Size message);
-
- oneway void test_unbounded_var_size_arg(in Unbounded_Var_Size message);
-
- oneway void test_fixed_size_arg (in TimeOfDay t);
-
- oneway void test_special_basic_arg(in boolean value, in long client_id);
-
- oneway void test_objref_arg (in Callback cb);
-
- /// Client calls this last. The last client to claim that it is
- /// done will cause the server to shutdown.
- void done();
-};
-
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp
deleted file mode 100644
index a928eb12169..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-// $Id$
-#include "Foo_B_ClientEngine.h"
-#include "Callback_i.h"
-#include "Foo_B_Statistics.h"
-#include "TestAppExceptionC.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS.h"
-
-const char* ONEWAY_ARG_TEST_STR = "TEST";
-
-Foo_B_ClientEngine::Foo_B_ClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id,
- bool collocated)
- : obj_(Foo_B::_duplicate(obj)),
- callback_(Callback::_duplicate(callback)),
- client_id_(client_id),
- collocated_(collocated)
-{
-}
-
-
-Foo_B_ClientEngine::~Foo_B_ClientEngine()
-{
-}
-
-
-bool
-Foo_B_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- // Verify the return values and return the results.
- bool check_validity = true;
-
- this->obj_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->op2(this->client_id_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::Long value = this->obj_->op3(this->client_id_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != static_cast<CORBA::Long>(this->client_id_))
- {
- check_validity = false;
- }
-
- for (CORBA::ULong j = 1; j <= 5; j++)
- {
- this->obj_->op4(495 + (this->client_id_ * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
-
- ACE_TRY
- {
- this->obj_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- TimeOfDay t;
- t.hour = 12;
- t.minute = 30;
- t.second = 10;
-
- char test_str [20];
- ACE_OS::sprintf (test_str, "%d %s", this->client_id_, ONEWAY_ARG_TEST_STR);
-
- char buffer [20];
-
- // Two-Way calls with "inout" and fixed size "in" arguments.
- CORBA::String_var message = CORBA::string_dup(test_str);
-
- CORBA::Boolean result = this->obj_->op6( t, message.inout() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- ACE_UNUSED_ARG(result);
-
- ACE_OS::sprintf (buffer, "%d %s %d:%d:%d", this->client_id_, ONEWAY_ARG_TEST_STR,
- t.hour, t.minute, t.second);
-
- if (ACE_OS::strncmp (message.in (), buffer, ACE_OS::strlen (buffer)) != 0)
- {
- check_validity = false;
- }
-
- // Callback test.
- this->obj_->op7 (this->callback_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- // One-Way calls with various arguments.
- CORBA::String_var ub_string = CORBA::string_dup( test_str );
- this->obj_->test_unbounded_string_arg (ub_string.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::String_var bd_string = CORBA::string_dup( test_str );
- this->obj_->test_bounded_string_arg (bd_string.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Fixed_Array fixed_array;
-
- for (CORBA::ULong m = 0 ; m < 20; m ++)
- {
- fixed_array[m] = this->client_id_ + m;
- }
-
- this->obj_->test_fixed_array_arg (fixed_array ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Var_Array var_array;
-
- for (CORBA::ULong k = 0; k < 3; k++)
- {
- ACE_OS::sprintf (buffer, "%d %s %d",
- this->client_id_, ONEWAY_ARG_TEST_STR, k);
- var_array[k] = CORBA::string_dup(buffer);
- }
-
- this->obj_->test_var_array_arg (var_array ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Bounded_Var_Size_var bd_var_size_string = new Bounded_Var_Size();
-
- bd_var_size_string->replace (ACE_OS::strlen (test_str) + 1,
- test_str);
- this->obj_->test_bounded_var_size_arg (bd_var_size_string.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- Unbounded_Var_Size_var ub_var_size_string = new Unbounded_Var_Size(100);
- ub_var_size_string->replace (ub_var_size_string->maximum (),
- ACE_OS::strlen (test_str) + 1,
- test_str);
- this->obj_->test_unbounded_var_size_arg (ub_var_size_string.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->test_fixed_size_arg (t ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->test_special_basic_arg (this->client_id_ % 2,
- this->client_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->test_objref_arg (this->callback_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- // Sleep for 5 seconds before invoking done().
- // This is a workaround with the problem that some oneway requests lost
- // when the server has multiple orb threads.
- ACE_OS::sleep (5);
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_B_ClientEngine::expected_results(Foo_B_Statistics& stats)
-{
- stats.expected(1, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(2, 1, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(3, 1, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(4, 5, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(5, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(6, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(7, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(8, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(9, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(10, 1, Foo_B_Statistics::FOO_B_STAT_LONG);
- stats.expected(11, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(12, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(13, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(14, 1, Foo_B_Statistics::FOO_B_STAT_STRING);
- stats.expected(15, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected(16, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
- stats.expected_callbacks (1);
-}
-
-
-unsigned
-Foo_B_ClientEngine::expected_callbacks ()
-{
- return 1;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h
deleted file mode 100644
index a6e8e51667b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_ClientEngine.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_B_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_B_CLIENT_ENGINE_H
-#define FOO_B_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "ClientEngine.h"
-#include "Foo_BC.h"
-
-class Foo_B_Statistics;
-class Callback_i;
-
-class CSD_TP_Foo_B_Export Foo_B_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_B_ClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id = 0,
- bool collocated = false);
-
- virtual ~Foo_B_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_B_Statistics& stats);
- static unsigned expected_callbacks ();
-
- private:
-
- Foo_B_var obj_;
- Callback_var callback_;
- unsigned client_id_;
- bool collocated_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp
deleted file mode 100644
index ec2d97c6bdf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-// $Id$
-#include "Foo_B_SimpleClientEngine.h"
-#include "Callback_i.h"
-#include "Foo_B_Statistics.h"
-#include "TestAppExceptionC.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS.h"
-
-extern const char* ONEWAY_ARG_TEST_STR;
-
-Foo_B_SimpleClientEngine::Foo_B_SimpleClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id,
- bool collocated)
- : obj_(Foo_B::_duplicate(obj)),
- callback_(Callback::_duplicate(callback)),
- client_id_(client_id),
- collocated_(collocated)
-{
-}
-
-
-Foo_B_SimpleClientEngine::~Foo_B_SimpleClientEngine()
-{
-}
-
-
-bool
-Foo_B_SimpleClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_SimpleClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- // Verify the return values and return the results.
- bool check_validity = true;
-
- // Callback test.
- ACE_TRY
- {
- if (CORBA::is_nil(this->callback_.in()))
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_SimpleClientEngine::execute " \
- "The callback_ objref is nil before op7() call!\n"));
- }
-
- this->obj_->op7 (this->callback_.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_SimpleClientEngine::execute " \
- "FooException raised by op7() call.\n"));
- check_validity = false;
- }
- ACE_ENDTRY;
-
- // Tell the servant that this client is done.
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_B_SimpleClientEngine::expected_results(Foo_B_Statistics& stats)
-{
- stats.expected(7, 1, Foo_B_Statistics::FOO_B_STAT_NONE);
-}
-
-
-unsigned
-Foo_B_SimpleClientEngine::expected_callbacks ()
-{
- return 1;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h
deleted file mode 100644
index 38ef6a09bcf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_SimpleClientEngine.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_B_SimpleClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_B_SIMPLE_CLIENT_ENGINE_H
-#define FOO_B_SIMPLE_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "ClientEngine.h"
-#include "Foo_BC.h"
-
-class Foo_B_Statistics;
-class Callback_i;
-
-class CSD_TP_Foo_B_Export Foo_B_SimpleClientEngine : public ClientEngine
-{
- public:
-
- Foo_B_SimpleClientEngine(Foo_B_ptr obj,
- Callback_ptr callback,
- unsigned client_id = 0,
- bool collocated = false);
-
- virtual ~Foo_B_SimpleClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_B_Statistics& stats);
- static unsigned expected_callbacks ();
-
- private:
-
- Foo_B_var obj_;
- Callback_var callback_;
- unsigned client_id_;
- bool collocated_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp
deleted file mode 100644
index 6cf19e95125..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-// $Id$
-#include "Foo_B_Statistics.h"
-#include "Foo_B_ClientEngine.h"
-
-extern const char* ONEWAY_ARG_TEST_STR;
-extern CORBA::Boolean special_value;
-
-Foo_B_Statistics::Foo_B_Statistics(unsigned num_remote_clients,
- unsigned num_collcated_clients)
-: num_clients_ (num_remote_clients + num_collcated_clients),
- num_collcated_clients_ (num_collcated_clients),
- expected_callbacks_ (0),
- actual_callbacks_ (0),
- servant_error_count_ (0)
-{
- for (unsigned i = 0; i < 16; i++)
- {
- this->expected_op_count_[i] = 0;
- this->actual_op_count_[i] = 0;
- }
-}
-
-
-Foo_B_Statistics::~Foo_B_Statistics()
-{
-}
-
-
-void
-Foo_B_Statistics::expected(unsigned op_num, unsigned count, In_Value_Type type)
-{
- this->expected_op_count_[op_num-1] = count * this->num_clients_;
- this->expected_in_value_type_[op_num-1] = type;
-}
-
-
-void
-Foo_B_Statistics::actual(unsigned op_num, unsigned count)
-{
- this->actual_op_count_[op_num-1] += count;
-}
-
-
-void
-Foo_B_Statistics::actual(unsigned op_num, LongVector lv)
-{
- unsigned sz = lv.size();
- for (unsigned i = 0; i < sz; i++)
- {
- this->actual_in_long_[op_num-1].push_back (lv[i]);
- }
-}
-
-
-void
-Foo_B_Statistics::actual(unsigned op_num, StringVector sv)
-{
- unsigned sz = sv.size();
- for (unsigned i = 0; i < sz; i++)
- {
- this->actual_in_string_[op_num-1].push_back (sv[i]);
- }
-}
-
-
-void
-Foo_B_Statistics::expected_callbacks (unsigned num_cbs)
-{
- expected_callbacks_ = num_cbs * this->num_collcated_clients_;
-}
-
-
-void
-Foo_B_Statistics::actual_callbacks (unsigned num_cbs)
-{
- actual_callbacks_ += num_cbs;
-}
-
-
-void
-Foo_B_Statistics::servant_error_count (unsigned error_count)
-{
- this->servant_error_count_ += error_count;
-}
-
-
-bool
-Foo_B_Statistics::actual_vs_expected()
-{
- bool ret = true;
-
- // Verify the checking results in servant operation code.
- if (this->servant_error_count_ > 0)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "servant_error_count_=%u\n", servant_error_count_));
- if (ret)
- ret = false;
- }
-
- // Verify the number of callbacks received for the collocated
- // client.
- if (actual_callbacks_ != expected_callbacks_)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_callbacks_=%u expected_callbacks_=%u \n",
- actual_callbacks_, expected_callbacks_));
- if (ret)
- ret = false;
- }
-
- // Verify the number of operations server received.
- for (unsigned int z = 0; z < 16; z++)
- {
- if (this->expected_op_count_[z] != this->actual_op_count_[z])
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "expected_op_count_[%u]=%u actual_op_count_[%u]=%u \n",
- z, expected_op_count_[z], z, actual_op_count_[z]));
- if (ret)
- ret = false;
- }
- }
-
- Foo_B_Statistics stats (1, 0);
- Foo_B_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < 16; i++)
- {
- switch (expected_in_value_type_[i])
- {
- case FOO_B_STAT_LONG:
- {
- unsigned actual_size
- = this->actual_in_long_[i].size ();
- unsigned expected_size
- = this->num_clients_ * stats.expected_op_count_[i];
- if (actual_size != expected_size)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_size=%u expected_size=%u\n", actual_size, expected_size));
- if (ret)
- ret = false;
- }
- sort (this->actual_in_long_[i]);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (this->actual_in_long_[i][j] != this->actual_in_long_[i][j + 1] - 1)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_in_long_[%u][%u]=%d actual_in_long_[%u][%u]=%d\n",
- i, j, actual_in_long_[i][j], i, j+1, actual_in_long_[i][j + 1]));
- if (ret)
- ret = false;
- }
- }
- }
- break;
-
- case FOO_B_STAT_STRING:
- {
- unsigned actual_size
- = this->actual_in_string_[i].size ();
- unsigned expected_size
- = this->num_clients_ * stats.expected_op_count_[i];
- if (actual_size != expected_size)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_size=%u expected_size=%u\n", actual_size, expected_size));
- if (ret)
- ret = false;
- }
-
- LongVector lvec;
- char buffer[50];
-
- for (unsigned k = 0; k < actual_size; k++)
- {
- unsigned client_id;
- sscanf (this->actual_in_string_[i][k].c_str(), "%u %s", &client_id, buffer);
- if (ACE_OS::strcmp (buffer, ONEWAY_ARG_TEST_STR) != 0)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "actual_in_string_[%u][%u]=%s \n",
- i, k, actual_in_string_[i][k].c_str()));
- if (ret)
- ret = false;
- }
- lvec.push_back (client_id);
- }
-
- sort (lvec);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (lvec[j] != lvec[j + 1] - 1)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_Statistics::actual_vs_expected "
- "lvec[%u]=%d lvec[%u]=%d\n",
- j, lvec[j], j+1, lvec[j + 1]));
- if (ret)
- ret = false;
- }
- }
- }
- break;
-
- case FOO_B_STAT_NONE:
- default:
- break;
- }
-
- }
-
- return ret;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h
deleted file mode 100644
index cf21382c549..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_Statistics.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-#ifndef STATISTICS_B_H
-#define STATISTICS_B_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "StatisticsHelper.h"
-
-
-class CSD_TP_Foo_B_Export Foo_B_Statistics
-{
- public:
-
- enum In_Value_Type
- {
- FOO_B_STAT_NONE,
- FOO_B_STAT_STRING,
- FOO_B_STAT_LONG
- };
-
- Foo_B_Statistics(unsigned num_remote_clients,
- unsigned num_collcated_clients);
-
- virtual ~Foo_B_Statistics();
-
- void expected(unsigned op_num, unsigned count, In_Value_Type type);
- void actual(unsigned op_num, unsigned count);
- void actual(unsigned op_num, LongVector lv);
- void actual(unsigned op_num, StringVector sv);
- void servant_error_count(unsigned error_count);
-
- void expected_callbacks (unsigned num_cbs);
- void actual_callbacks (unsigned num_cbs);
-
- bool actual_vs_expected();
-
-private:
-
- unsigned num_clients_;
- unsigned num_collcated_clients_;
-
- LongVector actual_in_long_ [16];
- StringVector actual_in_string_ [16];
-
- unsigned expected_op_count_[16];
- unsigned actual_op_count_[16];
- unsigned expected_in_value_type_[16];
-
- unsigned expected_callbacks_;
- unsigned actual_callbacks_;
-
- unsigned servant_error_count_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp
deleted file mode 100644
index 5ee8d0b8690..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-// $Id$
-#include "Foo_B_i.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "ace/OS.h"
-#include "ace/SString.h"
-
-
-Foo_B_i::Foo_B_i()
-: error_count_ (0)
-{
- for (unsigned i = 0; i < 16; i++)
- {
- op_count_[i] = 0;
- }
-}
-
-
-Foo_B_i::~Foo_B_i()
-{
-}
-
-
-void
-Foo_B_i::op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[0] ++;
-}
-
-
-void
-Foo_B_i::op2(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[1] ++;
- this->in_long_[1].push_back (value);
-}
-
-
-CORBA::Long
-Foo_B_i::op3(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[2] ++;
- this->in_long_[2].push_back (value);
- return value;
-}
-
-
-void
-Foo_B_i::op4(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[3] ++;
- this->in_long_[3].push_back (value);
-}
-
-
-void
-Foo_B_i::op5(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException, FooException))
-{
- this->op_count_[4] ++;
- ACE_THROW (FooException());
-}
-
-
-CORBA::Boolean
-Foo_B_i::op6(const TimeOfDay& t,
- char*& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[5] ++;
- char buf [20];
- ACE_OS::sprintf (buf, "%s %d:%d:%d", message, t.hour, t.minute, t.second);
- CORBA::string_free (message);
- message = CORBA::string_dup (buf);
-
- return 1;
-}
-
-
-void
-Foo_B_i::op7(Callback_ptr cb
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException,
- FooException))
-{
- this->op_count_[6] ++;
-
- if (CORBA::is_nil (cb))
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::op7 nil callback error_count %u\n",
- error_count_));
- ACE_THROW (FooException ());
- }
- else
- {
- cb->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-
-void
-Foo_B_i::test_unbounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[7] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_unbounded_string_arg ")
- // ACE_TEXT("got unbounded string %s\n"),
- // message));
- this->in_string_[7].push_back (message);
-}
-
-
-void
-Foo_B_i::test_bounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[8] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_bounded_string_arg ")
- // ACE_TEXT("got bounded string %s\n"),
- // message));
- this->in_string_[8].push_back (message);
-}
-
-
-void
-Foo_B_i::test_fixed_array_arg(const Fixed_Array message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[9] ++;
-
- for (unsigned i = 0; i < 19; i++)
- {
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_fixed_array_arg ")
- // ACE_TEXT("got fixed array[i] = %d\n"),
- // i, message[i]));
-
- if (message[i] != message[i + 1] -1)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_fixed_array_arg: value checking failed "
- "- message[%u]=%d message[%u]=%d error_count=%u\n",
- i, message[i], i+1, message[i + 1], error_count_));
- break;
- }
- }
-
-
- this->in_long_[9].push_back (message[0]);
-}
-
-
-void
-Foo_B_i::test_bounded_var_size_arg(const Bounded_Var_Size& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[10] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_bounded_var_size_arg ")
- // ACE_TEXT("got var array chars %s\n"),
- // message.get_buffer ()));
- this->in_string_[10].push_back (message.get_buffer ());
-}
-
-
-void
-Foo_B_i::test_unbounded_var_size_arg(const Unbounded_Var_Size& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[11] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_unbounded_var_size_arg ")
- // ACE_TEXT("got var array chars %s\n"),
- // message.get_buffer ()));
- this->in_string_[11].push_back (message.get_buffer ());
-}
-
-
-void
-Foo_B_i::test_fixed_size_arg(const TimeOfDay& t
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_UNUSED_ARG(t);
-
- this->op_count_[12] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_fixed_size_arg ")
- // ACE_TEXT("got timeofday %d:%d:%d\n"),
- // t.hour, t.minute, t.second));
-}
-
-
-void
-Foo_B_i::test_var_array_arg(const Var_Array messages
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[13] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_var_array_arg ")
- // ACE_TEXT(" %s \n"), messages[0].in ()));
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_var_array_arg ")
- // ACE_TEXT(" %s \n"), messages[1].in ()));
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_var_array_arg ")
- // ACE_TEXT(" %s \n"), messages[2].in ()));
- unsigned cur_client_id = 0;
-
- for (unsigned i = 0 ; i < 3; i ++)
- {
- unsigned client_id = 0;
- unsigned str_id = 0;
- char test_str[20];
- sscanf (messages[i].in (), "%u %s %u", &client_id, test_str, &str_id);
-
- if (str_id != i)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_var_array_arg: str_id checking failed "
- "- str_id=%u i=%u error_count_=%u\n", str_id, i, error_count_));
- }
-
- if (i == 0)
- {
- cur_client_id = client_id;
- }
- else if (client_id != cur_client_id)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_var_array_arg: client_id checking failed "
- "- client_id=%u cur_client_id=%u error_count_=%u\n",
- client_id, cur_client_id, error_count_));
- }
- }
- this->in_string_[13].push_back (messages[0].in ());
-}
-
-
-void
-Foo_B_i::test_special_basic_arg(CORBA::Boolean value,
- CORBA::Long client_id
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->op_count_[14] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_special_basic_arg ")
- // ACE_TEXT(" got special basic arg: %d \n"), value));
-
- CORBA::Boolean expected_special_value = client_id % 2;
- if (expected_special_value != value)
- {
- error_count_ ++;
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_B_i::test_special_basic_arg "
- "value checking failed - client_id %d got value %d error_count=%u\n",
- client_id, value, error_count_));
- }
-}
-
-
-void
-Foo_B_i::test_objref_arg(Callback_ptr cb
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_UNUSED_ARG(cb);
- this->op_count_[15] ++;
- //ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Foo_B_i::test_objref_arg ")
- // ACE_TEXT(" got callback object. \n")));
-}
-
-
-void
-Foo_B_i::done(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- TheAppShutdown->client_done();
-}
-
-
-void
-Foo_B_i::gather_stats (Foo_B_Statistics& stats)
-{
- for (unsigned i = 0; i < 16; i++)
- {
- stats.actual (i+1, this->op_count_[i]);
- stats.actual (i+1, this->in_string_[i]);
- stats.actual (i+1, this->in_long_[i]);
- stats.servant_error_count (this->error_count_);
- }
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h
deleted file mode 100644
index 771eb05eca3..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/Foo_B_i.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-#ifndef FOO_B_I_H
-#define FOO_B_I_H
-
-#include "CSD_TP_Foo_B_Export.h"
-#include "Foo_BS.h"
-#include "Foo_B_Statistics.h"
-
-
-class CSD_TP_Foo_B_Export Foo_B_i : public virtual POA_Foo_B
-{
- public:
-
- Foo_B_i();
- virtual ~Foo_B_i();
-
- virtual void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op2(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual CORBA::Long op3(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op4(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException, FooException));
-
- virtual CORBA::Boolean op6(const TimeOfDay& t,
- char*& message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op7(Callback_ptr cb
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException,
- FooException));
-
- virtual void test_unbounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_bounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_fixed_array_arg(const Fixed_Array message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_var_array_arg(const Var_Array messages
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_bounded_var_size_arg(const Bounded_Var_Size& message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_unbounded_var_size_arg(const Unbounded_Var_Size& message
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_fixed_size_arg(const TimeOfDay& t
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_special_basic_arg(CORBA::Boolean value,
- CORBA::Long client_id
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void test_objref_arg(Callback_ptr cb
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void gather_stats (Foo_B_Statistics& stats);
-
- private:
-
- LongVector in_long_ [16];
- StringVector in_string_ [16];
- unsigned op_count_ [16];
- unsigned error_count_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc
deleted file mode 100644
index a9503d73c5a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_B/csd_tp_foo_b_lib.mpc
+++ /dev/null
@@ -1,25 +0,0 @@
-//$Id$
-project : csd_tp_test_lib {
- sharedname = CSD_TP_Foo_B
- dynamicflags = CSD_TP_FOO_B_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Foo_B_Export -Wb,export_include=CSD_TP_Foo_B_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- Foo_B.idl
- Callback.idl
- }
-
- Source_Files {
- Foo_BC.cpp
- Foo_BS.cpp
- Foo_B_ClientEngine.cpp
- Foo_B_SimpleClientEngine.cpp
- Foo_B_i.cpp
- Foo_B_Statistics.cpp
- Callback_i.cpp
- CallbackC.cpp
- CallbackS.cpp
- }
-
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h
deleted file mode 100644
index ef1996b0a26..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/CSD_TP_Foo_C_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s CSD_TP_Foo_C
-// ------------------------------
-#ifndef CSD_TP_FOO_C_EXPORT_H
-#define CSD_TP_FOO_C_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CSD_TP_FOO_C_HAS_DLL)
-# define CSD_TP_FOO_C_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CSD_TP_FOO_C_HAS_DLL */
-
-#if !defined (CSD_TP_FOO_C_HAS_DLL)
-# define CSD_TP_FOO_C_HAS_DLL 1
-#endif /* ! CSD_TP_FOO_C_HAS_DLL */
-
-#if defined (CSD_TP_FOO_C_HAS_DLL) && (CSD_TP_FOO_C_HAS_DLL == 1)
-# if defined (CSD_TP_FOO_C_BUILD_DLL)
-# define CSD_TP_Foo_C_Export ACE_Proper_Export_Flag
-# define CSD_TP_FOO_C_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_C_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CSD_TP_FOO_C_BUILD_DLL */
-# define CSD_TP_Foo_C_Export ACE_Proper_Import_Flag
-# define CSD_TP_FOO_C_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CSD_TP_FOO_C_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CSD_TP_FOO_C_BUILD_DLL */
-#else /* CSD_TP_FOO_C_HAS_DLL == 1 */
-# define CSD_TP_Foo_C_Export
-# define CSD_TP_FOO_C_SINGLETON_DECLARATION(T)
-# define CSD_TP_FOO_C_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CSD_TP_FOO_C_HAS_DLL == 1 */
-
-// Set CSD_TP_FOO_C_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CSD_TP_FOO_C_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CSD_TP_FOO_C_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CSD_TP_FOO_C_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CSD_TP_FOO_C_NTRACE */
-
-#if (CSD_TP_FOO_C_NTRACE == 1)
-# define CSD_TP_FOO_C_TRACE(X)
-#else /* (CSD_TP_FOO_C_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CSD_TP_FOO_C_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CSD_TP_FOO_C_NTRACE == 1) */
-
-#endif /* CSD_TP_FOO_C_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl
deleted file mode 100644
index b7eeea96f33..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-#ifndef FOO_C_IDL
-#define FOO_C_IDL
-
-#include "FooException.idl"
-
-interface Foo_C
-{
- /// void return-type, no arguments
- void op1();
-
- /// void return-type, 1 "in" argument
- void op2(in long value);
-
- /// long return-type, 1 "in" argument
- long op3(in long value);
-
- /// one-way version of op2
- oneway void op4(in long value);
-
- /// Operation that always raises an exception.
- void op5() raises (FooException);
-
- /// Client calls this last. The last client to claim that it is
- /// done will cause the server to shutdown.
- void done();
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp
deleted file mode 100644
index fdd8b4e2671..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-#include "Foo_C_ClientEngine.h"
-#include "AppHelper.h"
-#include "ace/Log_Msg.h"
-
-
-Foo_C_ClientEngine::Foo_C_ClientEngine(Foo_C_ptr obj,
- unsigned client_id)
- : obj_(Foo_C::_duplicate(obj)),
- client_id_ (client_id)
-{
-}
-
-
-Foo_C_ClientEngine::~Foo_C_ClientEngine()
-{
-}
-
-
-bool
-Foo_C_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Verify the return values and return the results.
- bool check_validity = true;
-
- // Make sure the connection is established before making
- // remote invocations.
- if (AppHelper::validate_connection (this->obj_.in ()) == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- CORBA::Long i = this->client_id_;
-
- this->obj_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- this->obj_->op2(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- CORBA::Long value = this->obj_->op3(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != i)
- {
- check_validity = false;
- }
-
- for (CORBA::Long j = 1; j <= 5; j++)
- {
- this->obj_->op4(495 + (i * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
-
- ACE_TRY
- {
- this->obj_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- this->obj_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_C_ClientEngine::expected_results(Foo_C_Statistics& stats)
-{
- // This ClientEngine is used by remote clients.
- stats.expected(1, 1, true);
- stats.expected(2, 1, true);
- stats.expected(3, 1, true);
- stats.expected(4, 5, true);
- stats.expected(5, 1, true);
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h
deleted file mode 100644
index 54247223f04..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_ClientEngine.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CLIENT_ENGINE_H
-#define FOO_C_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "ClientEngine.h"
-#include "Foo_CC.h"
-#include "Foo_C_Statistics.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_C_ClientEngine(Foo_C_ptr obj,
- unsigned client_id);
- virtual ~Foo_C_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_C_Statistics& stats);
-
- private:
-
- Foo_C_var obj_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp
deleted file mode 100644
index da6b44f7c71..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-#include "Foo_C_Custom_ClientEngine.h"
-#include "CustomExceptionC.h"
-#include "ace/Log_Msg.h"
-
-
-Foo_C_Custom_ClientEngine::Foo_C_Custom_ClientEngine
- (Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy,
- unsigned client_id)
- : proxy_(servant,objref,strategy),
- client_id_(client_id)
-{
-}
-
-
-Foo_C_Custom_ClientEngine::~Foo_C_Custom_ClientEngine()
-{
-}
-
-
-bool
-Foo_C_Custom_ClientEngine::execute(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Make sure the connection is established before making
- // remote invocations.
- if (this->proxy_.validate_connection () == false)
- {
- ACE_ERROR((LM_ERROR, "(%P|%t)Foo_A_ClientEngine::execute " \
- "client %d connect failed.\n", this->client_id_));
- return false;
- }
-
- bool check_validity = true;
- CORBA::Long i = this->client_id_;
-
- this->proxy_.op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- this->proxy_.op2(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- CORBA::Long value = this->proxy_.op3(i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (value != i)
- {
- check_validity = false;
- }
-
-
- for (CORBA::Long j = 1; j <= 5; j++)
- {
- this->proxy_.op4(495 + (i * 5) + j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- bool caught_exception = false;
- ACE_TRY_EX (op5)
- {
- this->proxy_.op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (op5);
- }
- ACE_CATCH (FooException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- long cust_i = this->client_id_;
-
- this->proxy_.cust_op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- this->proxy_.cust_op2(cust_i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- long cust_value = this->proxy_.cust_op3(cust_i ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (cust_value != i)
- {
- check_validity = false;
- }
-
- for (long cust_j = 1; cust_j <= 5; cust_j++)
- {
- this->proxy_.cust_op4(495 + (cust_i * 5) + cust_j ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
-
- caught_exception = false;
-
- ACE_TRY_EX (cust_op5)
- {
- this->proxy_.cust_op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (cust_op5)
- }
- ACE_CATCHANY //(CustomException, ex)
- {
- // Expected
- caught_exception = true;
- }
- ACE_ENDTRY;
-
- if (! caught_exception)
- {
- check_validity = false;
- }
-
- this->proxy_.done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- return check_validity;
-}
-
-
-void
-Foo_C_Custom_ClientEngine::expected_results(Foo_C_Statistics& stats)
-{
- // This ClientEngine is used by collocated clients.
- stats.expected(1, 1, false);
- stats.expected(2, 1, false);
- stats.expected(3, 1, false);
- stats.expected(4, 5, false);
- stats.expected(5, 1, false);
- stats.expected(6, 1, false);
- stats.expected(7, 1, false);
- stats.expected(8, 1, false);
- stats.expected(9, 5, false);
- stats.expected(10, 1, false);
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h
deleted file mode 100644
index 9d51fcddcea..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_ClientEngine.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_Custom_ClientEngine.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUSTOM_CLIENT_ENGINE_H
-#define FOO_C_CUSTOM_CLIENT_ENGINE_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "ClientEngine.h"
-#include "Foo_C_Custom_Proxy.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_Custom_ClientEngine : public ClientEngine
-{
- public:
-
- Foo_C_Custom_ClientEngine(Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy,
- unsigned client_id);
- virtual ~Foo_C_Custom_ClientEngine();
-
- virtual bool execute(ACE_ENV_SINGLE_ARG_DECL);
-
- static void expected_results(Foo_C_Statistics& stats);
-
-
- private:
-
- Foo_C_Custom_Proxy proxy_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp
deleted file mode 100644
index 0fc2e22471a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-// $Id$
-#include "Foo_C_Custom_Proxy.h"
-#include "Foo_C_cust_op1.h"
-#include "Foo_C_cust_op2.h"
-#include "Foo_C_cust_op3.h"
-#include "Foo_C_cust_op4.h"
-#include "Foo_C_cust_op5.h"
-#include "AppHelper.h"
-
-
-Foo_C_Custom_Proxy::Foo_C_Custom_Proxy(Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy)
- : servant_(servant),
- objref_(Foo_C::_duplicate(objref)),
- strategy_(strategy, false)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_Custom_Proxy::~Foo_C_Custom_Proxy()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-bool
-Foo_C_Custom_Proxy::validate_connection ()
-{
- return AppHelper::validate_connection (this->objref_.in ());
-}
-
-
-void
-Foo_C_Custom_Proxy::op1(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->objref_->op1(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::op2(CORBA::Long x ACE_ENV_ARG_DECL)
-{
- this->objref_->op2(x ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-CORBA::Long
-Foo_C_Custom_Proxy::op3(CORBA::Long x ACE_ENV_ARG_DECL)
-{
- CORBA::Long result = this->objref_->op3(x ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return result;
-}
-
-
-void
-Foo_C_Custom_Proxy::op4(CORBA::Long x ACE_ENV_ARG_DECL)
-{
- this->objref_->op4(x ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::op5(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->objref_->op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::done(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->objref_->done(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op1(ACE_ENV_SINGLE_ARG_DECL)
-{
- Foo_C_cust_op1_Handle op = new Foo_C_cust_op1(this->servant_);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op2(long x ACE_ENV_ARG_DECL)
-{
- Foo_C_cust_op2_Handle op = new Foo_C_cust_op2(this->servant_, x);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-long
-Foo_C_Custom_Proxy::cust_op3(long x ACE_ENV_ARG_DECL)
-{
- Foo_C_cust_op3_Handle op = new Foo_C_cust_op3(this->servant_, x);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- int ret = op->result(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return ret;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op4(long x ACE_ENV_ARG_DECL)
-{
- Foo_C_cust_op4_Handle op = new Foo_C_cust_op4(this->servant_,x);
- this->strategy_->custom_asynch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Foo_C_Custom_Proxy::cust_op5(ACE_ENV_SINGLE_ARG_DECL)
-{
- Foo_C_cust_op5_Handle op = new Foo_C_cust_op5(this->servant_);
- this->strategy_->custom_synch_request(op.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- op->result(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h
deleted file mode 100644
index 5cd7eeae55a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Custom_Proxy.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_Custom_Proxy.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUSTOM_PROXY_H
-#define FOO_C_CUSTOM_PROXY_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "ClientEngine.h"
-#include "Foo_C_i.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_Custom_Proxy
-{
-public:
-
- Foo_C_Custom_Proxy(Foo_C_i* servant,
- Foo_C_ptr objref,
- TAO::CSD::TP_Strategy* strategy);
- ~Foo_C_Custom_Proxy();
-
- bool validate_connection ();
-
- void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void op2(CORBA::Long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- CORBA::Long op3(CORBA::Long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void op4(CORBA::Long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- void cust_op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void cust_op2(long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- long cust_op3(long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op4(long x ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
-private:
- Foo_C_i* servant_;
- Foo_C_var objref_;
- TAO::CSD::TP_Strategy_Handle strategy_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp
deleted file mode 100644
index b832e29d9a1..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-// $Id$
-#include "Foo_C_Statistics.h"
-#include "Foo_C_ClientEngine.h"
-#include "Foo_C_Custom_ClientEngine.h"
-
-Foo_C_Statistics::Foo_C_Statistics(unsigned num_remote_clients,
- unsigned num_collocated_clients)
-: num_remote_clients_ (num_remote_clients),
- num_collocated_clients_ (num_collocated_clients)
-{
- for (unsigned i = 0; i < 10; i++)
- {
- this->expected_[i] = 0;
- this->actual_[i] = 0;
- }
-}
-
-
-Foo_C_Statistics::~Foo_C_Statistics()
-{
-}
-
-
-void
-Foo_C_Statistics::expected(unsigned op_num, unsigned count, bool remote_client)
-{
- if (remote_client)
- {
- this->expected_[op_num-1] += count * this->num_remote_clients_;
- }
- else
- {
- this->expected_[op_num-1] += count * this->num_collocated_clients_;
- }
-}
-
-
-void
-Foo_C_Statistics::actual(unsigned op_num, unsigned count)
-{
- this->actual_[op_num-1] += count;
-}
-
-
-void
-Foo_C_Statistics::actual_in_values(unsigned op_num, LongVector lv)
-{
- size_t sz = lv.size();
- for (size_t i = 0; i < sz; i++)
- {
- this->actual_in_values_[op_num-1].push_back (lv[i]);
- }
-}
-
-
-bool
-Foo_C_Statistics::actual_vs_expected()
-{
- // Get the expected statistics for a single remote client.
- Foo_C_Statistics remote_client_stats (1, 0);
- Foo_C_ClientEngine::expected_results (remote_client_stats);
- // Get the expected statistics for a single collocated client.
- Foo_C_Statistics collocated_client_stats (0, 1);
- Foo_C_Custom_ClientEngine::expected_results (collocated_client_stats);
-
- for (unsigned i = 0; i < 10; i++)
- {
- if (this->expected_[i] != this->actual_[i])
- {
- return false;
- }
-
- // Verify the "in" values.
- // Skip op1/op5 and cust_op1/cust_op5 since they do not have
- // any "in" values.
- if (i % 5 == 0 || i % 5 == 4)
- {
- continue;
- }
-
- unsigned actual_size
- = this->actual_in_values_[i].size ();
- unsigned expected_size
- = this->num_remote_clients_ * remote_client_stats.expected_[i]
- + this->num_collocated_clients_ * collocated_client_stats.expected_[i];
-
- if (actual_size == 0 && expected_size == 0)
- {
- continue;
- }
-
- if (actual_size != expected_size)
- {
- return false;
- }
-
- sort (this->actual_in_values_[i]);
-
- for (unsigned j = 0; j < actual_size - 1; j++)
- {
- if (this->actual_in_values_[i][j] != this->actual_in_values_[i][j + 1] - 1)
- {
- return false;
- }
- }
- }
- return true;
-}
-
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h
deleted file mode 100644
index 4d7dcff1df9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_Statistics.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id$
-#ifndef STATISTICS_C_H
-#define STATISTICS_C_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "StatisticsHelper.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_Statistics
-{
- public:
-
- Foo_C_Statistics(unsigned num_remote_clients,
- unsigned num_collocated_clients);
-
- virtual ~Foo_C_Statistics();
-
- void expected(unsigned op_num, unsigned count, bool remote_client);
- void actual(unsigned op_num, unsigned count);
- void actual_in_values(unsigned op_num, LongVector lv);
-
- bool actual_vs_expected();
-
-
- private:
-
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned expected_[10];
- unsigned actual_[10];
-
- LongVector actual_in_values_ [10];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp
deleted file mode 100644
index 3ca92e4af2e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op1.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-
-
-Foo_C_cust_op1::Foo_C_cust_op1(Foo_C_i* servant)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op1::~Foo_C_cust_op1()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op1::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW (CancelledException());
- }
-}
-
-
-void
-Foo_C_cust_op1::execute_i()
-{
- this->servant_->cust_op1();
-}
-
-
-void
-Foo_C_cust_op1::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h
deleted file mode 100644
index 553cb27a6d8..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op1.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op1.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP1_H
-#define FOO_C_CUST_OP1_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op1;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op1> Foo_C_cust_op1_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op1 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op1(Foo_C_i* servant);
- virtual ~Foo_C_cust_op1();
-
- void result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
- virtual void execute_i();
- virtual void cancel_i();
-
- private:
- bool cancelled_;
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp
deleted file mode 100644
index c0bc62fb2f0..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op2.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-
-
-Foo_C_cust_op2::Foo_C_cust_op2(Foo_C_i* servant, long arg)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- arg_(arg),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op2::~Foo_C_cust_op2()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op2::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW (CancelledException());
- }
-}
-
-
-void
-Foo_C_cust_op2::execute_i()
-{
- this->servant_->cust_op2(this->arg_);
-}
-
-
-void
-Foo_C_cust_op2::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h
deleted file mode 100644
index 8a319e3b50a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op2.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op2.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP2_H
-#define FOO_C_CUST_OP2_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op2;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op2> Foo_C_cust_op2_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op2 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op2(Foo_C_i* servant, long arg);
- virtual ~Foo_C_cust_op2();
-
- void result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- long arg_;
- bool cancelled_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp
deleted file mode 100644
index b6bfad9dc67..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op3.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-
-
-Foo_C_cust_op3::Foo_C_cust_op3(Foo_C_i* servant, long arg)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- arg_(arg),
- result_(0),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op3::~Foo_C_cust_op3()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-long
-Foo_C_cust_op3::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW_RETURN (CancelledException(), -1);
- }
-
- return this->result_;
-}
-
-
-void
-Foo_C_cust_op3::execute_i()
-{
- this->result_ = this->servant_->cust_op3(this->arg_);
-}
-
-
-void
-Foo_C_cust_op3::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h
deleted file mode 100644
index 7e86e3c8a53..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op3.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP3_H
-#define FOO_C_CUST_OP3_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op3;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op3> Foo_C_cust_op3_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op3 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op3(Foo_C_i* servant, long arg);
- virtual ~Foo_C_cust_op3();
-
- long result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- long arg_;
- long result_;
- bool cancelled_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp
deleted file mode 100644
index 828e841990f..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op4.h"
-#include "Foo_C_i.h"
-
-
-Foo_C_cust_op4::Foo_C_cust_op4(Foo_C_i* servant, long arg)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- arg_(arg),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-Foo_C_cust_op4::~Foo_C_cust_op4()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op4::execute_i()
-{
- this->servant_->cust_op4(this->arg_);
-}
-
-
-void
-Foo_C_cust_op4::cancel_i()
-{
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h
deleted file mode 100644
index 1f8e5eeb5db..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op4.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op4.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP4_H
-#define FOO_C_CUST_OP4_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op4;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op4> Foo_C_cust_op4_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op4 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op4(Foo_C_i* servant, long arg);
- virtual ~Foo_C_cust_op4();
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- long arg_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp
deleted file mode 100644
index 6f5b6756dda..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-#include "Foo_C_cust_op5.h"
-#include "Foo_C_i.h"
-#include "CancelledExceptionC.h"
-#include "CustomExceptionC.h"
-
-
-Foo_C_cust_op5::Foo_C_cust_op5(Foo_C_i* servant)
- : TAO::CSD::TP_Custom_Request_Operation(servant),
- exception_(false),
- cancelled_(false),
- servant_(servant)
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-Foo_C_cust_op5::~Foo_C_cust_op5()
-{
- // This try-catch block is not really necessary, but we have to add it to
- // satisfy the non-exception builds. Since there is actually no exception
- // raised from _add_ref, we just ignore the exception here.
- ACE_TRY_NEW_ENV
- {
- servant_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHALL
- {
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op5::result(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->cancelled_)
- {
- ACE_THROW (CancelledException());
- }
-
- if (this->exception_)
- {
- ACE_THROW (CustomException());
- }
-}
-
-
-void
-Foo_C_cust_op5::execute_i()
-{
- ACE_TRY_NEW_ENV
- {
- this->servant_->cust_op5(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CustomException, ex)
- {
- this->exception_ = true;
- }
- ACE_ENDTRY;
-}
-
-
-void
-Foo_C_cust_op5::cancel_i()
-{
- this->cancelled_ = true;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h
deleted file mode 100644
index d6963d31bbe..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op5.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Foo_C_cust_op5.h
- *
- * $Id$
- *
- * @author Tim Bradley <bradley_t@ociweb.com>
- */
-//=============================================================================
-
-#ifndef FOO_C_CUST_OP5_H
-#define FOO_C_CUST_OP5_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Custom_Request_Operation.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-
-class Foo_C_i;
-
-class Foo_C_cust_op5;
-typedef TAO_Intrusive_Ref_Count_Handle<Foo_C_cust_op5> Foo_C_cust_op5_Handle;
-
-
-class CSD_TP_Foo_C_Export Foo_C_cust_op5 : public TAO::CSD::TP_Custom_Request_Operation
-{
- public:
-
- Foo_C_cust_op5(Foo_C_i* servant);
- virtual ~Foo_C_cust_op5();
-
- void result(ACE_ENV_SINGLE_ARG_DECL);
-
-
- protected:
-
- virtual void execute_i();
- virtual void cancel_i();
-
-
- private:
-
- bool exception_;
- bool cancelled_;
-
- Foo_C_i* servant_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp
deleted file mode 100644
index 25fadd9deef..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// $Id$
-#include "Foo_C_i.h"
-#include "AppShutdown.h"
-#include "CustomExceptionC.h"
-
-
-Foo_C_i::Foo_C_i()
-{
- for (unsigned i = 0; i < 10; i++)
- {
- this->count_[i] = 0;
- }
-}
-
-
-Foo_C_i::~Foo_C_i()
-{
-}
-
-
-void
-Foo_C_i::op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ++this->count_[0];
-}
-
-
-void
-Foo_C_i::op2(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[1].push_back (value);
- ++this->count_[1];
-}
-
-
-CORBA::Long
-Foo_C_i::op3(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[2].push_back (value);
- ++this->count_[2];
- return value;
-}
-
-
-void
-Foo_C_i::op4(CORBA::Long value ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->in_values_[3].push_back (value);
- ++this->count_[3];
-}
-
-
-void
-Foo_C_i::op5(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException, FooException))
-{
- ++this->count_[4];
- ACE_THROW (FooException());
-}
-
-
-void
-Foo_C_i::done(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- TheAppShutdown->client_done();
-}
-
-
-void
-Foo_C_i::cust_op1(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- ++this->count_[5];
-}
-
-
-void
-Foo_C_i::cust_op2(long value ACE_ENV_ARG_DECL_NOT_USED)
-{
- this->in_values_[6].push_back (value);
- ++this->count_[6];
-}
-
-
-long
-Foo_C_i::cust_op3(long value ACE_ENV_ARG_DECL_NOT_USED)
-{
- this->in_values_[7].push_back (value);
- ++this->count_[7];
- return value;
-}
-
-
-void
-Foo_C_i::cust_op4(long value ACE_ENV_ARG_DECL_NOT_USED)
-{
- this->in_values_[8].push_back (value);
- ++this->count_[8];
-}
-
-
-void
-Foo_C_i::cust_op5(ACE_ENV_SINGLE_ARG_DECL)
-{
- ++this->count_[9];
- ACE_THROW (CustomException());
-}
-
-
-void
-Foo_C_i::gather_stats(Foo_C_Statistics& stats)
-{
- for (unsigned i = 0; i < 10; i++)
- {
- stats.actual (i + 1, this->count_[i]);
- stats.actual_in_values (i + 1, this->in_values_[i]);
- }
-}
-
-
-void
-Foo_C_i::dump()
-{
- static unsigned id = 0;
-
- ++id;
-
- ACE_DEBUG((LM_DEBUG, "Servant %d Stats:\n", id));
- ACE_DEBUG((LM_DEBUG, "------------------\n"));
-
- unsigned i;
-
- for (i = 0; i < 5; i++)
- {
- ACE_DEBUG((LM_DEBUG, "op%d : %d\n", i+1, this->count_[i]));
- }
-
- for (i = 5; i < 10; i++)
- {
- ACE_DEBUG((LM_DEBUG, "cust_op%d: %d\n", i+1, this->count_[i]));
- }
-
- ACE_DEBUG((LM_DEBUG, "------------------\n"));
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h
deleted file mode 100644
index c58cfb288d4..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-#ifndef FOO_C_I_H
-#define FOO_C_I_H
-
-#include "CSD_TP_Foo_C_Export.h"
-#include "Foo_CS.h"
-#include "Foo_C_Statistics.h"
-
-
-class CSD_TP_Foo_C_Export Foo_C_i : public virtual POA_Foo_C
-{
- public:
-
- Foo_C_i();
- virtual ~Foo_C_i();
-
- virtual void op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op2(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual CORBA::Long op3(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op4(CORBA::Long value ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- virtual void op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException,
- FooException));
-
- virtual void done(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- void cust_op1(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void cust_op2(long value ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- long cust_op3(long value ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op4(long value ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- void cust_op5(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- void gather_stats(Foo_C_Statistics& stats);
-
- void dump();
-
-
- private:
-
- LongVector in_values_ [10];
- unsigned count_[10];
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc
deleted file mode 100644
index bc014925ccf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/csd_tp_foo_c_lib.mpc
+++ /dev/null
@@ -1,27 +0,0 @@
-//$Id$
-project : csd_tp_test_lib {
- sharedname = CSD_TP_Foo_C
- dynamicflags = CSD_TP_FOO_C_BUILD_DLL
- idlflags += -Wb,export_macro=CSD_TP_Foo_C_Export -Wb,export_include=CSD_TP_Foo_C_Export.h
- includes += $(TAO_ROOT)/tao
-
- IDL_Files {
- Foo_C.idl
- }
-
- Source_Files {
- Foo_CC.cpp
- Foo_CS.cpp
- Foo_C_ClientEngine.cpp
- Foo_C_Custom_ClientEngine.cpp
- Foo_C_Custom_Proxy.cpp
- Foo_C_cust_op1.cpp
- Foo_C_cust_op2.cpp
- Foo_C_cust_op3.cpp
- Foo_C_cust_op4.cpp
- Foo_C_cust_op5.cpp
- Foo_C_i.cpp
- Foo_C_Statistics.cpp
- }
-
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc
deleted file mode 100644
index 02cac4dc7da..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/CSD_TP_Test_1.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_a {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_a {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp
deleted file mode 100644
index d51dfbda1b1..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "Foo_A_ClientEngine.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_1_Client")
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
- // Convert the IOR string to a Foo_A object reference.
- Foo_A_var foo = RefHelper<Foo_A>::string_to_ref(orb.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the appropriate client "engine" object.
- Foo_A_ClientEngine engine(foo.in());
-
- // Execute the client algorithm
- result = engine.execute(ACE_ENV_SINGLE_ARG_PARAMETER) ? 0 : -1;
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "i:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case '?':
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h
deleted file mode 100644
index 1af2e9ff6a6..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ClientApp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp
deleted file mode 100644
index eb0d108bfb1..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "Foo_A_i.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "AppShutdown.h"
-#include "ace/Get_Opt.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "tao/Intrusive_Ref_Count_Handle_T.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_1_Server"),
- num_clients_ (1)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(orb.in(), num_clients_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the Root POA
- PortableServer::POA_var root_poa =
- RefHelper<PortableServer::POA>::resolve_initial_ref(orb.in(),
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var child_poa =
- AppHelper::create_poa("ChildPoa",
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-
- // Create the thread pool servant dispatching strategy object, and
- // hold it in a (local) smart pointer variable.
- TAO_Intrusive_Ref_Count_Handle<TAO::CSD::TP_Strategy> csd_strategy =
- new TAO::CSD::TP_Strategy();
-
- // Tell the strategy to apply itself to the child poa.
- if (csd_strategy->apply_to(child_poa.in() ACE_ENV_ARG_PARAMETER) == false)
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to child poa.\n"));
- return -1;
- }
- ACE_CHECK_RETURN (-1);
-
- // Create the servant object.
- Foo_A_i* servant = new Foo_A_i();
-
- // Local smart pointer variable to deal with releasing the reference
- // to the servant object when the variable falls out of scope.
- PortableServer::ServantBase_var servant_owner(servant);
-
- // Obtain the object reference using the servant
- CORBA::Object_var obj = AppHelper::activate_servant(child_poa.in(),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Stringify and save the object reference to a file
- AppHelper::ref_to_file(orb.in(),
- obj.in(),
- this->ior_filename_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Activate the POA Manager
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is ready. Running the ORB event loop.\n"));
-
- // Run the ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp ORB event loop has completed.\n"));
-
- TheAppShutdown->wait ();
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the Root POA.\n"));
-
- root_poa->destroy(1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the ORB.\n"));
-
- orb->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp has completed running successfully.\n"));
-
- return 0;
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "o:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'o':
- this->ior_filename_ = get_opts.opt_arg();
- break;
-
- case 'n':
- {
- int tmp = ACE_OS::atoi(get_opts.opt_arg());
- if (tmp < 1)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Error. -n must be followed by an integer "
- "value greater than 0.\n"));
- return -1;
- }
-
- this->num_clients_ = tmp;
- }
- break;
-
- case '?':
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h
deleted file mode 100644
index 3bfe10e6f0a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/ServerApp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_filename_;
- unsigned num_clients_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp
deleted file mode 100644
index ae98ca0f6ac..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/client_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl
deleted file mode 100755
index 1ff6338702b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$num_clients=40;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main", "-o $iorfile -n $num_clients");
-}
-else {
- $SV = new PerlACE::Process ("server_main", "-o $iorfile -n $num_clients");
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- @CLS[$i] = new PerlACE::Process ("client_main", " -i file://$iorfile");
-
- @CLS[$i]->Spawn ();
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- $client = @CLS[$i]->WaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc
deleted file mode 100644
index 02cac4dc7da..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/CSD_TP_Test_2.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_a {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_a {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp
deleted file mode 100644
index 531dba15f17..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "Foo_A_ClientEngine.h"
-#include "ace/Get_Opt.h"
-
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_2_Client"),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- if (result != 0)
- {
- return result;
- }
-
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- result = this->run_engine(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->cleanup();
- return result;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- return this->parse_args(argc, argv);
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_A obj ref.
- Foo_A_var foo = RefHelper<Foo_A>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Create the ClientEngine object, and give it the Foo_A obj ref.
- this->engine_ = new Foo_A_ClientEngine(foo.in(), this->client_id_);
-}
-
-
-int
-ClientApp::run_engine(ACE_ENV_SINGLE_ARG_DECL)
-{
- bool result = this->engine_->execute(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- return result ? 0 : -1;
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
-
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h
deleted file mode 100644
index d5bb80cf800..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ClientApp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- int run_engine(ACE_ENV_SINGLE_ARG_DECL);
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- CORBA::ORB_var orb_;
- ACE_CString exe_name_;
- ACE_CString ior_;
- unsigned client_kind_;
- ClientEngine_Handle engine_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp
deleted file mode 100644
index f291baacad4..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.cpp
+++ /dev/null
@@ -1,375 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_A_ClientEngine.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_2_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- if (result != 0)
- {
- return result;
- }
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup();
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
-
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init (this->orb_.in (), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup()
-{
- int client_id_start = this->num_remote_clients_;
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- // Dole out the servant object references in a round-robin fashion.
- unsigned servant_index = i % this->num_servants_;
-
- ServantListType::T_stub_var obj = this->servants_.objref(servant_index);
- ClientEngine_Handle engine = new Foo_A_ClientEngine(obj.in(), ++client_id_start, true);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = this->set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = this->set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = this->set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = this->set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = this->set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = this->set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->num_collocated_clients_ > 0
- && this->collocated_client_task_.failure_count () > 0)
- {
- return false;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- Foo_A_Statistics stats (num_clients);
-
- Foo_A_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->servants_.servant(i)->gather_stats(stats);
- }
-
- return stats.actual_vs_expected ();
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h
deleted file mode 100644
index 73b5ccbbd94..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/ServerApp.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "Foo_A_i.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup();
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_A_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl
deleted file mode 100755
index 37fd19f21f6..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-else {
- $SV = new PerlACE::Process("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-$SV->Spawn();
-
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
-
- $client_id = $i+1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
-
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp
deleted file mode 100644
index 0be257accae..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/server_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc
deleted file mode 100644
index 016caef75ef..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/CSD_TP_Test_3.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_b {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_b {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp
deleted file mode 100644
index 147b5ca43cf..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_ClientEngine.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ClientApp::ClientApp()
-: TestAppBase("TP_Test_3_Client"),
- client_task_ (true), // shutdown orb after client is done.
- num_servants_ (1),
- num_csd_threads_ (1),
- num_orb_threads_ (1),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_clients();
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- result = this->check_validity () ? 0 : -1;
- this->cleanup();
-
- return result;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(this->orb_.in(), num_servants_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ClientApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_B obj ref.
- Foo_B_var foo = RefHelper<Foo_B>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->servants_.create_and_activate(1, // number of callback servants
- this->poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ServantListType::T_stub_var cb = this->servants_.objref(0);
-
- // Create the ClientEngine object, and give it the Foo_B and Callback object
- // references.
- ClientEngine_Handle engine
- = new Foo_B_ClientEngine(foo.in(), cb.in (), this->client_id_);
- this->client_task_.add_engine(engine.in());
-}
-
-
-void
-ClientApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ClientApp::run_clients()
-{
- this->client_task_.open();
-}
-
-
-void
-ClientApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-PortableServer::POA_ptr
-ClientApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-bool
-ClientApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->client_task_.failure_count () > 0)
- {
- return false;
- }
-
- return true;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h
deleted file mode 100644
index 2eb6f23bd39..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ClientApp.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "ServantList_T.h"
-#include "Callback_i.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_clients();
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
-
- typedef ServantList<Callback_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask client_task_;
-
- ACE_CString exe_name_;
-
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
-
- ACE_CString ior_;
- unsigned client_kind_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp
deleted file mode 100644
index 883a0dec322..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.cpp
+++ /dev/null
@@ -1,428 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_B_ClientEngine.h"
-#include "Foo_B_ClientEngine.h"
-#include "Callback_i.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_3_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is ready. Running the ORB event loop.\n"));
-
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp ORB event loop has completed.\n"));
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- result = this->check_validity () ? 0 : -1;
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp check_validity returned %d .\n", result));
-
- return result;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init(this->orb_.in(), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_poa_ = this->create_poa(this->orb_.in(),
- "CallbackPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-
- // Use another poa and strategy for callbacks. This would resolve
- // the deadlock situation that happens when having number of csd
- // threads less than number of collocated clients.
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_tp_strategy_ = new TAO::CSD::TP_Strategy();
- if (!this->cb_tp_strategy_->apply_to(this->cb_poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to callback poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
- }
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->foo_servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ == 0)
- return;
-
- this->cb_servants_.create_and_activate(1, // number of callback servants
- this->cb_poa_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CallbackServantListType::T_stub_var cb = this->cb_servants_.objref(0);
-
- unsigned client_id = this->num_remote_clients_;
-
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- client_id ++;
- // Dole out the servant object references in a round-robin fashion.
- unsigned servant_index = i % this->num_servants_;
-
- FooServantListType::T_stub_var foo
- = this->foo_servants_.objref(servant_index);
- ClientEngine_Handle engine
- = new Foo_B_ClientEngine(foo.in(), cb.in (), client_id, true);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- // Check whether the clients return any errors.
- if (this->num_collocated_clients_ > 0
- && this->collocated_client_task_.failure_count () > 0)
- {
- return false;
- }
-
- Foo_B_Statistics stats (this->num_remote_clients_,
- this->num_collocated_clients_);
-
- Foo_B_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->foo_servants_.servant(i)->gather_stats (stats);
- }
-
- if (this->num_collocated_clients_ > 0)
- {
- this->cb_servants_.servant (0)->gather_stats (stats);
- }
-
- return stats.actual_vs_expected ();
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h
deleted file mode 100644
index 12af1ec455b..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/ServerApp.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "Foo_B_i.h"
-#include "Callback_i.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup(ACE_ENV_SINGLE_ARG_DECL);
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_B_i> FooServantListType;
- typedef ServantList<Callback_i> CallbackServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- PortableServer::POA_var cb_poa_;
- TAO::CSD::TP_Strategy_Handle cb_tp_strategy_;
-
- FooServantListType foo_servants_;
- CallbackServantListType cb_servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl
deleted file mode 100755
index 13aac1fa8c9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl
+++ /dev/null
@@ -1,186 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- $num_csd_threads=1;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-else {
- $SV = new PerlACE::Process("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-
-$SV->Spawn();
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client_id = $i + 1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
-# print STDERR $CLS[$i]->CommandLine() . "\n";
-
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc
deleted file mode 100644
index ca9f92ac607..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/CSD_TP_Test_4.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_c {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_c {
- exename=client_main
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp
deleted file mode 100644
index 57520df303c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "Foo_C_ClientEngine.h"
-#include "ace/Get_Opt.h"
-
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_4_Client"),
- ior_("Not Set"),
- client_kind_(0),
- client_id_(0)
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->client_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- result = this->run_engine(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->cleanup();
-
- return result;
-}
-
-
-int
-ClientApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- return this->parse_args(argc, argv);
-}
-
-
-void
-ClientApp::client_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- // Turn the ior_ into a Foo_C obj ref.
- Foo_C_var foo = RefHelper<Foo_C>::string_to_ref(this->orb_.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Create the ClientEngine object, and give it the Foo_C obj ref.
- this->engine_ = new Foo_C_ClientEngine(foo.in(), this->client_id_);
-}
-
-
-int
-ClientApp::run_engine(ACE_ENV_SINGLE_ARG_DECL)
-{
- bool result = this->engine_->execute(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return result ? 0 : -1;
-}
-
-
-void
-ClientApp::cleanup()
-{
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "i:k:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case 'k':
- result = set_arg(this->client_kind_,
- get_opts.opt_arg(),
- c,
- "client_kind");
- break;
-
- case 'n':
- result = set_arg(this->client_id_,
- get_opts.opt_arg(),
- c,
- "client_id");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ClientApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-i <ior>]\n"
- "\t[-k <client_kind>]\n"
- "\t[-n <client_id>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ClientApp::arg_dependency_checks()
-{
- if (this->ior_ == "Not Set")
- {
- ACE_ERROR((LM_ERROR,
- "Error: Missing required command-line option (-i <ior>).\n"));
- this->usage_statement();
- return -1;
- }
-
- if (this->client_id_ <= 0)
- {
- ACE_ERROR((LM_ERROR,
- "Error: Invalid command-line option (-n <client id>). \n"
- " The client id should be positive integer. \n"));
- this->usage_statement();
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ClientApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
-
- return 0;
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h
deleted file mode 100644
index e2f7bf6fc06..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ClientApp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ClientEngine.h"
-#include "tao/ORB.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void client_setup(ACE_ENV_SINGLE_ARG_DECL);
- int run_engine(ACE_ENV_SINGLE_ARG_DECL);
- void cleanup();
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- CORBA::ORB_var orb_;
- ACE_CString exe_name_;
- ACE_CString ior_;
- unsigned client_kind_;
- ClientEngine_Handle engine_;
- unsigned client_id_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/README b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/README
deleted file mode 100644
index 100428e0103..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/README
+++ /dev/null
@@ -1,337 +0,0 @@
-// $Id$
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_4
-
-Uses Libs: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_Lib
- $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Foo_C
-
-===========================================================================
-Executable: server_main
-
-Description: The test server application.
-
-Command-Line:
-
- % server_main [options]
-
- where, [options] includes the following:
-
- -p <ior_filename_prefix>
- -s <num_servants>
- -n <num_csd_threads>
- -t <num_orb_threads>
- -r <num_remote_clients>
- -c <num_collocated_clients>
- -k <collocated_client_kind>
- -?
-
-Command-Line Arguments:
-
- -p <ior_filename_prefix>
-
- If not specified, the <ior_filename_prefix> defaults to "foo".
- This value is used as the prefix for the filename(s) to which
- the server application will write stringified object reference(s).
- Each "IOR file" contains the (stringified) object reference
- associated with a distinct servant object within the server
- application. These files are the way that the client application(s)
- are able to "locate" the object reference(s) upon which they will
- invoke (CORBA) operations. In essence, the filesystem is used
- as a "poor-man" Naming Service.
-
- The filenames are of the form, "prefix_%02d.ior", using a unique
- integer "id" for each file - starting with an "id" of 1. Thus,
- if the server application was told to create 3 servants (via the
- -s <num_servants> option), and the <ior_filename_prefix> is "foo",
- then three files will be written by the server application:
-
- foo_01.ior
- foo_02.ior
- foo_03.ior
-
-
- -s <num_servants>
-
- The <num_servants> must be an integer value greater than 0.
-
- If not specified, the <num_servants> defaults to 1. This is used
- to inform the server application of the number of distinct servant
- objects that it should create.
-
-
- -n <num_csd_threads>
-
- The <num_csd_threads> must be an integer value greater than 0.
-
- If not specified, the <num_csd_threads> defaults to 1. This is
- used to inform the server application of the number of worker
- threads that should be activated by the Thread Pool CSD Strategy.
- The worker threads are responsible for servicing the strategy's
- request queue. This can also be called the "size of the thread
- pool".
-
-
- -t <num_orb_threads>
-
- The <num_orb_threads> must be an integer value greater than 0.
-
- If not specified, the <num_orb_threads> defaults to 1. This option
- is used to tell the server application how many distinct threads
- should be used to run the ORB event loop. The "mainline thread"
- will always run the ORB event loop itself, so that accounts for
- one of the num_orb_threads. If num_orb_threads is greater than 1,
- then (num_orb_threads - 1) threads will be activated by the server
- application, and each of these threads will run the ORB event loop.
- The end result is that there will be <num_orb_threads> distinct
- threads (including the mainline thread) running the ORB event loop.
-
-
- -r <num_remote_clients>
-
- The <num_remote_clients> must be an integer value greater than,
- or equal to, 0. In addition, the sum of the <num_remote_clients>
- and the <num_collocated_clients> (see the -c option) must be
- greater than 0. Both cannot be 0, since the server application
- would interpret this to mean that no clients will ever use it,
- and that's kind of pointless.
-
- If not specified, the <num_remote_clients> defaults to 1. This
- option informs the server application how many remote clients it
- can expect to "hear" from over the course of its lifetime. Each
- distinct test client, remote or collocated, is required to invoke
- the done() operation on one of the servant objects. The server
- application decides to shut itself down gracefully when it has
- received one done() invocation for each remote client and for
- each collocated client. Once all of the expected done() calls
- have been made, the server application assumes that no more clients
- will need its services, and thus it shuts itself down. This is
- used to support the automated test scenarios implemented within
- the run_test.pl script. It provides a way for a test scenario to
- automate the graceful shutdown of the server by telling the server
- how many clients to expect (remote + collocated).
-
-
- -c <num_collocated_clients>
-
- The <num_collocated_clients> must be an integer value greater than,
- or equal to, 0. In addition, the sum of the <num_collocated_clients>
- and the <num_remote_clients> (see the -r option) must be
- greater than 0. Both cannot be 0, since the server application
- would interpret this to mean that no clients will ever use it,
- and that's kind of pointless.
-
- If not specified, the <num_collocated_clients> defaults to 0. This
- option informs the server application how many collocated clients
- should "live", collocated, within the server application. Each
- collocated client will execute its logic in a distinct thread
- within the server application. As an example, if the server
- application was told to use a <num_collocated_clients> value of 40,
- then the server application will activate 40 threads - each
- carrying out the logic of one "client". This client "logic" is
- identical to the logic carried out by a single remote client
- application (client_main) process. As with remote clients,
- each collocated client will invoke the done() operation on
- one of the servants (via an object ref) when the client logic
- has been completed. See the "-r <num_remote_clients>" option
- for more information about the done() operation, and its purpose.
-
- For this particular server application (TP_Test_4), each
- collocated client will perform the normal client logic as well
- as carry out a set of "custom" requests on the collocated servant.
- Custom operations not defined in IDL.
-
-
- -k <collocated_client_kind>
-
- This is reserved for future use. It currently doesn't get used
- for anything.
-
-
- -?
-
- This is used to request the "Usage Statement" for the Server
- Application (ie, "server_main -?" prints the usage statement).
-
-
-===========================================================================
-Executable: client_main
-
-Description: The test client application.
-
-Command-Line:
-
- % client_main [options]
-
- where, [options] includes the following:
-
- -i <ior>
- -n <client_id>
- -k <collocated_client_kind>
- -?
-
-
-Command-Line Arguments:
-
- -i <ior>
-
- The <ior> is required, and must be a valid IOR. In our case, where
- the server application saves stringified object references to files,
- we supply the client application with an <ior> in the following
- form: "file://foo_01.ior". See the server application's description
- of its "-p <ior_filename_prefix>" option for more information.
-
- The client application will use the <ior> to obtain an object
- reference using the CORBA::ORB::string_to_object() method. This
- is the object reference upon which the client logic will invoke
- operations. The object reference will be associated with a
- distinct servant object within the server application.
-
-
- -n <client_id>
-
- The <client_id> is required, and must be an integer value greater
- than 0.
-
- As part of the logic used to check actual vs. expected results,
- each client is assigned a unique id. As a side-note, each
- collocated client within the server application (if there are
- any) will also be assigned a unique client_id. For any given
- test scenario run by the run_test.pl script, each client (remote
- and/or collocated) will be assigned a unique client_id.
-
- The server application assigns client_ids to its collocated clients
- based upon its knowledge of how many remote clients will be used
- in the test scenario (see the "-r <num_remote_clients>" option
- for the server application). The server application assumes that
- the run_test.pl will assign client_ids to remote clients starting
- with 1, and up to the <num_remote_clients>. Thus, the server
- application assigns client_ids to collocated clients starting
- with (<num_remote_clients> + 1), and incrementing by 1 for each
- additional collocated client_id.
-
-
- -k <collocated_client_kind>
-
- This is reserved for future use. It currently doesn't get used
- for anything.
-
-
- -?
-
- This is used to request the "Usage Statement" for the Client
- Application (ie, "client_main -?" prints the usage statement).
-
-
-===========================================================================
-Executable: run_test.pl (PERL script).
-
-Description: Script used to run a specific test scenario. This includes
- the launching of a server application process and client
- applications processes as called for by the specific scenario.
-
-Command-Line:
-
- % run_test.pl <scenario>
-
- where, <scenario> can be one of the following values:
-
- "big"
- "a"
- "b"
-
- If a <scenario> is not specified on the run_test.pl command-line,
- then a default scenario is used.
-
-
-Scenarios:
-
- -----------------------------------------------------------------------
- Default: (when no <scenario> is specified on the command-line)
-
- $iorfname_prefix = "servant";
- $num_servants = 1;
- $num_orb_threads = 1;
- $num_remote_clients = 1;
- $num_csd_threads = 1;
- $num_collocated_clients = 0;
-
- -----------------------------------------------------------------------
- "remote":
-
- Uses the Default values, with the following overrides:
-
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "collocated":
-
- Uses the Default values, with the following overrides:
-
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
-
- -----------------------------------------------------------------------
- "collocated_big":
-
- Uses the Default values, with the following overrides:
-
- $num_remote_clients = 0;
- $num_csd_threads = 5;
- $num_collocated_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_orbthreads":
-
- Uses the Default values, with the following overrides:
-
- $num_orb_threads = 5;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_servants":
-
- Uses the Default values, with the following overrides:
-
- $num_servants = 5;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_csdthreads":
-
- Uses the Default values, with the following overrides:
-
- $num_csd_threads = 5;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "remote_big":
-
- Uses the Default values, with the following overrides:
-
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
-
- -----------------------------------------------------------------------
- "big":
-
- Uses the Default values, with the following overrides:
-
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
-
- -----------------------------------------------------------------------
- "usage":
-
- This is not really a test scenario, but it will cause the
- run_test.pl script to print a "Usage Statement", which includes
- a list of the supported <scenario> values.
-
- -----------------------------------------------------------------------
-
-
-===========================================================================
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp
deleted file mode 100644
index 9ce517c4863..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.cpp
+++ /dev/null
@@ -1,391 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "AppHelper.h"
-#include "OrbRunner.h"
-#include "AppShutdown.h"
-#include "TestAppExceptionC.h"
-#include "Foo_C_Custom_ClientEngine.h"
-#include "Foo_C_ClientEngine.h"
-#include "Foo_C_Statistics.h"
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_4_Server"),
- ior_filename_prefix_("foo"),
- num_servants_(1),
- num_csd_threads_(1),
- num_orb_threads_(1),
- num_remote_clients_(1),
- num_collocated_clients_(0),
- collocated_client_kind_(0)
-{
-}
-
-
-ServerApp::~ServerApp()
-{
-}
-
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- int result = this->init(argc, argv ACE_ENV_ARG_PARAMETER);
- if (result != 0)
- {
- return result;
- }
- ACE_CHECK_RETURN (-1);
-
- this->poa_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->csd_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->servant_setup(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->collocated_setup();
- this->poa_activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_collocated_clients(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- this->run_orb_event_loop(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- this->cleanup();
- return this->check_validity () ? 0 : -1;
-}
-
-
-int
-ServerApp::init(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Raises -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- unsigned num_clients = this->num_remote_clients_ +
- this->num_collocated_clients_;
-
- TheAppShutdown->init(this->orb_.in(), num_clients ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-void
-ServerApp::poa_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_ = this->create_poa(this->orb_.in(),
- "ChildPoa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::csd_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->tp_strategy_ = new TAO::CSD::TP_Strategy(this->num_csd_threads_);
-
- if (!this->tp_strategy_->apply_to(this->poa_.in() ACE_ENV_ARG_PARAMETER))
- {
- ACE_ERROR((LM_ERROR,
- "Failed to apply CSD strategy to poa.\n"));
- ACE_THROW(TestAppException());
- }
- ACE_CHECK;
-}
-
-
-void
-ServerApp::servant_setup(ACE_ENV_SINGLE_ARG_DECL)
-{
- this->servants_.create_and_activate(this->num_servants_,
- this->orb_.in (),
- this->poa_.in (),
- this->ior_filename_prefix_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::collocated_setup()
-{
- int custom_client_id_start = this->num_remote_clients_;
-
- unsigned servant_index = 0;
-
- for (unsigned i = 0; i < this->num_collocated_clients_; i++)
- {
- if (i > 0)
- {
- // Dole out the servant object references in a round-robin fashion.
- servant_index = (servant_index + 1) % this->num_servants_;
- }
-
- ServantListType::T_stub_var obj = this->servants_.objref(servant_index);
-
- ClientEngine_Handle engine =
- new Foo_C_Custom_ClientEngine(this->servants_.servant(servant_index),
- obj.in(),
- this->tp_strategy_.in(),
- ++ custom_client_id_start);
- this->collocated_client_task_.add_engine(engine.in());
- }
-}
-
-
-void
-ServerApp::poa_activate(ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager
- = this->poa_->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-ServerApp::run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->num_collocated_clients_ > 0)
- {
- if (this->collocated_client_task_.open() == -1)
- {
- ACE_THROW (TestAppException ());
- }
- }
-}
-
-
-void
-ServerApp::run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL)
-{
- OrbRunner orb_runner(this->orb_.in(), this->num_orb_threads_);
- orb_runner.run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- TheAppShutdown->wait ();
-}
-
-
-void
-ServerApp::cleanup()
-{
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->servants_.servant(i)->dump();
- }
-
- // Wait for all of the collocated client task threads to finish.
- if (this->num_collocated_clients_ > 0)
- {
- this->collocated_client_task_.wait();
- }
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- this->exe_name_ = argv[0];
-
- ACE_Get_Opt get_opts(argc, argv, "p:s:n:t:r:c:k:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- int result = 0;
- switch (c)
- {
- case 'p':
- this->ior_filename_prefix_ = get_opts.opt_arg();
- break;
-
- case 's':
- result = this->set_arg(this->num_servants_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 'n':
- result = this->set_arg(this->num_csd_threads_,
- get_opts.opt_arg(),
- c,
- "num_servants",
- 1);
- break;
-
- case 't':
- result = this->set_arg(this->num_orb_threads_,
- get_opts.opt_arg(),
- c,
- "num_orb_threads",
- 1);
- break;
-
- case 'r':
- result = this->set_arg(this->num_remote_clients_,
- get_opts.opt_arg(),
- c,
- "num_remote_clients");
- break;
-
- case 'c':
- result = this->set_arg(this->num_collocated_clients_,
- get_opts.opt_arg(),
- c,
- "num_collocated_clients");
- break;
-
- case 'k':
- result = this->set_arg(this->collocated_client_kind_,
- get_opts.opt_arg(),
- c,
- "collocated_client_kind");
- break;
-
- case '?':
- this->usage_statement();
- return 1;
-
- default:
- this->usage_statement();
- return -1;
- }
-
- if (result != 0)
- {
- return result;
- }
- }
-
- return this->arg_dependency_checks();
-}
-
-void
-ServerApp::usage_statement()
-{
- ACE_ERROR((LM_ERROR,
- "Usage: %s [options]\n\n"
- "OPTIONS:\n\n"
- "\t[-p <ior_filename_prefix>]\n"
- "\t[-s <num_servants>]\n"
- "\t[-n <num_csd_threads>]\n"
- "\t[-t <num_orb_threads>]\n"
- "\t[-r <num_remote_clients>]\n"
- "\t[-c <num_collocated_clients>]\n"
- "\t[-k <collocated_client_kind>]\n"
- "\t[-?]\n\n",
- this->exe_name_.c_str()));
-}
-
-
-int
-ServerApp::arg_dependency_checks()
-{
- return (this->num_remote_clients_
- + this->num_collocated_clients_) > 0 ? 0 : -1;
-}
-
-
-int
-ServerApp::set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min)
-{
- int tmp = ACE_OS::atoi(arg);
-
- if (tmp < min)
- {
- ACE_ERROR((LM_ERROR,
- "Error: -%c <%s> must be integer type with a value of, "
- "at least, %d.\n", opt, name, min));
- this->usage_statement();
- return -1;
- }
-
- value = tmp;
-
- return 0;
-}
-
-
-PortableServer::POA_ptr
-ServerApp::create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL)
-{
- // Get the Root POA.
- PortableServer::POA_var root_poa
- = RefHelper<PortableServer::POA>::resolve_initial_ref(orb,
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var poa
- = AppHelper::create_poa(poa_name,
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Give away the child POA_ptr from the POA_var variable.
- return poa._retn();
-}
-
-
-bool
-ServerApp::check_validity ()
-{
- Foo_C_Statistics stats (this->num_remote_clients_,
- this->num_collocated_clients_);
-
- Foo_C_ClientEngine::expected_results (stats);
- Foo_C_Custom_ClientEngine::expected_results (stats);
-
- for (unsigned i = 0; i < this->num_servants_; i++)
- {
- this->servants_.servant(i)->gather_stats(stats);
- }
-
- return stats.actual_vs_expected ();
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h
deleted file mode 100644
index 99f0af758b5..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/ServerApp.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "Foo_C_i.h"
-#include "ServantList_T.h"
-#include "ClientTask.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- // These are all called, in order, by the run_i() method.
- int init(int argc, char* argv[] ACE_ENV_ARG_DECL);
- void poa_setup(ACE_ENV_SINGLE_ARG_DECL);
- void csd_setup(ACE_ENV_SINGLE_ARG_DECL);
- void servant_setup(ACE_ENV_SINGLE_ARG_DECL);
- void collocated_setup();
- void poa_activate(ACE_ENV_SINGLE_ARG_DECL);
- void run_collocated_clients(ACE_ENV_SINGLE_ARG_DECL);
- void run_orb_event_loop(ACE_ENV_SINGLE_ARG_DECL);
- bool check_validity ();
- void cleanup();
-
-
- // Helper methods used by the methods above.
- int parse_args(int argc, char* argv[]);
-
- int set_arg(unsigned& value,
- const char* arg,
- char opt,
- const char* name,
- int min = 0);
-
- void usage_statement();
- int arg_dependency_checks();
-
-
- PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
- const char* poa_name
- ACE_ENV_ARG_DECL);
-
- typedef ServantList<Foo_C_i> ServantListType;
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- TAO::CSD::TP_Strategy_Handle tp_strategy_;
-
- ServantListType servants_;
-
- ClientTask collocated_client_task_;
-
- ACE_CString exe_name_;
-
- ACE_CString ior_filename_prefix_;
- unsigned num_servants_;
- unsigned num_csd_threads_;
- unsigned num_orb_threads_;
- unsigned num_remote_clients_;
- unsigned num_collocated_clients_;
- unsigned collocated_client_kind_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp
deleted file mode 100644
index 3814bef5ff9..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/client_main.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl
deleted file mode 100755
index f50c6616e1e..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl
+++ /dev/null
@@ -1,191 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my $status = 0;
-
-my $iorfname_prefix = "servant";
-my $num_servants = 1;
-my $num_orb_threads = 1;
-my $num_remote_clients = 1;
-my $num_csd_threads = 1;
-my $num_collocated_clients = 0;
-my $collocated_client_kind = 0;
-my $client_kind = 0;
-
-my $i;
-my $j;
-my @iorfile;
-
-my $ARGC = @ARGV;
-
-if ($ARGC > 0)
-{
- if ($ARGC > 1)
- {
- print STDERR "ERROR: Too many command-line arguments for $0.\n";
- exit 1;
- }
-
- my $subtest = $ARGV[0];
-
- if ($subtest eq 'remote')
- {
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'collocated')
- {
- $num_remote_clients = 0;
- $num_collocated_clients = 1;
- }
- elsif ($subtest eq 'collocated_big')
- {
- $num_remote_clients = 0;
- $num_csd_threads = 5;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'remote_orbthreads')
- {
- $num_orb_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_servants')
- {
- $num_servants = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_csdthreads')
- {
- $num_csd_threads = 5;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'remote_big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- }
- elsif ($subtest eq 'big')
- {
- $num_csd_threads = 5;
- $num_servants = 10;
- $num_orb_threads = 4;
- $num_remote_clients = 40;
- $num_collocated_clients = 40;
- }
- elsif ($subtest eq 'usage')
- {
- print STDOUT "Usage: $0 [<subtest>]\n" .
- "\n" .
- "Supported <subtest> values:\n" .
- "\n" .
- "\tremote\n" .
- "\tcollocated\n" .
- "\tremote_orbthreads\n" .
- "\tremote_servants\n" .
- "\tremote_csdthreads\n" .
- "\tremote_big\n" .
- "\tusage\n" .
- "\n";
- exit 0;
- }
- else
- {
- print STDERR "ERROR: invalid subtest argument for $0: $subtest\n";
- exit 1;
- }
-}
-
-#Delete old ior files.
-for ($i = 0; $i < $num_servants; $i++) {
- my $servant_id = sprintf("%02d", ($i + 1));
- $iorfile[$i] = PerlACE::LocalFile($iorfname_prefix . "_$servant_id.ior");
- unlink $iorfile[$i];
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-
-}
-else {
- $SV = new PerlACE::Process("server_main",
- "-p $iorfname_prefix " .
- "-s $num_servants " .
- "-n $num_csd_threads " .
- "-t $num_orb_threads " .
- "-r $num_remote_clients " .
- "-c $num_collocated_clients " .
- "-k $collocated_client_kind");
-}
-
-
-$SV->Spawn();
-
-# Wait for the servant ior files created by server.
-for ($i = 0; $i < $num_servants; $i++) {
- if (PerlACE::waitforfile_timed
- ($iorfile[$i],
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile[$i]>\n";
- $SV->Kill();
- $SV->TimedWait(1);
- exit 1;
- }
-}
-
-my $count = 0;
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
-
- $client_id = $i+1;
-
- $j = $i % $num_servants;
-
- $CLS[$i] = new PerlACE::Process("client_main",
- "-i file://$iorfile[$j] ".
- "-k $client_kind ".
- "-n $client_id");
-
- $CLS[$i]->Spawn();
-}
-
-for ($i = 0; $i < $num_remote_clients; $i++)
-{
- $client = $CLS[$i]->WaitKill(60);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill(60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-#Delete ior files generated by this run.
-for ($i = 0; $i < $num_servants; $i++) {
- unlink $iorfile[$i];
-}
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc
deleted file mode 100644
index 9da402191ea..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/CSD_TP_Test_Dynamic.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
-
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp
deleted file mode 100644
index 70af3ea8a11..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README
deleted file mode 100644
index a4e3fbcdc2a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/README
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_5
-
-===========================================================================
-
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_Static
-
-===========================================================================
-This test shows the ThreadPool strategy can automatically apply to the poa
-via service configuration file dynamic directive.
-
-This simple test is a copy of $TAO_ROOT/tests/Hello test. The difference is
-this test contains the svc.conf file to configure the CSD strategies and the
-poas that apply the CSD strategy.
-
-A new TP_Strategy object is created during the initialization of the
-TP_Strategy_Factory service object and it will be automatically applied to
-a poa.
-
-The service configuration file specifies the number of threads that
-the ThreadPool strategy have and also specify which poa the strategy should
-apply to. We can specify multiple ThreadPool strategies and the poas via -CSDtp
-option.
-
-e.g
-dynamic TAO_CSD_TP_Strategy_Factory Service_Object *
-TAO_CSD_ThreadPool:_make_TAO_CSD_TP_Strategy_Factory() "-CSDtp RootPOA:2 -CSDtp childpoa:4"
-
-
-To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp
deleted file mode 100644
index f85722246b5..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/client.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl
deleted file mode 100755
index de69f709455..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp
deleted file mode 100644
index bd2b023e2b7..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/server.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/Thread_Manager.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf
deleted file mode 100644
index e59fb4ac94c..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-dynamic TAO_CSD_TP_Strategy_Factory Service_Object * TAO_CSD_ThreadPool:_make_TAO_CSD_TP_Strategy_Factory() "-CSDtp RootPOA:2"
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc
deleted file mode 100644
index afd9e5d8e68..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/CSD_TP_Test_Static.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): csd_tp_test_exe_a {
- exename=server_main
-
- Source_Files {
- ServerApp.cpp
- server_main.cpp
- }
-}
-
-project(*Client): csd_tp_test_exe_a {
- exename=client_main
- after += *Server
-
- Source_Files {
- ClientApp.cpp
- client_main.cpp
- }
-}
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp
deleted file mode 100644
index 38dd8c26647..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "Foo_A_ClientEngine.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-ClientApp::ClientApp()
- : TestAppBase("TP_Test_1_Client"),
- ior_ ("file://test.ior")
-{
-}
-
-
-ClientApp::~ClientApp()
-{
-}
-
-
-int
-ClientApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
- // Convert the IOR string to a Foo_A object reference.
- Foo_A_var foo = RefHelper<Foo_A>::string_to_ref(orb.in(),
- this->ior_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the appropriate client "engine" object.
- Foo_A_ClientEngine engine(foo.in());
-
- // Execute the client algorithm
- result = engine.execute(ACE_ENV_SINGLE_ARG_PARAMETER) ? 0 : -1;
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-
-int
-ClientApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "i:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'i':
- this->ior_ = get_opts.opt_arg();
- break;
-
- case '?':
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -i <ior_string>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h
deleted file mode 100644
index 1af2e9ff6a6..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ClientApp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-#ifndef CLIENTAPP_H
-#define CLIENTAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ClientApp : public TestAppBase
-{
- public:
-
- ClientApp();
- virtual ~ClientApp();
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README
deleted file mode 100644
index 8090bdb87ce..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/README
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-===========================================================================
-Directory: $TAO_ROOT/tests/CSD_Strategy_Tests/TP_Test_Static
-
-===========================================================================
-This test shows the ThreadPool strategy can automatically apply to the poa
-via service configuration file static directive.
-
-This simple test is a copy of TP_Test_1. The difference is the test
-application does not need to create the TP_Strategy object and apply to the
-poa. A new TP_Strategy object is created during the initialization of the
-TP_Strategy_Factory service object and it will be automatically applied to
-a poa.
-
-The application needs to include the following two files to force the
-TAO_CSD_ORB_Loader and TAO_CSD_TP_Strategy_Factory service objects register
-with the service repository before initializing the services specified in
-.conf file.
-
-#include "tao/CSD_Framework/CSD_ORB_Loader.h"
-#include "tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.h"
-
-
-The service configuration file specifies the number of threads that
-the ThreadPool strategy have and also specify which poa the strategy should
-apply to. We can specify multiple ThreadPool strategies and the poas via -CSDtp
-option.
-
-e.g
-static TAO_CSD_TP_Strategy_Factory "-CSDtp RootPOA:2 -CSDtp ChildPoa:3"
-
-
-To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp
deleted file mode 100644
index c4af3802881..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "Foo_A_i.h"
-#include "AppHelper.h"
-#include "TestAppExceptionC.h"
-#include "AppShutdown.h"
-#include "ace/Get_Opt.h"
-// To force static load the service.
-#include "tao/PI/PI.h"
-#include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
-
-
-ServerApp::ServerApp()
- : TestAppBase("TP_Test_1_Server"),
- ior_filename_ ("test.ior"),
- num_clients_ (1)
-{
-}
-
-ServerApp::~ServerApp()
-{
-}
-
-int
-ServerApp::run_i(int argc, char* argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB before parsing our own args.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Parse the command-line args for this application.
- // * Returns -1 if problems are encountered.
- // * Returns 1 if the usage statement was explicitly requested.
- // * Returns 0 otherwise.
- int result = this->parse_args(argc, argv);
- if (result != 0)
- {
- return result;
- }
-
- TheAppShutdown->init(orb.in(), num_clients_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the Root POA
- PortableServer::POA_var root_poa =
- RefHelper<PortableServer::POA>::resolve_initial_ref(orb.in(),
- "RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POAManager from the Root POA.
- PortableServer::POAManager_var poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the child POA Policies.
- CORBA::PolicyList policies(0);
- policies.length(0);
-
- // Create the child POA
- PortableServer::POA_var child_poa =
- AppHelper::create_poa("ChildPoa",
- root_poa.in(),
- poa_manager.in(),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the servant object.
- Foo_A_i* servant = new Foo_A_i();
-
- // Local smart pointer variable to deal with releasing the reference
- // to the servant object when the variable falls out of scope.
- PortableServer::ServantBase_var servant_owner(servant);
-
- // Obtain the object reference using the servant
- CORBA::Object_var obj = AppHelper::activate_servant(child_poa.in(),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Stringify and save the object reference to a file
- AppHelper::ref_to_file(orb.in(),
- obj.in(),
- this->ior_filename_.c_str()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Activate the POA Manager
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is ready. Running the ORB event loop.\n"));
-
- // Run the ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp ORB event loop has completed.\n"));
-
- TheAppShutdown->wait ();
-
- // Calling wait on ACE_Thread_Manager singleton to avoid the problem
- // that the main thread might exit before all CSD Threads exit.
-
- // Wait for all CSD task threads exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the Root POA.\n"));
-
- root_poa->destroy(1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp is destroying the ORB.\n"));
-
- orb->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG((LM_DEBUG,
- "(%P|%t) ServerApp has completed running successfully.\n"));
-
- return 0;
-}
-
-
-int
-ServerApp::parse_args(int argc, char* argv[])
-{
- ACE_Get_Opt get_opts(argc, argv, "o:n:");
-
- int c;
-
- while ((c = get_opts()) != -1)
- {
- switch (c)
- {
- case 'o':
- this->ior_filename_ = get_opts.opt_arg();
- break;
-
- case 'n':
- {
- int tmp = ACE_OS::atoi(get_opts.opt_arg());
- if (tmp < 1)
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Error. -n must be followed by an integer "
- "value greater than 0.\n"));
- return -1;
- }
-
- this->num_clients_ = tmp;
- }
- break;
-
- case '?':
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return 1;
-
- default:
- ACE_ERROR((LM_ERROR,
- "(%P|%t) usage: %s -o <ior_filename> -n <num_clients>\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h
deleted file mode 100644
index 3bfe10e6f0a..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/ServerApp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-#ifndef SERVERAPP_H
-#define SERVERAPP_H
-
-#include "TestAppBase.h"
-#include "ace/SString.h"
-
-
-class ServerApp : public TestAppBase
-{
- public:
-
- ServerApp();
- virtual ~ServerApp();
-
-
- protected:
-
- virtual int run_i(int argc, char* argv[] ACE_ENV_ARG_DECL);
-
-
- private:
-
- int parse_args(int argc, char* argv[]);
-
- ACE_CString ior_filename_;
- unsigned num_clients_;
-};
-
-#endif
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp
deleted file mode 100644
index ae98ca0f6ac..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/client_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ClientApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ClientApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl
deleted file mode 100755
index 7e34ffa58ba..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$num_clients=40;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server_main", "-o $iorfile -n $num_clients");
-}
-else {
- $SV = new PerlACE::Process ("server_main", "-o $iorfile -n $num_clients");
-}
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- @CLS[$i] = new PerlACE::Process ("client_main", " -i file://$iorfile");
-
- @CLS[$i]->Spawn ();
-}
-
-for ($i = 0; $i < $num_clients; $i++) {
-
- $client = @CLS[$i]->WaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client $i returned $client\n";
- $status = 1;
- }
-}
-
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp
deleted file mode 100644
index 82e987f6d41..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/server_main.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-#include "ServerApp.h"
-#include "TestAppMain.h"
-
-TEST_APP_MAIN(ServerApp)
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf
deleted file mode 100644
index a274350e4ac..00000000000
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-static TAO_CSD_TP_Strategy_Factory "-CSDtp ChildPoa:2"
diff --git a/TAO/tests/Cache_Growth_Test/.cvsignore b/TAO/tests/Cache_Growth_Test/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Cache_Growth_Test/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc b/TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc
deleted file mode 100644
index e64ad8d08a8..00000000000
--- a/TAO/tests/Cache_Growth_Test/Cache_Growth_Test.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Cache_Growth_Test/Hello.cpp b/TAO/tests/Cache_Growth_Test/Hello.cpp
deleted file mode 100644
index 8d28b7d9bc5..00000000000
--- a/TAO/tests/Cache_Growth_Test/Hello.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "tao/Thread_Lane_Resources.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) The size is growing \n"));
- }
-
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Cache_Growth_Test/Hello.h b/TAO/tests/Cache_Growth_Test/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/Cache_Growth_Test/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Cache_Growth_Test/README b/TAO/tests/Cache_Growth_Test/README
deleted file mode 100644
index ace71bc42a1..00000000000
--- a/TAO/tests/Cache_Growth_Test/README
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
-
-@page Cache Grow Test README File
-
- This test is to make sure that we close the cache entries
- properly when the clients are disconnected. The test does
- something really simple. Infact it is a copy of the Hello
- test. But in this test we connect multiple clients to the
- server to make sure that our cache size does not grow.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Cache_Growth_Test/Test.idl b/TAO/tests/Cache_Growth_Test/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Cache_Growth_Test/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Cache_Growth_Test/client.cpp b/TAO/tests/Cache_Growth_Test/client.cpp
deleted file mode 100644
index 167a3e08b27..00000000000
--- a/TAO/tests/Cache_Growth_Test/client.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int do_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'x':
- do_shutdown = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-x <do_shutdown>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- if (do_shutdown)
- {
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Cache_Growth_Test/run_test.pl b/TAO/tests/Cache_Growth_Test/run_test.pl
deleted file mode 100755
index 35db649c452..00000000000
--- a/TAO/tests/Cache_Growth_Test/run_test.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL1 = new PerlACE::Process ("client", " -k file://$iorfile -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-for ($i = 0; $i != 30; $i++) {
- $client = $CL->SpawnWaitKill (300);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-}
-
-$client1 = $CL1->SpawnWaitKill (300);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client1 returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Cache_Growth_Test/server.cpp b/TAO/tests/Cache_Growth_Test/server.cpp
deleted file mode 100644
index ef867fc77aa..00000000000
--- a/TAO/tests/Cache_Growth_Test/server.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Hello, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CallbackTest/Callback.cpp b/TAO/tests/CallbackTest/Callback.cpp
deleted file mode 100644
index 7b310b57b2f..00000000000
--- a/TAO/tests/CallbackTest/Callback.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $Id$
-//
-#include "Callback.h"
-
-ACE_RCSID(Callback, Callback, "$Id$")
-
-Callback::Callback (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Boolean
-Callback::are_you_there (CORBA::String_out answer ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Callback - we are here!\n"));
-
- answer = CORBA::string_dup ("Yes, I am!");
-
- return 1;
-}
-
-void
-Callback::test_oneway (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Callback - test_oneway!\n"));
-}
-
-void
-Callback::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Callback - shutdown!\n"));
-
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/CallbackTest/Callback.h b/TAO/tests/CallbackTest/Callback.h
deleted file mode 100644
index 81f26ac880a..00000000000
--- a/TAO/tests/CallbackTest/Callback.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CALLBACK_CALLBACK_H
-#define CALLBACK_CALLBACK_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Callback interface
-class Callback
- : public virtual POA_Test::Callback
-{
-public:
- /// Constructor
- Callback (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual CORBA::Boolean are_you_there (CORBA::String_out answer ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void test_oneway (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-private:
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CALLBACK_CALLBACK_H */
diff --git a/TAO/tests/CallbackTest/CallbackTest.mpc b/TAO/tests/CallbackTest/CallbackTest.mpc
deleted file mode 100644
index 9bf640dd2b3..00000000000
--- a/TAO/tests/CallbackTest/CallbackTest.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Service.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, portableserver, messaging {
- after += *Server
- Source_Files {
- Callback.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/CallbackTest/README b/TAO/tests/CallbackTest/README
deleted file mode 100644
index 79faf6d8824..00000000000
--- a/TAO/tests/CallbackTest/README
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
-
-@page Callback Test README File
-
- This is a test to test client callbacks in various IP connection setups.
-
- - run_test.pl tests the default endpoint setup;
-
- - run_test_ipv6.pl tests the situation where both
- server and client are forced to use only IPv6
- endpoints;
-
- - run_test_mixed_ip.pl tests the situation where the server is forced to
- use an IPv6 endpoint and the client an IPv4 endpoint.
-
- To run the test use the run_testXXX.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/CallbackTest/Service.cpp b/TAO/tests/CallbackTest/Service.cpp
deleted file mode 100644
index 9eca34c0d58..00000000000
--- a/TAO/tests/CallbackTest/Service.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// $Id$
-//
-#include "Service.h"
-
-ACE_RCSID(Callback, Service, "$Id$")
-
-Service::Service (CORBA::ORB_ptr orb)
- : test_count_ (0),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Service::dump_results (void)
-{
- if (this->test_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: no tests were completed!\n"));
- }
-}
-
-void
-Service::run_test (Test::Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- int exceptions =
- this->call_are_you_there (callback ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- exceptions +=
- this->call_test_oneway (callback ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (exceptions != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: There were %d exceptions\n"));
- }
-
- /// Increment the number of tests completed
- this->test_count_++;
-
- ACE_TRY
- {
- callback->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_ERROR, "(%P|%t) - Service, client shutdown FAILED\n"));
- }
- ACE_ENDTRY;
-
- // shutdown ourselves
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-
-int
-Service::call_are_you_there (Test::Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Service, calling are_you_there\n"));
- const int iterations = 10;
-
- int exception_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- char* outstr;
- CORBA::String_out out_str (outstr);
- ACE_TRY
- {
- (void) callback->are_you_there (out_str ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- exception_count++;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Service, answer = %s\n", outstr));
- }
- return exception_count;
-}
-
-int
-Service::call_test_oneway (Test::Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Service, calling test_oneway\n"));
- const int iterations = 10;
-
- int exception_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- ACE_TRY
- {
- (void) callback->test_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- exception_count++;
- }
- ACE_ENDTRY;
- }
- return exception_count;
-}
diff --git a/TAO/tests/CallbackTest/Service.h b/TAO/tests/CallbackTest/Service.h
deleted file mode 100644
index f8773771eb4..00000000000
--- a/TAO/tests/CallbackTest/Service.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CALLBACK_SERVICE_H
-#define CALLBACK_SERVICE_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Service interface
-class Service
- : public virtual POA_Test::Service
-{
-public:
- /// Constructor
- Service (CORBA::ORB_ptr orb);
-
- /// Dump the results.
- /**
- * In case of failure this exposes any incomplete runs.
- */
- void dump_results (void);
-
- // = The skeleton methods
- virtual void run_test (Test::Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Call the are_you_there callback multiple times.
- /**
- * @return Number of exceptions raised
- */
- int call_are_you_there (Test::Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (());
-
- /// Call the test_oneway method mutiple times.
- /**
- * @return Number of exceptions raised
- */
- int call_test_oneway (Test::Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (());
-
-private:
- /// Count the number of tests executed
- int test_count_;
-
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CALLBACK_SERVICE_H */
diff --git a/TAO/tests/CallbackTest/Test.idl b/TAO/tests/CallbackTest/Test.idl
deleted file mode 100644
index d10096168e8..00000000000
--- a/TAO/tests/CallbackTest/Test.idl
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /**
- * Callback interface.
- */
- interface Callback
- {
- /// Make sure the callback object is in good shape
- boolean are_you_there (out string answer);
-
- /// Receive the first callback
- oneway void test_oneway ();
-
- /// Shutdown
- oneway void shutdown ();
-
- };
-
- /**
- * Clients connect to this interface passing in a Callback
- * object.
- * The service will then invoke all the methods on the
- * Callback.
- *
- */
- interface Service
- {
- /// Invoke the callback object from the server
- oneway void run_test (in Callback the_callback);
- };
-
-};
diff --git a/TAO/tests/CallbackTest/client.cpp b/TAO/tests/CallbackTest/client.cpp
deleted file mode 100644
index c83089e148d..00000000000
--- a/TAO/tests/CallbackTest/client.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-// $Id$
-
-#include "Callback.h"
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Crashed_Callback, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Make all oneways "reliable."
- {
- CORBA::Object_var manager_object =
- orb->resolve_initial_references("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow(manager_object.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_manager.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil PolicyManager\n"),
- 1);
- CORBA::Any policy_value;
- policy_value <<= Messaging::SYNC_WITH_SERVER;
- CORBA::PolicyList policies(1); policies.length(1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Service_var service =
- Test::Service::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (service.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil service reference <%s>\n",
- ior),
- 1);
- }
-
- Callback *callback_impl;
- ACE_NEW_RETURN (callback_impl,
- Callback(orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(callback_impl);
-
- Test::Callback_var callback =
- callback_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) client - starting test\n"));
-
- service->run_test (callback.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) client - running ORB\n"));
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CallbackTest/run_test.pl b/TAO/tests/CallbackTest/run_test.pl
deleted file mode 100755
index 4fbbc680ff2..00000000000
--- a/TAO/tests/CallbackTest/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-# The client crashes, therefore it normally exists with status != 0,
-# but a status of -1 would be a serious error.
-if ($client == -1) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CallbackTest/run_test_ipv6.pl b/TAO/tests/CallbackTest/run_test_ipv6.pl
deleted file mode 100755
index d015ffcec7c..00000000000
--- a/TAO/tests/CallbackTest/run_test_ipv6.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBConnectIPV6Only 1");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBConnectIPV6Only 1");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBConnectIPV6Only 1");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-# The client crashes, therefore it normally exists with status != 0,
-# but a status of -1 would be a serious error.
-if ($client == -1) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CallbackTest/run_test_mixed_ip.pl b/TAO/tests/CallbackTest/run_test_mixed_ip.pl
deleted file mode 100755
index 9aea2e31cac..00000000000
--- a/TAO/tests/CallbackTest/run_test_mixed_ip.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBListenEndpoints iiop://[::1]");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBListenEndpoints iiop://[::1]");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBListenEndpoints iiop://127.0.0.1");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-# The client crashes, therefore it normally exists with status != 0,
-# but a status of -1 would be a serious error.
-if ($client == -1) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CallbackTest/server.cpp b/TAO/tests/CallbackTest/server.cpp
deleted file mode 100644
index 07c1e010f40..00000000000
--- a/TAO/tests/CallbackTest/server.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-// $Id$
-
-#include "Service.h"
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Crashed_Callback, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Make all oneways "reliable."
- {
- CORBA::Object_var manager_object =
- orb->resolve_initial_references("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow(manager_object.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_manager.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil PolicyManager\n"),
- 1);
- CORBA::Any policy_value;
- policy_value <<= Messaging::SYNC_WITH_SERVER;
- CORBA::PolicyList policies(1); policies.length(1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Service *service_impl;
- ACE_NEW_RETURN (service_impl,
- Service(orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(service_impl);
-
- Test::Service_var service =
- service_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (service.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished\n"));
-
- service_impl->dump_results ();
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Client_Leaks/.cvsignore b/TAO/tests/Client_Leaks/.cvsignore
deleted file mode 100644
index 7fc225a9334..00000000000
--- a/TAO/tests/Client_Leaks/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-child
-client
-server
diff --git a/TAO/tests/Client_Leaks/Client_Leaks.mpc b/TAO/tests/Client_Leaks/Client_Leaks.mpc
deleted file mode 100644
index a83a41950f3..00000000000
--- a/TAO/tests/Client_Leaks/Client_Leaks.mpc
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Process_Factory.cpp
- Startup_Callback.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- Client_Task.cpp
- client.cpp
- }
-}
-
-project(*Child): taoserver {
- exename = child
- after += *Client
- Source_Files {
- Process.cpp
- child.cpp
- }
-}
-
diff --git a/TAO/tests/Client_Leaks/Client_Task.cpp b/TAO/tests/Client_Leaks/Client_Task.cpp
deleted file mode 100644
index 2ae166c58be..00000000000
--- a/TAO/tests/Client_Leaks/Client_Task.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Client_Leaks, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Process_Factory_ptr process_factory,
- int iterations)
- : process_factory_ (Test::Process_Factory::_duplicate (process_factory))
- , iterations_ (iterations)
- , successful_calls_ (0)
-{
-}
-
-int
-Client_Task::successful_calls (void) const
-{
- return this->successful_calls_;
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
-
- int successful_calls = 0;
-
- ACE_TRY
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i != this->iterations_; ++i)
- {
- int retval = this->one_iteration (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (retval != 0)
- successful_calls++;
-
- if (i % 10 == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) - Client_Task::svc %d / %d iterations\n",
- i, this->iterations_));
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
- this->successful_calls_ += successful_calls;
-
- return 0;
-}
-
-void
-Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_TRY
- {
- for (int i = 0; i != 100; ++i)
- {
- (void) this->process_factory_->noop (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::TRANSIENT, ex)
- {
- // Ignore transient exceptions
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-Client_Task::one_iteration (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_TRY
- {
- Test::Process_var process =
- this->process_factory_->create_new_process (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- (void) process->get_process_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- process->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 1;
- }
- ACE_CATCH(Test::Spawn_Failed, ignored)
- {
- // Ignore this exception, it is usually caused by a transient
- // condition
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Client_Leaks/Client_Task.h b/TAO/tests/Client_Leaks/Client_Task.h
deleted file mode 100644
index 573697926b1..00000000000
--- a/TAO/tests/Client_Leaks/Client_Task.h
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_LEAKS_CLIENT_TASK_H
-#define CLIENT_LEAKS_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Process_Factory_ptr process_Factory,
- int iterations);
-
- /// Return the total number of sucessful calls
- int successful_calls (void) const;
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Run one iteration of the test
- int one_iteration (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Make sure that the thread has a connection available
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// Reference to the test interface
- Test::Process_Factory_var process_factory_;
-
- /// Total number of processes created by each thread
- int iterations_;
-
- /// At least some calls must be successful
- int successful_calls_;
-
- /// Implement the Monitor Object Pattern.
- TAO_SYNCH_MUTEX mutex_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_LEAKS_CLIENT_TASK_H */
diff --git a/TAO/tests/Client_Leaks/Process.cpp b/TAO/tests/Client_Leaks/Process.cpp
deleted file mode 100644
index 54a6acd58f3..00000000000
--- a/TAO/tests/Client_Leaks/Process.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-#include "Process.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Client_Leaks, Process, "$Id$")
-
-Process::Process (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Long
-Process::get_process_id (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return ACE_OS::getpid ();
-}
-
-void
-Process::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Client_Leaks/Process.h b/TAO/tests/Client_Leaks/Process.h
deleted file mode 100644
index 4118fc33d58..00000000000
--- a/TAO/tests/Client_Leaks/Process.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_LEAKS_PROCESS_H
-#define CLIENT_LEAKS_PROCESS_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Process interface
-class Process
- : public virtual POA_Test::Process
-{
-public:
- /// Constructor
- Process (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual CORBA::Long get_process_id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_LEAKS_PROCESS_H */
diff --git a/TAO/tests/Client_Leaks/Process_Factory.cpp b/TAO/tests/Client_Leaks/Process_Factory.cpp
deleted file mode 100644
index f1039150d26..00000000000
--- a/TAO/tests/Client_Leaks/Process_Factory.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-//
-// $Id$
-//
-#include "Process_Factory.h"
-#include "Startup_Callback.h"
-#include "ace/Process.h"
-
-ACE_RCSID(Client_Leaks, Process_Factory, "$Id$")
-
-Process_Factory::Process_Factory (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , shutdown_received_ (0)
-{
-}
-
-int
-Process_Factory::shutdown_received (void)
-{
- return this->shutdown_received_;
-}
-
-Test::Process_ptr
-Process_Factory::create_new_process (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test::Spawn_Failed))
-{
- Startup_Callback *startup_callback_impl;
- ACE_NEW_THROW_EX (startup_callback_impl,
- Startup_Callback,
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (Test::Process::_nil ());
-
- PortableServer::ServantBase_var owner_transfer(startup_callback_impl);
-
- Test::Startup_Callback_var startup_callback =
- startup_callback_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (Test::Process::_nil ());
-
- CORBA::String_var ior =
- this->orb_->object_to_string (startup_callback.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Test::Process::_nil ());
-
- const char* argv[3] = {
- "child",
- ior.in (),
- 0};
-
- ACE_Process_Options options;
-#if !defined(ACE_WIN32)
- options.avoid_zombies (1);
-#endif /* ACE_WIN32 */
- options.command_line (argv);
-
- ACE_Process child_process;
- pid_t pid =
- child_process.spawn (options);
-
- if (pid == -1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Process_Factory::create_new_process, "
- " spawn call failed (%d)\n",
- errno));
- ACE_THROW_RETURN (Test::Spawn_Failed (), Test::Process::_nil ());
- }
-
- int process_has_started = 0;
- Test::Process_var the_process;
- for (int i = 0; i != 500 && !process_has_started; ++i)
- {
- ACE_Time_Value interval (0, 10000);
- this->orb_->perform_work (interval ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Test::Process::_nil ());
-
- process_has_started =
- startup_callback_impl->process_has_started (the_process.out ());
- }
-
- ACE_TRY
- {
- PortableServer::POA_var poa =
- startup_callback_impl->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::ObjectId_var id =
- poa->servant_to_id (startup_callback_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (process_has_started == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Process_Factory::create_new_process, "
- " timeout while waiting for child\n"));
- (void) child_process.terminate ();
- ACE_THROW_RETURN (Test::Spawn_Failed (), Test::Process::_nil ());
- }
-
- return the_process._retn ();
-}
-
-void
-Process_Factory::noop (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Process_Factory::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->shutdown_received_ = 1;
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Client_Leaks/Process_Factory.h b/TAO/tests/Client_Leaks/Process_Factory.h
deleted file mode 100644
index 0836a583d84..00000000000
--- a/TAO/tests/Client_Leaks/Process_Factory.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_LEAKS_PROCESS_FACTORY_H
-#define CLIENT_LEAKS_PROCESS_FACTORY_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Process_Factory interface
-class Process_Factory
- : public virtual POA_Test::Process_Factory
-{
-public:
- /// Constructor
- Process_Factory (CORBA::ORB_ptr orb);
-
- /// Return 1 if the shutdown message has been received already
- int shutdown_received (void);
-
- // = The skeleton methods
- virtual Test::Process_ptr create_new_process (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test::Spawn_Failed));
-
- virtual void noop (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- /// Set to 1 when the test has finished
- int shutdown_received_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_LEAKS_PROCESS_FACTORY_H */
diff --git a/TAO/tests/Client_Leaks/README b/TAO/tests/Client_Leaks/README
deleted file mode 100644
index 5e17aa080f6..00000000000
--- a/TAO/tests/Client_Leaks/README
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-
-@page Client Leaks Test README File
-
- On TAO-1.1.12 the ORB was leaking handles on the client-side.
-This test creates multiple servers trying to force a fault or
-exception if the resources are still leaked.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Client_Leaks/Server_Task.cpp b/TAO/tests/Client_Leaks/Server_Task.cpp
deleted file mode 100644
index 150de719f94..00000000000
--- a/TAO/tests/Client_Leaks/Server_Task.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// $Id$
-//
-
-#include "Server_Task.h"
-
-ACE_RCSID(Client_Leaks, Server_Task, "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // run the test for at most 120 seconds...
- // ACE_Time_Value tv (120, 0);
- this->orb_->run ( /* tv, */ ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Client_Leaks/Server_Task.h b/TAO/tests/Client_Leaks/Server_Task.h
deleted file mode 100644
index ecc5a9675f2..00000000000
--- a/TAO/tests/Client_Leaks/Server_Task.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_LEAKS_SERVER_TASK_H
-#define CLIENT_LEAKS_SERVER_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_LEAKS_SERVER_TASK_H */
diff --git a/TAO/tests/Client_Leaks/Startup_Callback.cpp b/TAO/tests/Client_Leaks/Startup_Callback.cpp
deleted file mode 100644
index df4d755a97f..00000000000
--- a/TAO/tests/Client_Leaks/Startup_Callback.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// $Id$
-//
-#include "Startup_Callback.h"
-
-ACE_RCSID(Client_Leaks, Startup_Callback, "$Id$")
-
-Startup_Callback::Startup_Callback (void)
-{
-}
-
-int
-Startup_Callback::process_has_started (Test::Process_out the_process)
-{
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
- if (!CORBA::is_nil (this->process_.in ()))
- {
- the_process = Test::Process::_duplicate (this->process_.in ());
- return 1;
- }
- return 0;
-}
-
-void
-Startup_Callback::started (Test::Process_ptr process
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- this->process_ = Test::Process::_duplicate (process);
-}
diff --git a/TAO/tests/Client_Leaks/Startup_Callback.h b/TAO/tests/Client_Leaks/Startup_Callback.h
deleted file mode 100644
index 34e3d8e7412..00000000000
--- a/TAO/tests/Client_Leaks/Startup_Callback.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CLIENT_LEAKS_STARTUP_CALLBACK_H
-#define CLIENT_LEAKS_STARTUP_CALLBACK_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Startup_Callback interface
-class Startup_Callback
- : public virtual POA_Test::Startup_Callback
-{
-public:
- /// Constructor
- Startup_Callback (void);
-
- /// Return 1 if the process has started already
- /**
- * If the process has started then <the_process> returns the object
- * reference for the new process
- */
- int process_has_started (Test::Process_out the_process);
-
- // = The skeleton methods
- virtual void started (Test::Process_ptr the_process
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Synchronize changes to the internal data
- TAO_SYNCH_MUTEX mutex_;
-
- /// Store the process.
- Test::Process_var process_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CLIENT_LEAKS_STARTUP_CALLBACK_H */
diff --git a/TAO/tests/Client_Leaks/Test.idl b/TAO/tests/Client_Leaks/Test.idl
deleted file mode 100644
index c7c4ee2abf2..00000000000
--- a/TAO/tests/Client_Leaks/Test.idl
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /// Forward declare the Process interface
- interface Process;
-
- /// The process factory cannot create a new process
- exception Spawn_Failed {};
-
- /// A factory for processes
- /**
- * The client creates multiple processes using this interface, then
- * it tries to crash the process and verify that it can work
- * correctly in that scenario.
- */
- interface Process_Factory
- {
- /// Create a new process and return its object reference
- Process create_new_process () raises (Spawn_Failed);
-
- /// Empty method, used to validate the connection
- void noop ();
-
- /// Shutdown the process factory
- oneway void shutdown ();
- };
-
- /// An interface to communicate and shutdown a process
- interface Process
- {
- /// Return the process id
- long get_process_id ();
-
- /// Shutdown the process
- oneway void shutdown ();
- };
-
- /// Used by the Process Factory to receive the IOR of newly created
- /// processes
- interface Startup_Callback
- {
- void started (in Process the_process);
- };
-};
diff --git a/TAO/tests/Client_Leaks/child.cpp b/TAO/tests/Client_Leaks/child.cpp
deleted file mode 100644
index 4ee5c104d0b..00000000000
--- a/TAO/tests/Client_Leaks/child.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id$
-
-#include "Process.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Client_Leaks, server, "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (argc < 2)
- {
- // Paranoia, we should have an auto_ptr-like gadget for
- // this.
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s <ior>\n",
- argv[0]), 1);
- }
-
- CORBA::Object_var object =
- orb->string_to_object (argv[1] ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Test::Startup_Callback_var startup_callback =
- Test::Startup_Callback::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (CORBA::is_nil (startup_callback.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: nil startup callback\n"),
- 1);
- }
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Process *process_impl;
- ACE_NEW_RETURN (process_impl,
- Process (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(process_impl);
-
- Test::Process_var process =
- process_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- startup_callback->started (process.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (50, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // Do not print error messages, they only make the test output
- // confusing.
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Client_Leaks/client.cpp b/TAO/tests/Client_Leaks/client.cpp
deleted file mode 100644
index a06c49b3e8a..00000000000
--- a/TAO/tests/Client_Leaks/client.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Client_Leaks, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int iterations = 100;
-int threads = 12;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'n':
- threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <iterations> "
- "-i <threads> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Process_Factory_var process_factory =
- Test::Process_Factory::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (process_factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil process reference <%s>\n",
- ior),
- 1);
- }
-
- Client_Task client_task (process_factory.in (),
- iterations);
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE,
- threads, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- process_factory->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Only pass the test if 90% of the calls worked
- if (client_task.successful_calls () < 0.9 * iterations * threads)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: no calls were successful\n"));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Client_Leaks/run_test.pl b/TAO/tests/Client_Leaks/run_test.pl
deleted file mode 100755
index 877d66779df..00000000000
--- a/TAO/tests/Client_Leaks/run_test.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (600);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Client_Leaks/server.cpp b/TAO/tests/Client_Leaks/server.cpp
deleted file mode 100644
index 4260fbfd963..00000000000
--- a/TAO/tests/Client_Leaks/server.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// $Id$
-
-#include "Process_Factory.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Client_Leaks, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Process_Factory *process_factory_impl;
- ACE_NEW_RETURN (process_factory_impl,
- Process_Factory (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(process_factory_impl);
-
- Test::Process_Factory_var process =
- process_factory_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (process.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task server_task (orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 8, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CodeSets/README b/TAO/tests/CodeSets/README
deleted file mode 100644
index a9c106baceb..00000000000
--- a/TAO/tests/CodeSets/README
+++ /dev/null
@@ -1,8 +0,0 @@
-Codeset translation test.
-
-First build the IBM1047 - ISO8859 translator library. Then build and run the
-"simple" test.
-
-The translator library may also serve as a reference for building other custom
-translators.
-
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.cpp b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.cpp
deleted file mode 100644
index d5dfd92b64d..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CodeSets/libs/IBM1047_ISO8859
-//
-// = FILENAME
-// Char_IBM1047_ISO8859_Factory.cpp
-//
-// = DESCRIPTION
-// A tempate instantiation of the codeset translator factory from TAO. This
-// one loads a modified version of ACE's IBM1047 (EBCDIC) to ISO8859 (ASCII)
-// translator.
-//
-// = AUTHORS
-// Phil Mesnier <mesnier_p@ociweb.com>
-//
-// ============================================================================
-
-#include "Char_IBM1047_ISO8859_Factory.h"
-#include "ace/Log_Msg.h"
-
-ACE_STATIC_SVC_DEFINE (Char_IBM1047_ISO8859_Factory,
- ACE_TEXT ("Char_IBM1047_ISO8859_Factory"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Char_IBM1047_ISO8859_Factory),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-ACE_FACTORY_DEFINE (IBM1047_ISO8859, Char_IBM1047_ISO8859_Factory)
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.h b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.h
deleted file mode 100644
index ce0ae435dd1..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Factory.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CodeSets/libs/IBM1047_ISO8859
-//
-// = FILENAME
-// Char_IBM1047_ISO8859_Factory.h
-//
-// = DESCRIPTION
-// A tempate instantiation of the codeset translator factory from TAO. This
-// one loads a modified version of ACE's IBM1047 (EBCDIC) to ISO8859 (ASCII)
-// translator.
-//
-// = AUTHORS
-// Phil Mesnier <mesnier_p@ociweb.com>
-//
-// ============================================================================
-
-#ifndef CHAR_IBM1047_ISO8859_FACTORY_H
-#define CHAR_IBM1047_ISO8859_FACTORY_H
-
-#include /**/ "ace/pre.h"
-#include "ace/Service_Config.h"
-#include "tao/Codeset_Translator_Factory.h"
-
-#include "IBM1047_ISO8859_export.h"
-#include "Char_IBM1047_ISO8859_Translator.h"
-
-typedef TAO_Codeset_Translator_Factory_T<IBM1047_ISO8859> Char_IBM1047_ISO8859_Factory;
-
-ACE_STATIC_SVC_DECLARE_EXPORT (IBM1047_ISO8859, Char_IBM1047_ISO8859_Factory)
-ACE_FACTORY_DECLARE (IBM1047_ISO8859, Char_IBM1047_ISO8859_Factory)
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CHAR_IBM1047_ISO8859_FACTORY_H */
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp
deleted file mode 100644
index 4c9d5479957..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Char_IBM1047_ISO8859_Translator.cpp
-//
-// = DESCRIPTION
-// Defines the arrays required to convert between ISO8859 (aka
-// Latin/1) and IBM1047 (aka EBCDIC).
-//
-// = AUTHOR
-// Jim Rogers (jrogers@viasoft.com)
-//
-// ============================================================================
-
-#include "Char_IBM1047_ISO8859_Translator.h"
-#include "ace/OS_Memory.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (IBM1047_ISO8859,
- Char_IBM1047_ISO8859_Translator,
- "$Id$")
-
-// ****************************************************************
-
-IBM1047_ISO8859::IBM1047_ISO8859 (void)
-{
-}
-
-IBM1047_ISO8859::~IBM1047_ISO8859 (void)
-{
-}
-
-ACE_CDR::Boolean
-IBM1047_ISO8859::read_char (ACE_InputCDR &in,
- ACE_CDR::Char &x)
-{
- if (this->read_1 (in, reinterpret_cast<ACE_CDR::Octet*> (&x)))
- {
- x = to_IBM1047[(int) x];
- return 1;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-IBM1047_ISO8859::read_string (ACE_InputCDR& in,
- ACE_CDR::Char *& x)
-{
- ACE_CDR::ULong len;
-
- in.read_ulong (len);
-
- if (len > 0)
- {
- // ACE_DEBUG ((LM_DEBUG,"read_string: len = %u\n",len));
- ACE_NEW_RETURN (x,
- ACE_CDR::Char[len],
- 0);
-
- if (this->read_char_array (in, x, len))
- return 1;
-
- delete [] x;
- }
-
- x = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-IBM1047_ISO8859::read_char_array (ACE_InputCDR& in,
- ACE_CDR::Char* x,
- ACE_CDR::ULong len)
-{
- if (this->read_array (in,
- x,
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- len))
- {
- for (ACE_CDR::ULong i = 0; i != len; ++i)
- {
- x[i] = (unsigned char)to_IBM1047[(unsigned char)x[i]];
- }
-
- return 1;
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-IBM1047_ISO8859::write_char (ACE_OutputCDR& out,
- ACE_CDR::Char x)
-{
- return this->write_1 (out,
- reinterpret_cast<const ACE_CDR::Octet*> (&from_IBM1047[(int) x]));
-}
-
-ACE_CDR::Boolean
-IBM1047_ISO8859::write_string (ACE_OutputCDR& out,
- ACE_CDR::ULong len,
- const ACE_CDR::Char* x)
-{
- if (out.write_ulong (len + 1))
- {
- return this->write_char_array (out, x, len + 1);
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-IBM1047_ISO8859::write_char_array (ACE_OutputCDR& out,
- const ACE_CDR::Char* x,
- ACE_CDR::ULong len)
-{
- char *buf;
-
- if (this->adjust (out, len, 1, buf) == 0)
- {
- ACE_OS::memcpy (buf, x, len);
-
- for (ACE_CDR::ULong i = 0; i != len; ++i)
- {
- buf[i] = (unsigned char)from_IBM1047[(unsigned char)buf[i]];
- }
-
- return 1;
- }
-
- this->good_bit(out, 0);
- return 0;
-}
-
-// ****************************************************************
-
-char to_IBM1047[257] =
-{
- "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" // 00-0F
- "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x22\x1D\x35\x1F" // 10-1F
- "\x40\x5A\x7F\x7B\x5B\x6C\x50\x7D\x4D\x5D\x5C\x4E\x6B\x60\x4B\x61" // 20-2F
- "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\x7A\x5E\x4C\x7E\x6E\x6F" // 30-3F
- "\x7C\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xD1\xD2\xD3\xD4\xD5\xD6" // 40-4F
- "\xD7\xD8\xD9\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xAD\xE0\xBD\x5F\x6D" // 50-5F
- "\x79\x81\x82\x83\x84\x85\x86\x87\x88\x89\x91\x92\x93\x94\x95\x96" // 60-6F
- "\x97\x98\x99\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xC0\x4F\xD0\xA1\x07" // 70-7F
- "\x43\x20\x21\x1C\x23\xEB\x24\x9B\x71\x28\x38\x49\x90\xBA\xEC\xDF" // 80-8F
- "\x45\x29\x2A\x9D\x72\x2B\x8A\x9A\x67\x56\x64\x4A\x53\x68\x59\x46" // 90-9F
- "\xEA\xDA\x2C\xDE\x8B\x55\x41\xFE\x58\x51\x52\x48\x69\xDB\x8E\x8D" // A0-AF
- "\x73\x74\x75\xFA\x15\xB0\xB1\xB3\xB4\xB5\x6A\xB7\xB8\xB9\xCC\xBC" // B0-BF
- "\xAB\x3E\x3B\x0A\xBF\x8F\x3A\x14\xA0\x17\xCB\xCA\x1A\x1B\x9C\x04" // C0-CF
- "\x34\xEF\x1E\x06\x08\x09\x77\x70\xBE\xBB\xAC\x54\x63\x65\x66\x62" // D0-DF
- "\x30\x42\x47\x57\xEE\x33\xB6\xE1\xCD\xED\x36\x44\xCE\xCF\x31\xAA" // E0-EF
- "\xFC\x9E\xAE\x8C\xDD\xDC\x39\xFB\x80\xAF\xFD\x78\x76\xB2\x9F\xFF" // F0-FF
-};
-
-char from_IBM1047[257] =
-{
- "\x00\x01\x02\x03\xCF\x09\xD3\x7F\xD4\xD5\xC3\x0B\x0C\x0D\x0E\x0F" // 00-0F
- "\x10\x11\x12\x13\xC7\xB4\x08\xC9\x18\x19\xCC\xCD\x83\x1D\xD2\x1F" // 10-1F
- "\x81\x82\x1C\x84\x86\x0A\x17\x1B\x89\x91\x92\x95\xA2\x05\x06\x07" // 20-2F
- "\xE0\xEE\x16\xE5\xD0\x1E\xEA\x04\x8A\xF6\x20\x20\x20\x20\xC1\x1A" // 30-3F
- "\x20\xA6\xE1\x80\xEB\x90\x9F\xE2\xAB\x8B\x9B\x2E\x3C\x28\x2B\x7C" // 40-4F
- "\x26\xA9\xAA\x9C\xDB\xA5\x99\xE3\xA8\x9E\x21\x24\x2A\x29\x3B\x5E" // 50-5F
- "\x2D\x2F\xDF\xDC\x9A\xDD\xDE\x98\x9D\xAC\xBA\x2C\x25\x5F\x3E\x3F" // 60-6F
- "\xD7\x88\x94\xB0\xB1\xB2\xFC\xD6\xFB\x60\x3A\x23\x40\x27\x3D\x22" // 70-7F
- "\xF8\x61\x62\x63\x64\x65\x66\x67\x68\x69\x96\xA4\xF3\xAF\xAE\xC5" // 80-8F
- "\x8C\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x97\x87\xCE\x93\xF1\xFE" // 90-9F
- "\xC8\x7E\x73\x74\x75\x76\x77\x78\x79\x7A\xEF\xC0\xDA\x5B\xF2\xF9" // A0-AF
- "\xB5\xB6\xFD\xB7\xB8\xB9\xE6\xBB\xBC\xBD\x8D\xD9\xBF\x5D\xD8\xC4" // B0-BF
- "\x7B\x41\x42\x43\x44\x45\x46\x47\x48\x49\xCB\xCA\xBE\xE8\xEC\xED" // C0-CF
- "\x7D\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\xA1\xAD\xF5\xF4\xA3\x8F" // D0-DF
- "\x5C\xE7\x53\x54\x55\x56\x57\x58\x59\x5A\xA0\x85\x8E\xE9\xE4\xD1" // E0-EF
- "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\xB3\xF7\xF0\xFA\xA7\xFF" // F0-FF
-};
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.h b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.h
deleted file mode 100644
index 82635d2e616..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Char_IBM1047_ISO8859_Translator.h
- *
- * $Id$
- *
- * Declares the arrays required to convert between ISO8859 (aka
- * Latin/1) and IBM1047 (aka EBCDIC).
- *
- *
- * @author Jim Rogers (jrogers@viasoft.com)
- */
-//=============================================================================
-
-
-#ifndef TAO_CHAR_IBM1047_ISO8859_TRANSLATOR_H
-#define TAO_CHAR_IBM1047_ISO8859_TRANSLATOR_H
-#include /**/ "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/CDR_Stream.h"
-#include "IBM1047_ISO8859_export.h"
-
-extern IBM1047_ISO8859_Export char to_IBM1047[257];
-extern IBM1047_ISO8859_Export char from_IBM1047[257];
-
-// ****************************************************************
-
-/**
- * @class ACE_Char_IBM1047_ISO8859
- *
- * @brief Codeset translation specialization.
- *
- * This class performs the codeset translation:
- * - Native: IBM_1047 (i.e. EBCDIC)
- * - Stream: ISO-8859 (i.e. Latin/1)
- */
-class IBM1047_ISO8859_Export IBM1047_ISO8859 : public ACE_Char_Codeset_Translator
-{
-public:
- /// A do nothing constructor.
- IBM1047_ISO8859 (void);
-
- /// Virtual destruction
- virtual ~IBM1047_ISO8859 (void);
-
- // = Documented in $ACE_ROOT/ace/CDR_Stream.h
- virtual ACE_CDR::Boolean read_char (ACE_InputCDR &,
- ACE_CDR::Char &);
- virtual ACE_CDR::Boolean read_string (ACE_InputCDR &,
- ACE_CDR::Char *&);
- virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &,
- ACE_CDR::Char *,
- ACE_CDR::ULong);
- virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &,
- ACE_CDR::Char);
- virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &,
- ACE_CDR::ULong,
- const ACE_CDR::Char *);
- virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &,
- const ACE_CDR::Char *,
- ACE_CDR::ULong);
- virtual ACE_CDR::ULong ncs () {return 0x10020417;}
- virtual ACE_CDR::ULong tcs () {return 0x00010001;}
-};
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CHAR_IBM1047_ISO8859_TRANSLATOR_H */
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/CodeSets_libs_IMB1047_ISO8859.mpc b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/CodeSets_libs_IMB1047_ISO8859.mpc
deleted file mode 100644
index feaa8c5ddea..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/CodeSets_libs_IMB1047_ISO8859.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project : taolib, codeset {
- sharedname = IBM1047_ISO8859
- dynamicflags += IBM1047_ISO8859_BUILD_DLL
-}
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/IBM1047_ISO8859_export.h b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/IBM1047_ISO8859_export.h
deleted file mode 100644
index 5a31c9c23b9..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/IBM1047_ISO8859_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 IBM1047_ISO8859_EXPORT_H
-#define IBM1047_ISO8859_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (IBM1047_ISO8859_HAS_DLL)
-# define IBM1047_ISO8859_HAS_DLL 0
-# endif /* ! IBM1047_ISO8859_HAS_DLL */
-#else
-# if !defined (IBM1047_ISO8859_HAS_DLL)
-# define IBM1047_ISO8859_HAS_DLL 1
-# endif /* ! IBM1047_ISO8859_HAS_DLL */
-#endif
-
-#if defined (IBM1047_ISO8859_HAS_DLL) && (IBM1047_ISO8859_HAS_DLL == 1)
-# if defined (IBM1047_ISO8859_BUILD_DLL)
-# define IBM1047_ISO8859_Export ACE_Proper_Export_Flag
-# define IBM1047_ISO8859_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define IBM1047_ISO8859_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* IBM1047_ISO8859_BUILD_DLL */
-# define IBM1047_ISO8859_Export ACE_Proper_Import_Flag
-# define IBM1047_ISO8859_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define IBM1047_ISO8859_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* IBM1047_ISO8859_BUILD_DLL */
-#else /* IBM1047_ISO8859_HAS_DLL == 1 */
-# define IBM1047_ISO8859_Export
-# define IBM1047_ISO8859_SINGLETON_DECLARATION(T)
-# define IBM1047_ISO8859_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* IBM1047_ISO8859_HAS_DLL == 1 */
-
-#endif /* IBM1047_ISO8859_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.cpp b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.cpp
deleted file mode 100644
index c395b202966..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CodeSets/libs/IBM1047_ISO8859
-//
-// = FILENAME
-// Wchar_IBM1047_ISO8859_Factory.cpp
-//
-// = DESCRIPTION
-// A tempate instantiation of the codeset translator factory from TAO. This
-// one loads a modified version of ACE's IBM1047 (EBCDIC) to ISO8859 (ASCII)
-// translator. In this case, wchars and wstrings are translated rather than
-// strings and chars.
-//
-// = AUTHORS
-// Phil Mesnier <mesnier_p@ociweb.com>
-//
-// ============================================================================
-
-#include "Wchar_IBM1047_ISO8859_Factory.h"
-#include "ace/Log_Msg.h"
-
-ACE_STATIC_SVC_DEFINE (Wchar_IBM1047_ISO8859_Factory,
- ACE_TEXT ("Wchar_IBM1047_ISO8859_Factory"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Wchar_IBM1047_ISO8859_Factory),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-ACE_FACTORY_DEFINE (IBM1047_ISO8859, Wchar_IBM1047_ISO8859_Factory)
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.h b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.h
deleted file mode 100644
index 906b0b8d801..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Factory.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CodeSets/libs/IBM1047_ISO8859
-//
-// = FILENAME
-// Wchar_IBM1047_ISO8859_Factory.cpp
-//
-// = DESCRIPTION
-// A tempate instantiation of the codeset translator factory from TAO. This
-// one loads a modified version of ACE's IBM1047 (EBCDIC) to ISO8859 (ASCII)
-// translator. In this case, wchars and wstrings are translated rather than
-// strings and chars.
-//
-// = AUTHORS
-// Phil Mesnier <mesnier_p@ociweb.com>
-//
-// ============================================================================
-
-#ifndef WCHAR_IBM1047_ISO8859_FACTORY_H
-#define WCHAR_IBM1047_ISO8859_FACTORY_H
-
-#include /**/ "ace/pre.h"
-#include "ace/Service_Config.h"
-#include "tao/Codeset_Translator_Factory.h"
-
-#include "IBM1047_ISO8859_export.h"
-#include "Wchar_IBM1047_ISO8859_Translator.h"
-
-typedef TAO_Codeset_Translator_Factory_T<WIBM1047_ISO8859> Wchar_IBM1047_ISO8859_Factory;
-
-ACE_STATIC_SVC_DECLARE_EXPORT (IBM1047_ISO8859, Wchar_IBM1047_ISO8859_Factory)
-ACE_FACTORY_DECLARE (IBM1047_ISO8859, Wchar_IBM1047_ISO8859_Factory)
-
-#include /**/ "ace/post.h"
-#endif /* WCHAR_IBM1047_ISO8859_FACTORY_H */
-
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.cpp b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.cpp
deleted file mode 100644
index 7958ddbfa58..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Wchar_IBM1047_ISO8859_Translator.cpp
-//
-// = DESCRIPTION
-// Defines the arrays required to convert between ISO8859 (aka
-// Latin/1) and IBM1047 (aka EBCDIC).
-//
-// = AUTHOR
-// Mahesh Vedantam (mahesh@ociweb.com)
-//
-// ============================================================================
-
-#include "Wchar_IBM1047_ISO8859_Translator.h"
-
-ACE_RCSID(IBM1047_ISO8859, Wchar_IBM1047_ISO8859_Translator, "$Id$")
-
-// ****************************************************************
-
-WIBM1047_ISO8859::WIBM1047_ISO8859 (void)
-{
-
-}
-
-WIBM1047_ISO8859::~WIBM1047_ISO8859 (void)
-{
-
-}
-
-// = Documented in $ACE_ROOT/ace/CDR_Stream.h
-ACE_CDR::Boolean WIBM1047_ISO8859::read_wchar (ACE_InputCDR &,
- ACE_CDR::WChar &)
-{
- return 0;
-}
-
-ACE_CDR::Boolean WIBM1047_ISO8859::read_wstring (ACE_InputCDR &,
- ACE_CDR::WChar *&)
-{
- return 0;
-}
-
-ACE_CDR::Boolean WIBM1047_ISO8859::read_wchar_array (ACE_InputCDR &,
- ACE_CDR::WChar *,
- ACE_CDR::ULong)
-{
- return 0;
-}
-
-ACE_CDR::Boolean WIBM1047_ISO8859::write_wchar (ACE_OutputCDR &,
- ACE_CDR::WChar)
-{
- return 0;
-}
-ACE_CDR::Boolean WIBM1047_ISO8859::write_wstring (ACE_OutputCDR &,
- ACE_CDR::ULong,
- const ACE_CDR::WChar *)
-{
- return 0;
-}
-ACE_CDR::Boolean WIBM1047_ISO8859::write_wchar_array (ACE_OutputCDR &,
- const ACE_CDR::WChar *,
- ACE_CDR::ULong)
-{
- return 0;
-}
-
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.h b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.h
deleted file mode 100644
index 49184d3cdb0..00000000000
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Wchar_IBM1047_ISO8859_Translator.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Wchar_IBM1047_ISO8859_Translator.h
- *
- * $Id$
- *
- * Declares the arrays required to convert between IBM1047 (aka EBCDIC) and ISO8859 (aka
- * Latin/1).
- *
- *
- * @author Jim Rogers (jrogers@viasoft.com)
- */
-//=============================================================================
-
-#ifndef WCHAR_IBM1047_ISO8859_TRANSLATOR_H
-#define WCHAR_IBM1047_ISO8859_TRANSLATOR_H
-#include /**/ "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/CDR_Stream.h"
-#include "IBM1047_ISO8859_export.h"
-
-extern IBM1047_ISO8859_Export ACE_CDR::WChar Wchar_to_IBM1047[257];
-extern IBM1047_ISO8859_Export ACE_CDR::WChar Wchar_from_IBM1047[257];
-
-// ****************************************************************
-
-/**
- * @class ACE_Char_IBM1047_ISO8859
- *
- * @brief Codeset translation specialization.
- *
- * This class performs the codeset translation:
- * - Native: IBM_1047 (i.e. EBCDIC)
- * - Stream: ISO-8859 (i.e. Latin/1)
- */
-class IBM1047_ISO8859_Export WIBM1047_ISO8859 : public ACE_WChar_Codeset_Translator
-{
-public:
- /// A do nothing constructor.
- WIBM1047_ISO8859 (void);
-
- /// Virtual destruction
- virtual ~WIBM1047_ISO8859 (void);
-
- // = Documented in $ACE_ROOT/ace/CDR_Stream.h
- virtual ACE_CDR::Boolean read_wchar (ACE_InputCDR &,
- ACE_CDR::WChar &);
- virtual ACE_CDR::Boolean read_wstring (ACE_InputCDR &,
- ACE_CDR::WChar *&);
- virtual ACE_CDR::Boolean read_wchar_array (ACE_InputCDR &,
- ACE_CDR::WChar *,
- ACE_CDR::ULong);
- virtual ACE_CDR::Boolean write_wchar (ACE_OutputCDR &,
- ACE_CDR::WChar);
- virtual ACE_CDR::Boolean write_wstring (ACE_OutputCDR &,
- ACE_CDR::ULong,
- const ACE_CDR::WChar *);
- virtual ACE_CDR::Boolean write_wchar_array (ACE_OutputCDR &,
- const ACE_CDR::WChar *,
- ACE_CDR::ULong);
- virtual ACE_CDR::ULong ncs () {return 0x10020417;}
- virtual ACE_CDR::ULong tcs () {return 0x00010001;}
-};
-
-#include /**/ "ace/post.h"
-#endif /* WCHAR_IBM1047_ISO8859_TRANSLATOR */
-
diff --git a/TAO/tests/CodeSets/libs/UCS4_UTF16/CodeSets_libs_UCS4_UTF16.mpc b/TAO/tests/CodeSets/libs/UCS4_UTF16/CodeSets_libs_UCS4_UTF16.mpc
deleted file mode 100644
index c3b0ca24fc1..00000000000
--- a/TAO/tests/CodeSets/libs/UCS4_UTF16/CodeSets_libs_UCS4_UTF16.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*) : taolib, codeset {
- sharedname = UCS4_UTF16
- dynamicflags += UCS4_UTF16_BUILD_DLL
-}
diff --git a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp b/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp
deleted file mode 100644
index eb608bd497c..00000000000
--- a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp
+++ /dev/null
@@ -1,599 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// WUCS4_UTF16.cpp
-//
-// = DESCRIPTION
-// Defines the arrays required to convert between UCS-4 a 4 byte wide char
-// codeset, and UCS-16, aka unicode, a 2-byte codeset.
-//
-// = AUTHOR
-// Phil Mesnier <mesnier_p@ociweb.com>
-//
-// ============================================================================
-
-#include "WUCS4_UTF16.h"
-#include "ace/OS.h"
-
-ACE_RCSID(UCS4_UTF16, WUCS4_UTF16, "$Id$")
-
-// ****************************************************************
-
-
-// @@ TODO: Find a better home for these definition
-// Note: unlike the UNICODE standard we define these as
-// half-closed ranges i.e.
-// *BEGIN is the first value in the range
-// *END is the first value beyond the range (END is not included
-// in the range)
-// Note the use of unsigned short for UTF-16 codepoints. wchar_t may
-// by four bytes
-typedef ACE_CDR::UShort ACE_UTF16_T;
-static const size_t ACE_UTF16_CODEPOINT_SIZE = sizeof(ACE_UTF16_T);
-
-// surrogate high 1101.10HH.HHHH.HHHH
-// surrogate low 1101.11LL.LLLL.LLLL
-// 4 byte result: 0000.0000.0000.HHHH.HHHH.HHLL.LLLL.LLLL
-// add offset 0000.0000.0000.0000.0001.0000.0000.0000
-
-// range of surrogate values for high-order bits
-static const unsigned short ACE_UTF16_SURROGATE_HIGH_BEGIN = 0xD800U;
-static const unsigned short ACE_UTF16_SURROGATE_HIGH_END = 0xDC00U;
-
-static const unsigned short ACE_UTF16_SURROGATE_LOW_BEGIN = 0xDC00U;
-static const unsigned short ACE_UTF16_SURROGATE_LOW_END = 0xE000U;
-
-// offset to UTF16 values encoded with surrogates start at 2^16
-static const unsigned long ACE_UTF16_SURROGATE_OFFSET = 0x000010000UL;
-
-// shift high order bits from surrogate into correct postion
-static const int ACE_UTF16_SURROGATE_HIGH_SHIFT = 10;
-static const unsigned short ACE_UTF16_SURROGATE_LOW_MASK = 0x3FF;
-
-// largest value that can be represented in UTF16 without using surrogates + 1
-static const unsigned long ACE_UTF16_RAW_END = 0x00010000LU;
-
-// largest value that can be represented in UTF16 + 1
-static const unsigned long ACE_UTF16_END = 0x00110000LU;
-
-// largest value that can be represented in UTF-32 + 1
-static const unsigned long ACE_UTF32_END = 0x80000000LU;
-
-static const unsigned short ACE_UNICODE_SUBSTITUTE_CHARACTER = 0xFFFDU;
-static const unsigned short ACE_UNICODE_BOM_CORRECT = 0xFEFFU;
-static const unsigned short ACE_UNICODE_BOM_SWAPPED = 0xFFFEU;
-
-/////////////////////////////////////////////////////
-// Static inline routines to simplify conversion code
-// @@ should be in anonymous namespace when ACE allows it
-// or better yet, there should be a UTF-16 support thingie(technical term)
-// that provides these methods.
-// Performance: depends on compiler inlining + optimization for performance
-
-/// load next two bytes from buffer into a short. Byte swapping as necessary
-static
-//ACE_INLINE
-ACE_UTF16_T
-load_raw_wchar (const char * buffer, size_t & pos, int do_byte_swap)
-{
- // need a two byte object to load the UTF16 2 byte codepoint
- ACE_UTF16_T utf16_char = * reinterpret_cast<ACE_UTF16_T const *> (&buffer[pos*ACE_UTF16_CODEPOINT_SIZE]);
-#if ! defined (ACE_DISABLE_SWAP_ON_READ)
- if (do_byte_swap)
- {
- ACE_CDR::swap_2 (
- &buffer[pos*ACE_UTF16_CODEPOINT_SIZE],
- reinterpret_cast<char *> (&utf16_char));
- }
-#endif
- pos ++;
- return utf16_char;
-}
-
-/// convert UTF-16 surrogate pair to wchar_t
-static
-//ACE_INLINE
-ACE_CDR::WChar
-convert_surrogate_pair (ACE_UTF16_T high, ACE_UTF16_T low)
-{
- return static_cast<ACE_CDR::WChar> (((high - ACE_UTF16_SURROGATE_HIGH_BEGIN) << ACE_UTF16_SURROGATE_HIGH_SHIFT)
- + (low - ACE_UTF16_SURROGATE_LOW_BEGIN)
- + ACE_UTF16_SURROGATE_OFFSET
- );
-}
-
-/// load wchar from utf16 buffer
-/// converts surrogate pairs
-/// substitutes SUBSTITUTE_CHAR for bad encoding
-static
-//ACE_INLINE
-ACE_CDR::WChar
-load_wchar (const char * buffer, size_t & pos, size_t length, int do_byte_swap)
-{
- ACE_CDR::WChar rc = ACE_UNICODE_SUBSTITUTE_CHARACTER;
- if (pos < length)
- {
- rc = static_cast<ACE_CDR::WChar> (load_raw_wchar (buffer, pos, do_byte_swap));
- // Is this a UTF16 surrogate?
- // note assumpton that SURROGATE_HIGH_END == SURROGATE_LOW_BEGIN
- if (rc >= ACE_UTF16_SURROGATE_HIGH_BEGIN && rc < ACE_UTF16_SURROGATE_LOW_END)
- {
- // if we still have two bytes available
- if (pos < length)
- {
- // expecting high surrogate
- if (rc < ACE_UTF16_SURROGATE_HIGH_END)
- {
- ACE_UTF16_T low = load_raw_wchar (buffer, pos, do_byte_swap);
- if (low >= ACE_UTF16_SURROGATE_LOW_BEGIN
- && low < ACE_UTF16_SURROGATE_LOW_END)
- {
- rc = convert_surrogate_pair (
- static_cast<ACE_UTF16_T> (rc), low);
- }
- else
- {
- rc = ACE_UNICODE_SUBSTITUTE_CHARACTER;
- }
- }
- else
- {
- rc = ACE_UNICODE_SUBSTITUTE_CHARACTER;
- }
- }
- else
- {
- rc = ACE_UNICODE_SUBSTITUTE_CHARACTER;
- }
- }
- }
- return rc;
-}
-
-static
-//ACE_INLINE
-size_t encode_utf16 (ACE_UTF16_T * buffer, ACE_CDR::WChar value)
-{
- buffer[0] = static_cast<ACE_UTF16_T> (value);
- size_t length = 1;
-
- // On platforms where sizeof(ACE_CDR::WChar) == 2, the test using
- // ul_value will always be false, since we are improperly using
- // a 4-byte native wchar codeset. But since this is for a simple
- // test that has to run on machines with 4 byte wchars, this cast
- // avoids compile time issues of comparing a value that starts out
- // as a short with a constant that is too big for a short.
- unsigned long ul_value = static_cast<unsigned long>(value);
- if (value >= ACE_UTF16_SURROGATE_HIGH_BEGIN)
- {
- if (value < ACE_UTF16_SURROGATE_LOW_END)
- {
- buffer[0] = ACE_UNICODE_SUBSTITUTE_CHARACTER;
- }
- else if (ul_value >= ACE_UTF16_RAW_END)
- {
- if (ul_value >= ACE_UTF16_END)
- {
- buffer[0] = ACE_UNICODE_SUBSTITUTE_CHARACTER;
- }
- else
- {
- ACE_CDR::WChar offset = static_cast<ACE_CDR::WChar> (value - ACE_UTF16_SURROGATE_OFFSET);
- buffer[0] = (offset >> ACE_UTF16_SURROGATE_HIGH_SHIFT)
- + ACE_UTF16_SURROGATE_HIGH_BEGIN;
- buffer[1] = (offset & ACE_UTF16_SURROGATE_LOW_MASK)
- + ACE_UTF16_SURROGATE_LOW_BEGIN;
- length = 2;
- }
- }
- }
- return length;
-}
-
-/// count number of characters in native WString that will be converted
-/// to UTF-16 surrogate pairs
-static
-size_t count_potential_surrogates (
- const ACE_CDR::WChar *buffer,
- ACE_CDR::ULong len)
-{
- size_t count = 0;
- for (size_t i = 0; i < len; ++i)
- {
- // see comments above in encode_utf16().
- unsigned long ul_value = static_cast<unsigned long>(buffer[i]);
- if (ul_value >= ACE_UTF16_RAW_END &&
- ul_value < ACE_UTF16_END)
- {
- count += 1;
- }
- }
- return count;
-}
-
-
-/////////////////////////////
-// WUCS4_UTF16 implementation
-
-WUCS4_UTF16::WUCS4_UTF16 (void)
-{
-
-}
-
-WUCS4_UTF16::~WUCS4_UTF16 (void)
-{
-
-}
-
-// = Documented in $ACE_ROOT/ace/CDR_Stream.h
-ACE_CDR::Boolean
-WUCS4_UTF16::read_wchar (ACE_InputCDR &cdr, ACE_CDR::WChar &x)
-{
- if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1
- && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1)
- {
- ACE_CDR::Octet len;
- if (! this->read_1 (cdr, &len))
- {
- return 0;
- }
-
- int old_bo = cdr.byte_order();
-
- ACE_UTF16_T sx = 0;
- if (! this->read_2 (cdr,&sx))
- {
- return 0;
- }
-
- // Check for byte order mark, if found, consume and honor it.
- if (sx == ACE_UNICODE_BOM_CORRECT || sx == ACE_UNICODE_BOM_SWAPPED)
- {
- // if we found it, but it came in in the wrong order
- // invert the byte order flag for the duration of this method
- if (sx == ACE_UNICODE_BOM_SWAPPED)
- {
- cdr.reset_byte_order (! old_bo);
- }
- this->read_2 (cdr,&sx);
- }
-
- // check for UTF-16 surrogate pair, and if found interpret it
- if (sx >= ACE_UTF16_SURROGATE_HIGH_BEGIN
- && sx < ACE_UTF16_SURROGATE_LOW_END)
- {
- if (sx >= ACE_UTF16_SURROGATE_HIGH_END)
- {
- cdr.reset_byte_order (old_bo);
- return 0;
- }
-
- ACE_UTF16_T low;
- if (! this->read_2 (cdr, &low))
- {
- cdr.reset_byte_order (old_bo);
- return 0;;
- }
- if (low < ACE_UTF16_SURROGATE_LOW_BEGIN
- || low >= ACE_UTF16_SURROGATE_LOW_END)
- {
- cdr.reset_byte_order (old_bo);
- return 0;
- }
- x = convert_surrogate_pair (sx, low);
- }
- else
- {
- x = static_cast<ACE_CDR::WChar> (sx);
- }
-
- cdr.reset_byte_order (old_bo);
- }
- else
- {
- ACE_UTF16_T sx = 0;
- if (!this->read_2 (cdr, &sx))
- {
- return 0;
- }
- x = static_cast<ACE_CDR::WChar> (sx);
- }
- return 1;
-}
-
-ACE_CDR::Boolean
-WUCS4_UTF16::read_wstring (ACE_InputCDR &cdr,
- ACE_CDR::WChar *&x)
-{
- ACE_CDR::ULong len;
- if (!this->read_4 (cdr, &len))
- return 0;
-
- // A check for the length being too great is done later in the
- // call to read_char_array but we want to have it done before
- // the memory is allocated.
- if (len > 0 && len <= cdr.length())
- {
- if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1
- && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1)
- {
- len /= ACE_UTF16_CODEPOINT_SIZE;
-
- //allocating one extra for the null character needed by applications
- ACE_NEW_RETURN (x,
- ACE_CDR::WChar [len + 1],
- 0);
- x[len] = L'\x00';
- if (this->read_wchar_array_i (cdr, x, len,1))
- {
- // Since reading the array may have adjusted the length,
- // we simply rewrite the null terminator
- x[len] = L'\x00';
- return 1;
- }
- }
- else
- {
- ACE_NEW_RETURN (x,
- ACE_CDR::WChar [len],
- 0);
- if (this->read_wchar_array (cdr, x, len))
- return 1;
- }
- delete [] x;
- }
- else if (len == 0)
- {
- // Convert any null strings to empty strings since empty
- // strings can cause crashes. (See bug 58.)
- ACE_NEW_RETURN (x,
- ACE_CDR::WChar[1],
- 0);
- x[0] = '\x00';
- return 1;
- }
- x = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-WUCS4_UTF16::read_wchar_array_i (ACE_InputCDR & cdr,
- ACE_CDR::WChar *x,
- ACE_CDR::ULong &length,
- int adjust_len)
-{
- if (length == 0)
- return 1;
- char* buf;
- size_t align = ACE_CDR::SHORT_ALIGN;
- if (cdr.adjust (ACE_UTF16_CODEPOINT_SIZE * length, align, buf) == 0)
- {
- int byte_swap = cdr.do_byte_swap();
- size_t pos = 0;
-
- // check for byte order mark. If found, honor it then discard it
- ACE_UTF16_T bom = load_raw_wchar (buf, pos, byte_swap);
- if (bom == ACE_UNICODE_BOM_CORRECT || bom == ACE_UNICODE_BOM_SWAPPED)
- {
- if (bom == ACE_UNICODE_BOM_SWAPPED)
- {
- byte_swap = !byte_swap;
- }
- buf += ACE_UTF16_CODEPOINT_SIZE;
- if (adjust_len)
- length -= 1;
- }
- size_t bpos = 0;
- for (size_t xpos = 0; xpos < length; ++xpos)
- {
- x[xpos] = load_wchar (buf, bpos, length, byte_swap);
- }
-
- return 1;
- }
- return 0;
-
-}
-
-
-ACE_CDR::Boolean
-WUCS4_UTF16::read_wchar_array (ACE_InputCDR & cdr,
- ACE_CDR::WChar *x,
- ACE_CDR::ULong length)
-{
- if (length == 0)
- return 1;
-
- if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1
- && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1)
- {
- for (size_t i = 0; i < length; i++)
- if (!this->read_wchar(cdr,x[i]))
- return 0;
- return 1;
- }
- else
- return this->read_wchar_array_i(cdr,x,length);
-}
-
-ACE_CDR::Boolean
-WUCS4_UTF16::write_wchar (ACE_OutputCDR &cdr,
- ACE_CDR::WChar x)
-{
- int encode_len = 1;
- if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 0)
- { // wchar is not allowed with GIOP 1.0
- errno = EINVAL;
- return 0;
- }
- else if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 1)
- encode_len = 0;
-
- return write_wchar_i(cdr,x,1,encode_len);
-}
-
-ACE_CDR::Boolean
-WUCS4_UTF16::write_wchar_i (ACE_OutputCDR &cdr,
- ACE_CDR::WChar x,
- int use_BOM,
- int encode_len)
-{
- // If the desired char cannot be translated into a single unicode char,
- // we must raise a marshal exception.
- //
- // see the comment in encode_utf16() regarding the cast.
- unsigned long ul_x = static_cast<unsigned long>(x);
- if (ul_x >= ACE_UTF16_RAW_END &&
- ul_x < ACE_UTF16_END)
- return 0;
-
- int len = 0;
- ACE_CDR::UShort buffer[2];
- if (use_BOM)
- {
- len = 2;
- buffer[0] = ACE_UNICODE_BOM_CORRECT;
- buffer[1] = static_cast<ACE_CDR::Short> (x);
- }
- else
- {
- len = 1;
- if (cdr.byte_order())
- ACE_CDR::swap_2 (reinterpret_cast<const char *> (&x),
- reinterpret_cast<char *> (buffer));
- else
- buffer[0] = static_cast<ACE_CDR::Short> (x);
- }
-
- if (encode_len)
- {
- unsigned char tcsize = static_cast<unsigned char> (len * ACE_UTF16_CODEPOINT_SIZE);
- if (this->write_1 (cdr, &tcsize))
- return this->write_array(cdr, &buffer, tcsize, 1, 1);
- else
- return 0;
- }
- if (this->write_2 (cdr, buffer) == 0)
- return 0;
- if (len == 2)
- return this->write_2 (cdr,buffer+1);
- return 1;
-}
-
-ACE_CDR::Boolean
-WUCS4_UTF16::write_wstring (ACE_OutputCDR & cdr,
- ACE_CDR::ULong len,
- const ACE_CDR::WChar *x)
-{
- if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1
- && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1)
- {
- // count characters that will require surrogates to
- // determine transmission length
- len++; // make room for BOM
- ACE_UTF16_T bom = ACE_UNICODE_BOM_CORRECT;
- ACE_CDR::ULong length = len + count_potential_surrogates (x, len);
- ACE_CDR::ULong l = length * ACE_UTF16_CODEPOINT_SIZE;
- if (this->write_4 (cdr, &l) && x != 0)
- {
- this->write_2 (cdr,&bom);
- return this->write_measured_wchar_array (cdr, x, len, length);
- }
- }
- else
- {
- ACE_CDR::ULong l = len + 1;
- if (this->write_4 (cdr, &l))
- if (x != 0)
- return this->write_wchar_array (cdr, x, len + 1);
- else
- {
- ACE_UTF16_T s = 0;
- return this->write_2 (cdr,&s);
- }
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-WUCS4_UTF16::write_wchar_array (ACE_OutputCDR & cdr,
- const ACE_CDR::WChar *x,
- ACE_CDR::ULong length)
-{
-#if 0
- // I do not believe this is correct, because this could yield an array
- // with an incorrect number of elements for the space allotted.
- return this->write_measured_wchar_array (
- cdr,
- x,
- length,
- length + count_potential_surrogates (x, length));
-#endif
-
- int encode_len = 1;
- if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 0)
- { // wchar is not allowed with GIOP 1.0
- errno = EINVAL;
- return 0;
- }
- else if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 1)
- encode_len = 0;
-
- for (size_t i = 0; i < length; i++)
- if (this->write_wchar_i (cdr,x[i],0,encode_len) == 0)
- return 0;
- return 1;
-}
-
-ACE_CDR::Boolean
-WUCS4_UTF16::write_measured_wchar_array (ACE_OutputCDR & cdr,
- const ACE_CDR::WChar *x,
- ACE_CDR::ULong length,
- ACE_CDR::ULong transmission_length)
-{
- if (length == 0)
- return 1;
- char* buf;
- size_t align = ACE_CDR::SHORT_ALIGN;
- if (cdr.adjust (ACE_UTF16_CODEPOINT_SIZE * transmission_length, align, buf)
- != 0)
- {
- return 0;
- }
-
- ACE_UTF16_T *sb = reinterpret_cast<ACE_UTF16_T *> (buf);
- size_t sbpos = 0;
-
- for (size_t i = 0; i < length; i++)
- {
- sbpos += encode_utf16 (& sb[sbpos], x[i]);
- }
-#if defined (ACE_ENABLE_SWAP_ON_WRITE)
- // NOTE this will rarely be enabled. See the comments in ace/OS.h
- if (cdr.do_byte_swap())
- {
- // note can't use swap_2_array because in-place swaps are not safe :-<
- // and we don't want to allocate a new array
- for (size_t i = 0; i < sbpos; i++)
- {
- char * pchar = static_cast<char *> (&sb[i]);
- // ACE_CDR::swap_2 (pchar, pchar);
- // can't use swap_2 because inplace swaps are not safe
- // and work-arounds like copying to another buffer lose
- // any performance improvement from
- // that fancy asm code, so we might as well just:
- char temp = pchar[0];
- pchar[0] = pchar[1];
- pchar[1] = temp;
- //@@TODO write swap_2(char * inplace_buffer);
- }
- }
-#endif /* ACE_ENABLE_SWAP_ON_WRITE */
- return 1;
-}
diff --git a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.h b/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.h
deleted file mode 100644
index 804c4a53534..00000000000
--- a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file WUCS4_UTF16.h
- *
- * $Id$
- *
- *
- *
- * @author Phil Mesnier <mesnier_p@ociweb.com>
- */
-//=============================================================================
-
-#ifndef WUCS4_UTF16_H
-#define WUCS4_UTF16_H
-#include /**/ "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/CDR_Stream.h"
-#include "WUCS4_UTF16_export.h"
-
-// ****************************************************************
-
-/**
- * @class ACE_Char_UCS4_UTF16
- *
- * @brief Codeset translation specialization.
- *
- * This class performs the codeset translation:
- * - Native: IBM_1047 (i.e. EBCDIC)
- * - Stream: ISO-8859 (i.e. Latin/1)
- */
-class UCS4_UTF16_Export WUCS4_UTF16 : public ACE_WChar_Codeset_Translator
-{
-public:
- /// A do nothing constructor.
- WUCS4_UTF16 (void);
-
- /// Virtual destruction
- virtual ~WUCS4_UTF16 (void);
-
- // = Documented in $ACE_ROOT/ace/CDR_Stream.h
- virtual ACE_CDR::Boolean read_wchar (ACE_InputCDR &,
- ACE_CDR::WChar &);
- virtual ACE_CDR::Boolean read_wstring (ACE_InputCDR &,
- ACE_CDR::WChar *&);
- virtual ACE_CDR::Boolean read_wchar_array (ACE_InputCDR &,
- ACE_CDR::WChar *,
- ACE_CDR::ULong);
- virtual ACE_CDR::Boolean write_wchar (ACE_OutputCDR &,
- ACE_CDR::WChar);
- virtual ACE_CDR::Boolean write_wstring (ACE_OutputCDR &,
- ACE_CDR::ULong,
- const ACE_CDR::WChar *);
- virtual ACE_CDR::Boolean write_wchar_array (ACE_OutputCDR &,
- const ACE_CDR::WChar *,
- ACE_CDR::ULong);
- virtual ACE_CDR::ULong ncs () {return 0x00010104;}
- virtual ACE_CDR::ULong tcs () {return 0x00010109;}
-
-private:
- ACE_CDR::Boolean read_wchar_array_i (ACE_InputCDR &,
- ACE_CDR::WChar *,
- ACE_CDR::ULong&,
- int adjust_len = 0);
-
- ACE_CDR::Boolean write_wchar_i (ACE_OutputCDR &,
- ACE_CDR::WChar ,
- int use_BOM,
- int encode_len);
-
- /**
- Due to surrogate pair substution the transmitted length of a wstring can
- differ from the logical strength length. This version of write_wchar_array
- accepts both lengths and uses them as necessary.
- */
- ACE_CDR::Boolean write_measured_wchar_array (
- ACE_OutputCDR & cdr,
- const ACE_CDR::WChar *x,
- ACE_CDR::ULong length,
- ACE_CDR::ULong transmission_length);
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* WCHAR_UCS4_UTF16_TRANSLATOR */
diff --git a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.cpp b/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.cpp
deleted file mode 100644
index 17c3de41513..00000000000
--- a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- C++ -*-
-
-#include "WUCS4_UTF16_Factory.h"
-
-ACE_RCSID(UCS4_UTF16, WUCS4_UTF16_Factory, "$Id$")
-
-ACE_STATIC_SVC_DEFINE (WUCS4_UTF16_Factory,
- ACE_TEXT ("WUCS4_UTF16_Factory"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (WUCS4_UTF16_Factory),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-ACE_FACTORY_DEFINE (UCS4_UTF16, WUCS4_UTF16_Factory)
diff --git a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.h b/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.h
deleted file mode 100644
index 058aa1e0482..00000000000
--- a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_Factory.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- C++ -*-
-//=============================================================================
-/**
- * @file WUCS4_UTF16_Factory.h
- *
- * $Id$
- *
- *
- *
- * @author Phil Mesnier <mesnier_p@ociweb.com>
- */
-//=============================================================================
-
-#ifndef WUCS4_UTF16_FACTORY_H
-#define WUCS4_UTF16_FACTORY_H
-
-#include /**/ "ace/pre.h"
-#include "ace/Service_Config.h"
-#include "tao/Codeset_Translator_Factory.h"
-
-#include "WUCS4_UTF16_export.h"
-#include "WUCS4_UTF16.h"
-
-typedef TAO_Codeset_Translator_Factory_T<WUCS4_UTF16> WUCS4_UTF16_Factory;
-
-ACE_STATIC_SVC_DECLARE_EXPORT (UCS4_UTF16, WUCS4_UTF16_Factory)
-ACE_FACTORY_DECLARE (UCS4_UTF16, WUCS4_UTF16_Factory)
-
-#include /**/ "ace/post.h"
-#endif /* WUCS4_UTF16_FACTORY_H */
diff --git a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_export.h b/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_export.h
deleted file mode 100644
index d668942ef44..00000000000
--- a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16_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 UCS4_UTF16_EXPORT_H
-#define UCS4_UTF16_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (UCS4_UTF16_HAS_DLL)
-# define UCS4_UTF16_HAS_DLL 0
-# endif /* ! UCS4_UTF16_HAS_DLL */
-#else
-# if !defined (UCS4_UTF16_HAS_DLL)
-# define UCS4_UTF16_HAS_DLL 1
-# endif /* ! UCS4_UTF16_HAS_DLL */
-#endif
-
-#if defined (UCS4_UTF16_HAS_DLL) && (UCS4_UTF16_HAS_DLL == 1)
-# if defined (UCS4_UTF16_BUILD_DLL)
-# define UCS4_UTF16_Export ACE_Proper_Export_Flag
-# define UCS4_UTF16_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define UCS4_UTF16_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* UCS4_UTF16_BUILD_DLL */
-# define UCS4_UTF16_Export ACE_Proper_Import_Flag
-# define UCS4_UTF16_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define UCS4_UTF16_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* UCS4_UTF16_BUILD_DLL */
-#else /* UCS4_UTF16_HAS_DLL == 1 */
-# define UCS4_UTF16_Export
-# define UCS4_UTF16_SINGLETON_DECLARATION(T)
-# define UCS4_UTF16_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* UCS4_UTF16_HAS_DLL == 1 */
-
-#endif /* UCS4_UTF16_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/CodeSets/simple/.cvsignore b/TAO/tests/CodeSets/simple/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/CodeSets/simple/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/CodeSets/simple/CodeSets_simple.mpc b/TAO/tests/CodeSets/simple/CodeSets_simple.mpc
deleted file mode 100644
index a0a9ca666ce..00000000000
--- a/TAO/tests/CodeSets/simple/CodeSets_simple.mpc
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*client) : taoclient, anytypecode {
- after += *server
- IDL_Files {
- simple.idl
- }
-
- Source_Files {
- client.cpp
- simpleC.cpp
- }
-
- Header_Files {
- simpleC.h
- }
-
-
-}
-
-project(*server) : taoserver {
- IDL_Files {
- simple.idl
- }
-
- source_files {
- server.cpp
- simpleC.cpp
- simpleS.cpp
- }
-
- Header_Files {
- simpleC.h
- simpleS.h
- }
-
-}
diff --git a/TAO/tests/CodeSets/simple/README b/TAO/tests/CodeSets/simple/README
deleted file mode 100644
index eb0711a0918..00000000000
--- a/TAO/tests/CodeSets/simple/README
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id$
-
-Simple codeset translation test.
-
-As delivered, this test works with the IBM1047 - ISO8859 translator which is
-built as part of the library delivered with this test.
-
-After building the client and server, run one or the other with the supplied
-configuration file. Be sure to supply the configuration file to only one side
-or the other, not both. If you do both, no translation will happen.
-
-If the translators and the framework are working properly you will see the
-client report some text before and after a call. The before and after should be
-identical. The server side should look like garbage.
-
-In the test call, a string is passed as an IN argument and a copy returned as
-the return value of the call. Also, a different string is inserted into an Any,
-which is passed as an IN argument. An Any is returned as an OUT
-argument which contains a copy of the IN string. The purpose of this second
-set of string args is to test how codeset translators work with Anys, which
-happens when the latter are passed as operation arguments.
-
-The translation will occur on the side that takes the configuration file. If
-you run either side with -ORBDebuglevel 10, you will see that when the client
-is doing the translation the data in the message content dump is garbled and
-when the server is translating the message content dump is clear.
-
-To run with the client doing translation:
- ./Server &
- ./Client -orbsvcconf cs_test.conf
-
-To run with the server doing translation:
- ./Server -orbsvcconf cs_test.conf
- ./Client
-
-Replace cs_test.conf with wcs_test.conf to also use the UCS-4 to UTF-16
-translator for wchar values.
-
-The server dumps its IOR to a file: server.ior. Use catior -f server.ior
-(from $TAO_ROOT/utils/catior) to see how the context information is added
-to the profiles.
diff --git a/TAO/tests/CodeSets/simple/client.cpp b/TAO/tests/CodeSets/simple/client.cpp
deleted file mode 100644
index edf6a3ab091..00000000000
--- a/TAO/tests/CodeSets/simple/client.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CodeSets/simple
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// A simple client to demonstrate the use of codeset translation
-//
-// = AUTHORS
-// Phil Mesnier <mesnier_p@ociweb.com>
-//
-// ============================================================================
-// IDL generated headers
-#include "simpleC.h"
-#include "ace/ace_wchar.h"
-
-// FUZZ: disable check_for_streams_include
-#include "ace/streams.h"
-
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-
-wchar_t *
-make_wstring (const char *str)
-{
- // Short circuit null pointer case
- if (str == 0)
- return 0;
-
- size_t len = strlen (str) + 1;
- wchar_t *wstr = new wchar_t[len];
- ACE_DEBUG ((LM_DEBUG,
- "make_wstring: str = %s\n",str));
- for (size_t i = 0; i < len; i++)
- {
- char *t = const_cast<char *> (str);
- wstr[i] = static_cast<wchar_t> (*(t + i));
- ACE_DEBUG ((LM_DEBUG,
- "wstr[%d] = %d\n", i, (short)wstr[i]));
- }
- return wstr;
-}
-
-// ------------------------------------------------------------
-// Client
-// ------------------------------------------------------------
-int main (int argc, char *argv[])
-{
- char buf[1000];
- int error_count = 0;
-
- ACE_TRY_NEW_ENV
- {
- // Init the orb
- CORBA::ORB_var orb= CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get IOR from command line (or file)
- if (argc != 2)
- {
- ACE_OS::strcpy (buf, "file://server.ior");
- }
- else
- {
- ACE_OS::strcpy (buf, argv[1]);
- }
-
- // The first arg should be the IOR
- CORBA::Object_var object =
- orb->string_to_object (buf
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the server
- simple_var server = simple::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *bare_string = "Hello World";
-
- const char *any_string = "Any World";
- CORBA::Any inarg;
- inarg <<= any_string;
- CORBA::Any_var outarg;
-
- // Invoke the call.
- CORBA::String_var reply =
- server->op1 (bare_string,
- inarg,
- outarg.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *any_reply;
- outarg >>= any_reply;
-
- ACE_DEBUG ((LM_DEBUG,
- "Client sent %s, got %s\n", bare_string, reply.in () ));
-
- if (ACE_OS::strcmp (bare_string, reply.in ()) != 0)
- {
- ++error_count;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Client sent %s, got %s\n", any_string, any_reply ));
-
- if (ACE_OS::strcmp (any_string, any_reply) != 0)
- {
- ++error_count;
- }
-#if defined (ACE_HAS_WCHAR)
- wchar_t *wide_string = ACE_OS::strdup(ACE_TEXT_ALWAYS_WCHAR ("Wide String"));
- wchar_t *wide_reply = server->op2 (wide_string);
- ACE_DEBUG ((LM_DEBUG,
- "sent %W, got %W\n", wide_string, wide_reply));
-
- ACE_OS::free (wide_string);
- CORBA::wstring_free (wide_reply);
-#endif /* ACE_HAS_WCHAR */
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return error_count;
-}
diff --git a/TAO/tests/CodeSets/simple/cs_test.conf b/TAO/tests/CodeSets/simple/cs_test.conf
deleted file mode 100644
index 23ef7b518ca..00000000000
--- a/TAO/tests/CodeSets/simple/cs_test.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-#First, load the appropriate codeset translator factories
-dynamic Char_IBM1047_ISO8859_Factory Service_Object * IBM1047_ISO8859:_make_Char_IBM1047_ISO8859_Factory ()
-
-static Resource_Factory
- "-ORBNativeCharCodeSet 0x10020417 -ORBCharCodesetTranslator Char_IBM1047_ISO8859_Factory -ORBNativeWcharCodeSet 0x00010001"
-
-# Alternatively, A locale name may be used to specify the native char codeset
-# if one is defined in ace/Codeset_Registry_db.cpp
-
-#static Resource_Factory
-# "-ORBNativeCharCodeSet EBCDIC -ORBCharCodesetTranslator Char_IBM1047_ISO8859_Factory -ORBNativeWcharCodeSet 0x00010001"
diff --git a/TAO/tests/CodeSets/simple/run_test.pl b/TAO/tests/CodeSets/simple/run_test.pl
deleted file mode 100755
index 4cf6ee6747d..00000000000
--- a/TAO/tests/CodeSets/simple/run_test.pl
+++ /dev/null
@@ -1,75 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-print STDOUT "Client using char translator\n\n";
-
-$SV = new PerlACE::Process ("server", " -ORBDottedDecimalAddresses 1");
-$CL = new PerlACE::Process ("client", " -ORBSvcConf cs_test.conf");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-print STDOUT "\nServer using char translator\n\n";
-
-$SV2 = new PerlACE::Process ("server", " -ORBDottedDecimalAddresses 1 -ORBSvcConf cs_test.conf");
-$CL2 = new PerlACE::Process ("client");
-
-$SV2->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV2->Kill (); $SV2->TimedWait (1);
- exit 1;
-}
-
-$client2 = $CL2->SpawnWaitKill (300);
-
-if ($client2 != 0) {
- print STDERR "ERROR: client returned $client2\n";
- $status = 1;
-}
-
-$server2 = $SV2->TerminateWaitKill (5);
-
-if ($server2 != 0) {
- print STDERR "ERROR: server returned $server2\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/CodeSets/simple/server.cpp b/TAO/tests/CodeSets/simple/server.cpp
deleted file mode 100644
index d8a23526773..00000000000
--- a/TAO/tests/CodeSets/simple/server.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/CodeSets/simple
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// A simple client to demonstrate the use of codeset translation
-//
-// = AUTHORS
-// Phil Mesnier <mesnier_p@ociweb.com>
-//
-// ============================================================================
-
-// IDL generated header
-#include "simpleS.h"
-
-// FUZZ: disable check_for_streams_include
-#include "ace/streams.h"
-
-#include "ace/OS_NS_stdio.h"
-
-// ------------------------------------------------------------
-// Servant for associated CORBA object
-// ------------------------------------------------------------
-class SimpleImpl : public POA_simple
-{
-public:
-
- // implementation of corba interface
- char * op1 (const char * name,
- const CORBA::Any & inany,
- CORBA::Any_out outany
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Server: bare string: %s\n", name));
- const char *any_str;
- inany >>= any_str;
- ACE_DEBUG ((LM_DEBUG,
- "Server: inserted string: %s\n\n", any_str));
-
- CORBA::Any *out_ptr = 0;
- ACE_NEW_RETURN (out_ptr,
- CORBA::Any,
- 0);
- (*out_ptr) <<= any_str;
- outany = out_ptr;
-
- return CORBA::string_dup (name);
- };
-
- ACE_CDR::WChar * op2 (const ACE_CDR::WChar *s1
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::wstring_dup (s1);
- };
-};
-
-// ------------------------------------------------------------
-// Main routine
-// ------------------------------------------------------------
-int main(int argc, char *argv[])
-{
-
- ACE_TRY_NEW_ENV
- {
- // Init the orb
- CORBA::ORB_var orb= CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize POA
- CORBA::Object_var poa_object=
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Check POA
- if (CORBA::is_nil (poa_object.in ()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Couldn't initialize POA\n"));
- return 1;
- }
-
- // Get the ROOT POA
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA manager
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a C++ implementation of CORBA object
- SimpleImpl* my_impl = 0;
- ACE_NEW_RETURN (my_impl,
- SimpleImpl,
- -1);
-
- // Create CORBA object for servant and REGISTER with POA
- simple_var server = my_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the IOR for our object
- CORBA::String_var ior = orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- "server.ior"),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- // Activate POA manager
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for calls
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/CodeSets/simple/simple.idl b/TAO/tests/CodeSets/simple/simple.idl
deleted file mode 100644
index 0f44ed62cce..00000000000
--- a/TAO/tests/CodeSets/simple/simple.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-interface simple
-{
- string op1 (in string name,
- in any inany,
- out any outany);
-
- wstring op2 (in wstring s1);
-};
diff --git a/TAO/tests/CodeSets/simple/svc.conf b/TAO/tests/CodeSets/simple/svc.conf
deleted file mode 100644
index 6c80b23f6c6..00000000000
--- a/TAO/tests/CodeSets/simple/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-static Resource_Factory "-ORBNativeWcharCodeSet 0x00010001"
diff --git a/TAO/tests/CodeSets/simple/wcs_test.conf b/TAO/tests/CodeSets/simple/wcs_test.conf
deleted file mode 100644
index e2b83033d3e..00000000000
--- a/TAO/tests/CodeSets/simple/wcs_test.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-#First, load the appropriate codeset translator factories
-dynamic Char_IBM1047_ISO8859_Factory Service_Object * IBM1047_ISO8859:_make_Char_IBM1047_ISO8859_Factory () ""
-
-dynamic WUCS4_UTF16_Factory Service_Object * UCS4_UTF16:_make_WUCS4_UTF16_Factory ()
-
-static Resource_Factory
- "-ORBNativeCharCodeSet 0x10020417 -ORBCharCodesetTranslator Char_IBM1047_ISO8859_Factory -ORBNativeWcharCodeSet 0x00010104 -ORBWcharCodesetTranslator WUCS4_UTF16_Factory"
-
-# Alternatively, A locale name may be used to specify the native char codeset
-# if one is defined in ace/Codeset_Registry_db.cpp
-
-#static Resource_Factory
-# "-ORBNativeCharCodeSet EBCDIC -ORBCharCodesetTranslator Char_IBM1047_ISO8859_Factory -ORBNativeWcharCodeSet UCS-4 -ORBWcharCodesetTranslator WUCS4_UTF16_Factory"
diff --git a/TAO/tests/Codec/.cvsignore b/TAO/tests/Codec/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Codec/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Codec/Codec.mpc b/TAO/tests/Codec/Codec.mpc
deleted file mode 100644
index aea55d91e36..00000000000
--- a/TAO/tests/Codec/Codec.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Client): taoclient, codecfactory, codeset {
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Codec/README b/TAO/tests/Codec/README
deleted file mode 100644
index b6fd0b21114..00000000000
--- a/TAO/tests/Codec/README
+++ /dev/null
@@ -1,45 +0,0 @@
-# $Id$
-
-This test verifies that CodecFactory and CDR encapsulation Codec
-support is working properly.
-
-It does so by encoding a structure into an octet sequence, decoding
-into a new instance of the structure from the octet sequence, and then
-comparing the contents of the two structures.
-
-Run the test as follows:
-
- $ perl run_test.pl
-
-Expected output follows:
-
-==== Running Codec test
-Testing CDR encapsulation Codec encode()/decode()
-=================================================
-Original
---------
-1010
--3427
-I'm Batman.
-
-Extracted
----------
-1010
--3427
-I'm Batman.
-
-Testing CDR encapsulation Codec encode_value()/decode_value()
-=============================================================
-Original
---------
-1010
--3427
-I'm Batman.
-
-Extracted
----------
-1010
--3427
-I'm Batman.
-
-Codec test passed.
diff --git a/TAO/tests/Codec/client.cpp b/TAO/tests/Codec/client.cpp
deleted file mode 100644
index a5d874386e6..00000000000
--- a/TAO/tests/Codec/client.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-// -*- C++ -*-
-
-#include "tao/CodecFactory/CodecFactory.h"
-#include "tao/Codeset/Codeset.h"
-#include "testC.h"
-#include "ace/OS_NS_string.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Codec,
- client,
- "$Id$")
-
-CORBA::WChar *
-gen_wstring (CORBA::ULong max_length)
-{
- CORBA::ULong len = max_length;
- CORBA::WChar *buf = CORBA::wstring_alloc (len);
- CORBA::ULong i = 0;
- CORBA::WChar limit =
- ACE_OutputCDR::wchar_maxbytes() == 1 ? ACE_OCTET_MAX : ACE_WCHAR_MAX;
- while (i < len)
- {
- CORBA::WChar wc = ACE_OS::rand () % limit;
- if (wc)
- {
- buf[i] = wc;
- i++;
- }
- }
-
- buf[i] = 0;
- return buf;
-}
-
-int
-verify_data (Foo::Bar *original, Foo::Bar *extracted)
-{
- if (!original || !extracted)
- return -1;
-
- ACE_DEBUG ((LM_DEBUG,
- "Original\n"
- "--------\n"
- "%d\n"
- "%d\n"
-// "%Lu\n"
- "%s\n\n"
- "Extracted\n"
- "---------\n"
- "%d\n"
- "%d\n"
-// "%Lu\n"
- "%s\n\n",
- original->A,
- original->B,
-// original->C,
- original->D.in (),
- extracted->A,
- extracted->B,
-// extracted->C,
- extracted->D.in ()));
-
- if (original->A != extracted->A
- || original->B != extracted->B
- || original->C != extracted->C
- || (ACE_OS::strcmp (original->D, extracted->D) != 0)
- || (ACE_OS::strcmp (original->E, extracted->E) != 0))
- return -1;
-
- return 0;
-}
-
-int
-test_codec (IOP::Codec_ptr codec)
-{
- // ----------------------------------------------------------
-
- // Test values to be placed in the test structure.
- const CORBA::Long A = 1010;
- const CORBA::Long B = -3427;
- const CORBA::ULongLong C = ACE_UINT64_LITERAL (2001);
- const CORBA::Char D[] = "I'm Batman.";
- const CORBA::WChar* E = gen_wstring (25);
-
- // Create the structure to be encoded.
- Foo::Bar value;
- value.A = A;
- value.B = B;
- value.C = C;
- value.D = CORBA::string_dup (D);
- value.E = CORBA::wstring_dup (E);
-
- CORBA::Any data;
- data <<= value;
-
- // ----------------------------------------------------------
-
- CORBA::OctetSeq_var encoded_data;
- CORBA::Any_var decoded_data;
- Foo::Bar *extracted_value = 0;
-
- // Encode the structure into an octet sequence using the CDR
- // enscapsulation Codec.
-
- ACE_DEBUG ((LM_DEBUG,
- "Testing CDR encapsulation Codec encode()/decode()\n"
- "=================================================\n"));
-
- // Start out with the encode() method, i.e. the one that
- // includes the TypeCode in the CDR encapsulation.
- encoded_data = codec->encode (data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ())
- % ACE_CDR::MAX_ALIGNMENT) == 0)
- ACE_DEBUG ((LM_DEBUG,
- "\nData for decoding are already aligned "
- "on MAX_ALIGNMENT.\n\n"));
- // Extract the data from the octet sequence.
- decoded_data = codec->decode (encoded_data.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(decoded_data.in() >>= extracted_value))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Unable to extract decoded data "
- "from Any\n"),
- -1);
-
- // Verify that the extracted data matches the data that was
- // originally encoded into the octet sequence.
- if (::verify_data (&value, extracted_value) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Data extracted using "
- "IOP::Codec::decode() does not match "
- "original data.\n"),
- -1);
-
- ACE_DEBUG ((LM_DEBUG,
- "Testing CDR encapsulation Codec "
- "encode_value()/decode_value()\n"
- "================================"
- "=============================\n"));
-
- // Now use the encode_value() method, i.e. the one that does
- // *not* include the TypeCode in the CDR encapsulation.
- encoded_data = codec->encode_value (data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ())
- % ACE_CDR::MAX_ALIGNMENT) == 0)
- ACE_DEBUG ((LM_WARNING,
- "\n"
- "WARNING: Data to be decoded is already aligned "
- "on MAX_ALIGNMENT.\n\n"));
-
- // Extract the data from the octet sequence.
- decoded_data = codec->decode_value (encoded_data.in (),
- Foo::_tc_Bar
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(decoded_data.in() >>= extracted_value))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Unable to extract decoded data "
- "from Any\n"),
- -1);
-
- // Verify that the extracted data matches the data that was
- // originally encoded into the octet sequence.
- if (::verify_data (&value, extracted_value) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Data extracted using "
- "IOP::Codec::decode_value() does not match "
- "original data.\n"),
- -1);
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int retval = 0;
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- "my_orb"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain a reference to the CodecFactory.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("CodecFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IOP::CodecFactory_var codec_factory =
- IOP::CodecFactory::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Set up a structure that contains information necessary to
- // create a GIOP 1.1 CDR encapsulation Codec.
- IOP::Encoding_1_2 encoding_1_2;
- encoding_1_2.format = IOP::ENCODING_CDR_ENCAPS;
- encoding_1_2.major_version = 1;
- encoding_1_2.minor_version = 2;
- encoding_1_2.char_codeset = 0x00010001U;
- encoding_1_2.wchar_codeset = 0x00010109U;
-
- // Obtain the CDR encapsulation Codec.
- IOP::Codec_var codec_1_2 =
- codec_factory->create_codec_with_codesets (encoding_1_2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- retval = test_codec (codec_1_2.in ());
-
- // ----------------------------------------------------------
-
- // Set up a structure that contains information necessary to
- // create a GIOP 1.1 CDR encapsulation Codec.
- IOP::Encoding encoding;
- encoding.format = IOP::ENCODING_CDR_ENCAPS;
- encoding.major_version = 1;
- encoding.minor_version = 1;
-
- // Obtain the CDR encapsulation Codec.
- IOP::Codec_var codec =
- codec_factory->create_codec (encoding
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- retval = test_codec (codec.in ());
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Codec test:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "Codec test passed.\n"));
-
- return retval;
-}
diff --git a/TAO/tests/Codec/run_test.pl b/TAO/tests/Codec/run_test.pl
deleted file mode 100755
index 957553ed86a..00000000000
--- a/TAO/tests/Codec/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-# $Id$
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-print STDERR "\n\n==== Running Codec test\n";
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("client");
-}
-else {
- $T = new PerlACE::Process ("client");
-}
-
-$test = $T->SpawnWaitKill (15);
-
-if ($test != 0) {
- print STDERR "ERROR: Codec test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Codec/test.idl b/TAO/tests/Codec/test.idl
deleted file mode 100644
index 3d80bf6262f..00000000000
--- a/TAO/tests/Codec/test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * "test" IDL interface for the Codec test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-module Foo
-{
-
- struct Bar
- {
- long A;
- long B;
- unsigned long long C;
- string D;
- wstring E;
- };
-
-};
diff --git a/TAO/tests/Collocation/.cvsignore b/TAO/tests/Collocation/.cvsignore
deleted file mode 100644
index bee89094a99..00000000000
--- a/TAO/tests/Collocation/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Collocation
diff --git a/TAO/tests/Collocation/Collocation.cpp b/TAO/tests/Collocation/Collocation.cpp
deleted file mode 100644
index 19bd6433a70..00000000000
--- a/TAO/tests/Collocation/Collocation.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-#include "Collocation_Tester.h"
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Collocation, main, "$Id$")
-
-int main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- Collocation_Test coll_test;
-
- coll_test.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- coll_test.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- coll_test.shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Uncaught exception: ");
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Collocation/Collocation.mpc b/TAO/tests/Collocation/Collocation.mpc
deleted file mode 100644
index 2bb76c43a80..00000000000
--- a/TAO/tests/Collocation/Collocation.mpc
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Test Stub): taolib_with_idl {
- sharedname = Collocation_Test_Stub
- idlflags += -Wb,skel_export_macro=Diamond_Export \
- -Wb,stub_export_macro=MY_Stub_Export \
- -Wb,skel_export_include=diamond_export.h \
- -Wb,stub_export_include=stub_export.h \
- -Gd -St -Sa
- dynamicflags = MY_STUB_BUILD_DLL
-
- Source_Files {
- DiamondC.cpp
- }
-}
-
-project(*Diamond) : taolib_with_idl, portableserver {
- after += Collocation_Test_Stub
- sharedname = Collocation_Diamond
- libs += Collocation_Test_Stub
- idlflags += -Wb,skel_export_macro=Diamond_Export \
- -Wb,stub_export_macro=MY_Stub_Export \
- -Wb,skel_export_include=diamond_export.h \
- -Wb,stub_export_include=stub_export.h \
- -Gd -St -Sa
- dynamicflags = DIAMOND_BUILD_DLL
-
- Source_Files {
- Diamond_i.cpp
- DiamondS.cpp
- }
-}
-
-project(*Server) : taoserver, strategies {
- after += Collocation_Test_Stub Collocation_Diamond
- libs += Collocation_Test_Stub Collocation_Diamond
- exename = Collocation
- IDL_Files {
- }
-
- Source_Files {
- Collocation_Tester.cpp
- Collocation.cpp
- }
-}
diff --git a/TAO/tests/Collocation/Collocation_Tester.cpp b/TAO/tests/Collocation/Collocation_Tester.cpp
deleted file mode 100644
index 87fba9ceb92..00000000000
--- a/TAO/tests/Collocation/Collocation_Tester.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-// $Id$
-
-//============================================================================
-//
-// =FILENAME
-// Collocation_Test.h
-//
-// =DESCRIPTION
-// Server class to perform testing of TAO's collocation mechanism.
-//
-// =AUTHOR
-// Nanbor Wang
-//
-//=============================================================================
-
-#include "Collocation_Tester.h"
-
-Collocation_Test::Collocation_Test (void)
-{
- // no-op.
-}
-
-void
-Collocation_Test::shutdown (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->root_poa_->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB.
- this->orb_ = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int result = this->parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Get an Object reference to RootPOA.
- CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Narrow the Object reference to a POA reference
- this->root_poa_ =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POAManager of RootPOA
- this->poa_manager_ =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Activate the diamond servant and its base classes under RootPOA.
- PortableServer::ObjectId_var id =
- this->root_poa_->activate_object (&this->top_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-// // We only care about the most derived class here.
-// this->diamond_obj_ = this->diamond_servant_._this (ACE_ENV_SINGLE_ARG_PARAMETER);
-// ACE_CHECK_RETURN (-1);
-
- id =
- this->root_poa_->activate_object (&this->diamond_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // We only care about the most derived class here.
- this->diamond_obj_ = this->root_poa_->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- id =
- this->root_poa_->activate_object (&this->left_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- id =
- this->root_poa_->activate_object (&this->right_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::String_var str =
- this->orb_->object_to_string (this->diamond_obj_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG, "Diamond Servant activated:\n %s\n",
- str.in()));
-
- return 0;
-
-
-}
-
-int
-Collocation_Test::parse_args (int /*argc*/,
- char *[] /*argv*/)
-{
- return 0;
-}
-
-int
-Collocation_Test::test_narrow (ACE_ENV_SINGLE_ARG_DECL)
-{
- Diamond::Top_var top =
- Diamond::Top::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- Diamond::Left_var left =
- Diamond::Left::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- Diamond::Right_var right =
- Diamond::Right::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- Diamond::Buttom_var buttom =
- Diamond::Buttom::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::String_var str = top->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling top->shape: %s\n", str.in ()));
-
- str = left->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling left->shape: %s\n", str.in ()));
-
- str = right->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling right->shape: %s\n", str.in ()));
-
- str = buttom->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling buttom->shape: %s\n", str.in ()));
-
- return 0;
-}
-
-int
-Collocation_Test::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->test_narrow (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Collocation/Collocation_Tester.h b/TAO/tests/Collocation/Collocation_Tester.h
deleted file mode 100644
index 131e18003dd..00000000000
--- a/TAO/tests/Collocation/Collocation_Tester.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id$
-
-//============================================================================
-//
-// = FILENAME
-// Collocation_Test.h
-//
-// = DESCRIPTION
-// Server class to perform testing of TAO's collocation mechanism.
-//
-// = AUTHOR
-// Nanbor Wang
-//
-//=============================================================================
-
-#if !defined (TAO_COLLOCATION_TEST_H)
-#define TAO_COLLOCATION_TEST_H
-
-#include "Diamond_i.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-
-class Collocation_Test
-{
-public:
- Collocation_Test (void);
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL);
-
- int init (int argc, char *argv[] ACE_ENV_ARG_DECL_NOT_USED);
- // Initializing the Collocation_Test object.
-
- int parse_args (int argc, char *argv[]);
- // Parse the test specific arguments.
-
- int test_narrow (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // This test narrow an object reference to its base class and see
- // if it works correctly.
-
- int run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // Run the test.
-
-private:
- CORBA::ORB_var orb_;
-
- PortableServer::POA_var root_poa_;
-
- PortableServer::POAManager_var poa_manager_;
-
- CORBA::Object_var diamond_obj_;
- // Our basic test object.
-
- Top_i top_servant_;
- Left_i left_servant_;
- Right_i right_servant_;
- Buttom_i diamond_servant_;
- // A collection of servant for basic narrowing test.
-};
-
-#endif /* TAO_COLLOCATION_TEST_H */
diff --git a/TAO/tests/Collocation/Diamond.idl b/TAO/tests/Collocation/Diamond.idl
deleted file mode 100644
index 0e60b25c52c..00000000000
--- a/TAO/tests/Collocation/Diamond.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-
-module Diamond
-{
- interface Top
- {
- string shape ();
- };
-
- interface Left : Top
- {
- string color ();
- };
-
- interface Right : Top
- {
- long width ();
- };
-
- interface Buttom : Left, Right
- {
- string name ();
- };
-};
diff --git a/TAO/tests/Collocation/Diamond_i.cpp b/TAO/tests/Collocation/Diamond_i.cpp
deleted file mode 100644
index f94a35d2c4b..00000000000
--- a/TAO/tests/Collocation/Diamond_i.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// $Id$
-
-#include "Diamond_i.h"
-
-Top_i::Top_i ()
-{
- // no-op.
-}
-
-Top_i::~Top_i ()
-{
- // No-op.
-}
-
-char *
-Top_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("a point.");
-}
-
-Left_i::Left_i ()
-{
- // No-op.
-}
-
-Left_i::~Left_i ()
-{
- // No-op.
-}
-
-char *
-Left_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("the left line");
-}
-
-char *
-Left_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("black");
-}
-
-Right_i::Right_i ()
-{
- // no-op.
-}
-
-Right_i::~Right_i ()
-{
- // no-op.
-}
-
-char *
-Right_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("the right line");
-}
-
-char *
-Right_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("red");
- //
-}
-
-CORBA::Long
-Right_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return 0;
-}
-
-Buttom_i::Buttom_i ()
-{
- // no-op.
-}
-
-Buttom_i::~Buttom_i ()
-{
- // no-op.
-}
-
-char *
-Buttom_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("a diamond");
-}
-
-char *
-Buttom_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("translucent");
-}
-
-CORBA::Long
-Buttom_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return 100;
-}
-
-char *
-Buttom_i::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("Jubilee");
-}
diff --git a/TAO/tests/Collocation/Diamond_i.h b/TAO/tests/Collocation/Diamond_i.h
deleted file mode 100644
index 9e248a81dbd..00000000000
--- a/TAO/tests/Collocation/Diamond_i.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-#if !defined (TAO_DIAMOND_I_H)
-#define TAO_DIAMOND_I_H
-
-#include "DiamondS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-class Diamond_Export Top_i : public POA_Diamond::Top
-{
-public:
- Top_i (void);
- ~Top_i (void);
- // Ctor and dtor.
-
- virtual char * shape (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-};
-
-class Diamond_Export Left_i : public POA_Diamond::Left
-{
-public:
- Left_i (void);
- ~Left_i (void);
- // Ctor, dtor.
-
- virtual char * shape (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-
- virtual char * color (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the color of this object (interface.)
-};
-
-class Diamond_Export Right_i : public POA_Diamond::Right
-{
-public:
- Right_i (void);
- ~Right_i (void);
- // Ctor, dtor.
-
- virtual char * shape (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-
- virtual char * color (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the color of this object (interface.)
-
- virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the width of the stuff.
-};
-
-class Diamond_Export Buttom_i : public POA_Diamond::Buttom
-{
-public:
- Buttom_i (void);
- ~Buttom_i (void);
- // Ctor, dtor.
-
- virtual char * shape (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-
- virtual char * color (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the color of this object (interface.)
-
- virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the width of the stuff.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the name of the object.
-};
-
-#endif /* TAO_DIAMOND_I_H */
diff --git a/TAO/tests/Collocation/README b/TAO/tests/Collocation/README
deleted file mode 100644
index cc1bcde0a5b..00000000000
--- a/TAO/tests/Collocation/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This program performs a series of sanity check on the collocation
-support in TAO. It also serves as an example of how to separate stub
-and skeleton + implementation from the main program.
-
-After building the example, you'll get:
-
- Collocation_Test_Stubs.{dll,so}: This library contains stub implementations.
-
- Diamond.{dll,so}: This library contains the implementation Diamond object.
-
- Collocation[.exe]: This program performs the collocation test.
diff --git a/TAO/tests/Collocation/diamond_export.h b/TAO/tests/Collocation/diamond_export.h
deleted file mode 100644
index fff24d8a0e5..00000000000
--- a/TAO/tests/Collocation/diamond_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 DIAMOND_EXPORT_H
-#define DIAMOND_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (DIAMOND_HAS_DLL)
-# define DIAMOND_HAS_DLL 0
-# endif /* ! DIAMOND_HAS_DLL */
-#else
-# if !defined (DIAMOND_HAS_DLL)
-# define DIAMOND_HAS_DLL 1
-# endif /* ! DIAMOND_HAS_DLL */
-#endif
-
-#if defined (DIAMOND_HAS_DLL) && (DIAMOND_HAS_DLL == 1)
-# if defined (DIAMOND_BUILD_DLL)
-# define Diamond_Export ACE_Proper_Export_Flag
-# define DIAMOND_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define DIAMOND_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* DIAMOND_BUILD_DLL */
-# define Diamond_Export ACE_Proper_Import_Flag
-# define DIAMOND_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define DIAMOND_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* DIAMOND_BUILD_DLL */
-#else /* DIAMOND_HAS_DLL == 1 */
-# define Diamond_Export
-# define DIAMOND_SINGLETON_DECLARATION(T)
-# define DIAMOND_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* DIAMOND_HAS_DLL == 1 */
-
-#endif /* DIAMOND_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/Collocation/run_test.pl b/TAO/tests/Collocation/run_test.pl
deleted file mode 100755
index 191f0046122..00000000000
--- a/TAO/tests/Collocation/run_test.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-print STDOUT "Collocation\n\n";
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("Collocation");
-}
-else {
- $SV = new PerlACE::Process ("Collocation");
-}
-
-
-$server = $SV->SpawnWaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: Collocation returned $server \n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Collocation/stub_export.h b/TAO/tests/Collocation/stub_export.h
deleted file mode 100644
index 2242f4a184e..00000000000
--- a/TAO/tests/Collocation/stub_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 MY_STUB_EXPORT_H
-#define MY_STUB_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (MY_STUB_HAS_DLL)
-# define MY_STUB_HAS_DLL 0
-# endif /* ! MY_STUB_HAS_DLL */
-#else
-# if !defined (MY_STUB_HAS_DLL)
-# define MY_STUB_HAS_DLL 1
-# endif /* ! MY_STUB_HAS_DLL */
-#endif
-
-#if defined (MY_STUB_HAS_DLL) && (MY_STUB_HAS_DLL == 1)
-# if defined (MY_STUB_BUILD_DLL)
-# define MY_Stub_Export ACE_Proper_Export_Flag
-# define MY_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define MY_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* MY_STUB_BUILD_DLL */
-# define MY_Stub_Export ACE_Proper_Import_Flag
-# define MY_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define MY_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* MY_STUB_BUILD_DLL */
-#else /* MY_STUB_HAS_DLL == 1 */
-# define MY_Stub_Export
-# define MY_STUB_SINGLETON_DECLARATION(T)
-# define MY_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* MY_STUB_HAS_DLL == 1 */
-
-#endif /* MY_STUB_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/Collocation/svc.conf b/TAO/tests/Collocation/svc.conf
deleted file mode 100644
index 285b1297bd4..00000000000
--- a/TAO/tests/Collocation/svc.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-# $Id$
-#
-# Please see $TAO_ROOT/docs/Options.html for details on these options.
-#
-
-# This is a single threaded "server."
-static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"
-
-# Make sure we use RW client handler so if something goes wrong, the program will bloc,
-# i.e., won't work.
-static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW"
-
-# Not absolutely necessary for this test, but we add it for fun.
-static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null"
diff --git a/TAO/tests/Collocation/svc.conf.xml b/TAO/tests/Collocation/svc.conf.xml
deleted file mode 100644
index 36246c69725..00000000000
--- a/TAO/tests/Collocation/svc.conf.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Collocation/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. -->
- <!-- -->
- <!-- This is a single threaded "server." -->
- <static id="Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/>
- <!-- Make sure we use RW client handler so if something goes wrong, the program will bloc, -->
- <!-- i.e., won't work. -->
- <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/>
- <!-- Not absolutely necessary for this test, but we add it for fun. -->
- <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive -ORBPOALock null"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/CollocationLockup/AB.idl b/TAO/tests/CollocationLockup/AB.idl
deleted file mode 100644
index 92b2822b872..00000000000
--- a/TAO/tests/CollocationLockup/AB.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface A {
-};
-
-interface B {
- A makeA ();
-};
diff --git a/TAO/tests/CollocationLockup/CollocationLockup.cpp b/TAO/tests/CollocationLockup/CollocationLockup.cpp
deleted file mode 100644
index 6f4e11ec90a..00000000000
--- a/TAO/tests/CollocationLockup/CollocationLockup.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-// $Id$
-
-/**
- * CollocationLockup.cpp
- * This is regression test against bug #2130.
- * It tests a deadlock between a thread making a collocated invocation
- * (which holds a lock on the ORB core and attempts to lock the POA) and a
- * thread activating a servant (which locks the POA and attempts to lock the
- * ORB core).
- *
- * This test was developed from a test submitted by Rick Marlborough for bug
- * #2297 and refined by Paul Calabrese.
- */
-
-#include "ABS.h"
-#include "SimpleNamingServiceC.h"
-
-#include "ace/Thread_Manager.h"
-#include "ace/SString.h"
-
-namespace
-{
-#if defined (ACE_OPENVMS)
- // less threads on OpenVMS otherwise this test
- // (although working correctly) takes far too long.
- const size_t N_THREADS = 10;
-#else
- const size_t N_THREADS = 20;
-#endif
- const size_t N_ITERATIONS = 100;
- const char* nameString = "myBobject";
-
- CORBA::ORB_var g_pOrb;
- PortableServer::POA_var g_pPoa;
- SimpleNamingService_var g_pNameService;
-}
-
-class A_i : public virtual POA_A
-{
-};
-
-class B_i : public virtual POA_B
-{
-public:
- virtual A_ptr
- makeA () ACE_THROW_SPEC ((CORBA::SystemException))
- {
- PortableServer::ServantBase_var servant = new A_i;
- g_pPoa->activate_object (servant.in());
- CORBA::Object_var obj = g_pPoa->servant_to_reference (servant.in());
- return A::_narrow (obj.in ());
- }
-};
-
-// Thread for ORB->run()
-ACE_THR_FUNC_RETURN OrbRunThread (void*);
-
-// Thread to run the test
-ACE_THR_FUNC_RETURN TestThread (void*);
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- try
- {
- ACE_Thread_Manager threads;
-
- // Normal corba init
- g_pOrb = CORBA::ORB_init (argc, argv, "");
-
- CORBA::Object_var pPoaObj =
- g_pOrb->resolve_initial_references ("RootPOA");
- g_pPoa = PortableServer::POA::_narrow (pPoaObj.in ());
- PortableServer::POAManager_var pMgr = g_pPoa->the_POAManager ();
- pMgr->activate ();
-
- CORBA::Object_var pNSObj =
- g_pOrb->resolve_initial_references ("SimpleNamingService");
- g_pNameService = SimpleNamingService::_narrow (pNSObj.in ());
-
- if (CORBA::is_nil (g_pNameService.in ()))
- {
- ACE_DEBUG ((LM_ERROR,
- "ERROR: Could not locate the Simple Naming Service\n"));
- return 1;
- }
-
- ACE_Thread::spawn (OrbRunThread, 0, THR_NEW_LWP | THR_DETACHED);
-
- // Setup
- PortableServer::ServantBase_var servant = new B_i;
- g_pPoa->activate_object (servant.in());
- CORBA::Object_var b = g_pPoa->servant_to_reference (servant.in());
-
- g_pNameService->bind (b.in ());
-
- //Start threads
- threads.spawn_n (N_THREADS, TestThread);
- ACE_DEBUG ((LM_INFO, "All threads spawned.\n"));
-
- } //destructor of ACE_Thread_Manager = implicit join
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR, "Corba Exception: %s\n", ex._info ().c_str ()));
- return 1;
- }
-
- g_pOrb->shutdown (0);
-
- return 0;
-}
-
-ACE_THR_FUNC_RETURN
-OrbRunThread (void*)
-{
- try
- {
- g_pOrb->run ();
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR,
- "In OrbRunThread: Corba Exception: %s\n",
- ex._info ().c_str ()));
- }
- return 0;
-}
-
-ACE_THR_FUNC_RETURN
-TestThread (void*)
-{
- try
- {
- for (size_t i (0); i < N_ITERATIONS; ++i)
- {
- CORBA::Object_var obj = g_pNameService->resolve ();
- B_var b = B::_narrow (obj.in ());
- b->makeA ();
- if (i % 50 == 0)
- ACE_DEBUG ((LM_INFO, "(%t) collocated call returned\n"));
- }
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR,
- "In TestThread: Corba Exception: %s\n",
- ex._info ().c_str ()));
- }
- return 0;
-}
diff --git a/TAO/tests/CollocationLockup/CollocationLockup.mpc b/TAO/tests/CollocationLockup/CollocationLockup.mpc
deleted file mode 100644
index c02d02f27f7..00000000000
--- a/TAO/tests/CollocationLockup/CollocationLockup.mpc
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoexe, portableserver {
- idlflags += -Sc -St
- exename = CollocationLockup
-
- Source_Files {
- ABC.cpp
- ABS.cpp
- SimpleNamingServiceC.cpp
- CollocationLockup.cpp
- }
-}
-
-project(*SimpleNamingService): taoexe, portableserver {
- idlflags += -Sc -St
- exename = SimpleNamingService
-
- IDL_Files {
- SimpleNamingService.idl
- }
-
- Source_Files {
- SimpleNamingService.cpp
- }
-}
diff --git a/TAO/tests/CollocationLockup/SimpleNamingService.cpp b/TAO/tests/CollocationLockup/SimpleNamingService.cpp
deleted file mode 100644
index c21e466fec7..00000000000
--- a/TAO/tests/CollocationLockup/SimpleNamingService.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id$
-
-/**
- * SimpleNamingService.cpp
- * This is part of the regression test against bug #2130.
- * See CollocationLockup.cpp for a description of the test.
- */
-
-#include "SimpleNamingServiceS.h"
-
-#include "ace/String_Base.h"
-#include "ace/streams.h"
-
-namespace
-{
- const char* iorFileName = "SimpleNamingService.ior";
-}
-
-class SimpleNamingService_i : public virtual POA_SimpleNamingService
-{
-public:
-
- virtual void
- bind (CORBA::Object_ptr obj) ACE_THROW_SPEC ((CORBA::SystemException))
- {
- obj_ = CORBA::Object::_duplicate (obj);
- }
-
-
- virtual CORBA::Object_ptr
- resolve () ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::Object::_duplicate (obj_.in ());
- }
-
-private:
-
- CORBA::Object_var obj_;
-
-};
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
-
- CORBA::Object_var pPoaObj =
- orb->resolve_initial_references ("RootPOA");
- PortableServer::POA_var poa =
- PortableServer::POA::_narrow (pPoaObj.in ());
- PortableServer::POAManager_var pMgr = poa->the_POAManager ();
- pMgr->activate ();
-
- SimpleNamingService_i* servant = new SimpleNamingService_i;
- PortableServer::ObjectId_var oid = poa->activate_object (servant);
- CORBA::Object_var obj = poa->id_to_reference (oid.in ());
- CORBA::String_var str = orb->object_to_string (obj.in ());
-
- ofstream iorFile (iorFileName);
- iorFile << str.in () << endl;
- iorFile.close ();
-
- orb->run ();
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_ERROR, "Corba Exception: %s\n", ex._info ().c_str ()));
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/CollocationLockup/SimpleNamingService.idl b/TAO/tests/CollocationLockup/SimpleNamingService.idl
deleted file mode 100644
index e76b077308f..00000000000
--- a/TAO/tests/CollocationLockup/SimpleNamingService.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-// $Id$
-
-/// This is a degenerate Naming Service that only binds one object
-interface SimpleNamingService {
-
- void bind (in Object o);
- Object resolve ();
-
-};
diff --git a/TAO/tests/CollocationLockup/run_test.pl b/TAO/tests/CollocationLockup/run_test.pl
deleted file mode 100755
index 3334b89b4aa..00000000000
--- a/TAO/tests/CollocationLockup/run_test.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-use strict;
-
-# Amount of delay (in seconds) between starting a server and a client
-# to allow proper server initialization.
-my $sleeptime = 10;
-
-# Variables for command-line arguments to client and server
-# executables.
-my $iorbase = "SimpleNamingService.ior";
-my $iorfile = PerlACE::LocalFile ($iorbase);
-
-my $status = 0;
-
-my $NS = new PerlACE::Process ("SimpleNamingService");
-
-unlink $iorfile;
-
-$NS->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
- print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
- $NS->Kill ();
- exit 1;
-}
-
-my $CL;
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("CollocationLockup",
- "-ORBInitRef " .
- "SimpleNamingService=file://$iorbase");
-}
-else {
- $CL = new PerlACE::Process ("CollocationLockup",
- "-ORBInitRef " .
- "SimpleNamingService=file://$iorfile");
-}
-
-my $client;
-if ($^O eq "VMS") {
- # On OpenVMS this test does not lock up but takes much longer
- $client = $CL->SpawnWaitKill (300);
-}
-else {
-# In testing on various platforms, the builds with the bug failed before
-# 20 seconds and when the bug was fixed it returned before 20 seconds.
- $client = $CL->SpawnWaitKill (20);
-}
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$NS->Kill ();
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Collocation_Exception_Test/Client_Task.cpp b/TAO/tests/Collocation_Exception_Test/Client_Task.cpp
deleted file mode 100644
index 960fef211e1..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Client_Task.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Collocation_Oneway_Tests, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , input_ (ior)
- , corb_ (CORBA::ORB::_duplicate (corb))
-{
-}
-
-void
-Client_Task::test_system_exception (
- Test::Hello_ptr hello_ptr ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- hello_ptr->system_exception_test (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::INTERNAL, ex)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Caught internal exception as expected\n"));
- // ignore
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in test_system_exception:");
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-Client_Task::test_user_exception_expected (
- Test::Hello_ptr hello_ptr ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- hello_ptr->user_exception_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (::Test::Hello::A, ex)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Caught user A exception as expected\n"));
- // ignore
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in test_user_exception_expected:");
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-Client_Task::test_user_exception_not_expected (
- Test::Hello_ptr hello_ptr ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- hello_ptr->user_exception_not_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::UNKNOWN, ex)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Caught unknown exception as expected\n"));
- // ignore
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in user_exception_not_expected:");
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var tmp =
- this->corb_->string_to_object (input_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- this->test_system_exception (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->test_user_exception_expected (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->test_user_exception_not_expected (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
diff --git a/TAO/tests/Collocation_Exception_Test/Client_Task.h b/TAO/tests/Collocation_Exception_Test/Client_Task.h
deleted file mode 100644
index 7d675ac6143..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Client_Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $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"
-
-#include "TestC.h"
-
-/// Implement a Task to run the client as a thread
-class Client_Task : public ACE_Task_Base
-{
-public:
-
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- void test_system_exception (Test::Hello_ptr hello_ptr ACE_ENV_ARG_DECL);
- void test_user_exception_expected (Test::Hello_ptr hello_ptr ACE_ENV_ARG_DECL);
- void test_user_exception_not_expected (Test::Hello_ptr hello_ptr ACE_ENV_ARG_DECL);
-
- const char *input_;
-
- CORBA::ORB_var corb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp b/TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp
deleted file mode 100644
index f4e4a6b9615..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Collocated_Test.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $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 char *output = "test.ior";
-const char *input = "file://test.ior";
-const char *mode = "SYNC_NONE";
-
-// static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "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 sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Collocation_Exception_Test/Collocation_Excep_Test.mpc b/TAO/tests/Collocation_Exception_Test/Collocation_Excep_Test.mpc
deleted file mode 100644
index c674fbac67e..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Collocation_Excep_Test.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*): taoserver {
- exename = Collocated_Test
-}
diff --git a/TAO/tests/Collocation_Exception_Test/Hello.cpp b/TAO/tests/Collocation_Exception_Test/Hello.cpp
deleted file mode 100644
index c9ca732b3cc..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Hello.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(Collocation_Oneway_Tests, Hello, "$Id$")
-
- Hello::Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
-{
-}
-
-void
-Hello::system_exception_test (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_THROW (CORBA::INTERNAL ());
-}
-
-void
-Hello::user_exception_expected (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException, ::Test::Hello::A))
-{
- ACE_THROW (::Test::Hello::A ());
-}
-
-void
-Hello::user_exception_not_expected (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException, ::Test::Hello::A))
-{
- this->throw_internal_b (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Hello::throw_internal_b (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_THROW (::Test::Hello::B ());
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- 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 ();
-
- if (orb_table->find ("server_orb") == 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 (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Collocation_Exception_Test/Hello.h b/TAO/tests/Collocation_Exception_Test/Hello.h
deleted file mode 100644
index 0e0d044b6e9..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Hello.h
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# pragma warning(push)
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-#include "ace/OS.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 (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void system_exception_test (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void user_exception_expected (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException, ::Test::Hello::A));
-
- virtual void user_exception_not_expected (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException, ::Test::Hello::A));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- void throw_internal_b (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- ACE_thread_t thr_id_;
-};
-
-#if defined(_MSC_VER)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Collocation_Exception_Test/Server_Task.cpp b/TAO/tests/Collocation_Exception_Test/Server_Task.cpp
deleted file mode 100644
index 746c3ff7758..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Server_Task.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TestS.h"
-#include "Hello.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Collocation_Oneway_Tests,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (this->sorb_.in (),
- ACE_Thread::self ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (hello.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->sorb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Collocation_Exception_Test/Server_Task.h b/TAO/tests/Collocation_Exception_Test/Server_Task.h
deleted file mode 100644
index 60006aae0ba..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Server_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- 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 char *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 char *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/TAO/tests/Collocation_Exception_Test/Test.idl b/TAO/tests/Collocation_Exception_Test/Test.idl
deleted file mode 100644
index fae0b26f3d2..00000000000
--- a/TAO/tests/Collocation_Exception_Test/Test.idl
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple interface
- interface Hello
- {
- exception A {};
- exception B {};
-
- /// Return a simple string
- string get_string ();
-
- /// test system exception internal
- void system_exception_test ();
-
- /// Method that has defined raises A and which throws also that
- /// exception
- void user_exception_expected () raises (A);
-
- /// Method that has defined raises A and but which throws B
- void user_exception_not_expected () raises (A);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Collocation_Exception_Test/run_test.pl b/TAO/tests/Collocation_Exception_Test/run_test.pl
deleted file mode 100755
index f1f44fd0577..00000000000
--- a/TAO/tests/Collocation_Exception_Test/run_test.pl
+++ /dev/null
@@ -1,32 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("Collocated_Test");
-}
-else {
- $SV = new PerlACE::Process ("Collocated_Test");
-}
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocation_Exception_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp b/TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp
deleted file mode 100644
index 216bcba8cf8..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//
-// $Id$
-//
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "Client_Task.h"
-#include "TestC.h"
-
-ACE_RCSID(Collocation_Oneway_Tests, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- Client_Task::ClientSyncModeEnum syncMode,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , input_ (ior)
- , corb_ (CORBA::ORB::_duplicate (corb))
- , syncMode_ (syncMode)
-
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var tmp =
- this->corb_->string_to_object (input_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- input_),
- 1);
- }
-
- Test::Hello_var tmpVar = hello;
- CORBA::Any anyPolicy;
-
- Messaging::SyncScope selectedScope = Messaging::SYNC_NONE; // default
-
- if(syncMode_ == Client_Task::MODE_TRANSPORT) {
- selectedScope = Messaging::SYNC_WITH_TRANSPORT;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - SYNC_WITH_TRANSPORT collocated oneway test\n"));
- }
- else if(syncMode_ == Client_Task::MODE_SERVER) {
- selectedScope = Messaging::SYNC_WITH_SERVER;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - SYNC_WITH_SERVER collocated oneway test\n"));
- }
- else if(syncMode_ == Client_Task::MODE_TARGET) {
- selectedScope = Messaging::SYNC_WITH_TARGET;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - SYNC_WITH_TARGET collocated oneway test\n"));
- }
- else if(syncMode_ == Client_Task::MODE_NONE) {
- selectedScope = Messaging::SYNC_NONE;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - SYNC_NONE collocated oneway test\n"));
- }
-
- anyPolicy <<= selectedScope;
- CORBA::PolicyList polList;
- polList.length(1);
- polList[0] = this->corb_->create_policy(
- Messaging::SYNC_SCOPE_POLICY_TYPE, anyPolicy ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmpGenericVar =
- tmpVar->_set_policy_overrides(polList,CORBA::ADD_OVERRIDE ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // do unchecked narrow because ORB's not activated. Otherwise get TRANSIENT exception
- hello = Test::Hello::_narrow(tmpGenericVar.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_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->onewayTest(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - returned from onewayTest() call \n"));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
diff --git a/TAO/tests/Collocation_Oneway_Tests/Client_Task.h b/TAO/tests/Collocation_Oneway_Tests/Client_Task.h
deleted file mode 100644
index 459a44e96ce..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Client_Task.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $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:
-
-enum ClientSyncModeEnum {
- MODE_NONE,
- MODE_TRANSPORT,
- MODE_SERVER,
- MODE_TARGET
-};
-
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ClientSyncModeEnum syncMode,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
- ClientSyncModeEnum syncMode_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp b/TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp
deleted file mode 100644
index f36e0cd48f9..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Collocated_Test.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// $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 char *output = "test.ior";
-const char *input = "file://test.ior";
-const char *mode = "SYNC_NONE";
-
-Client_Task::ClientSyncModeEnum syncMode = Client_Task::MODE_NONE;
-
-// static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o:n:m:");
- 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 'm':
- mode = get_opts.opt_arg ();
- // cout << "mode = " << mode << endl;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - mode set to <%C> for collocated oneway test\n", mode));
- if(mode) {
- if(!strcmp("none", mode)) {
- syncMode = Client_Task::MODE_NONE;
- }
- else if (!strcmp("transport", mode)) {
- syncMode = Client_Task::MODE_TRANSPORT;
- }
- else if (!strcmp("server", mode)) {
- syncMode = Client_Task::MODE_SERVER;
- }
- else if (!strcmp("target", mode)) {
- syncMode = Client_Task::MODE_TARGET;
- }
- }
- else {
- // same hack used in original test!
- return 0;
- }
- break;
- case '?':
- default:
- // This is a hack but that is okay!
- return 0;
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (input,
- corb.in (),
- syncMode,
- 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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Collocation_Oneway_Tests/Collocation_Oneway_Tests.mpc b/TAO/tests/Collocation_Oneway_Tests/Collocation_Oneway_Tests.mpc
deleted file mode 100644
index 9f61292233d..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Collocation_Oneway_Tests.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*): taoserver, messaging, valuetype {
- exename = Collocated_Test
-}
diff --git a/TAO/tests/Collocation_Oneway_Tests/Hello.cpp b/TAO/tests/Collocation_Oneway_Tests/Hello.cpp
deleted file mode 100644
index e4f3c6d80d7..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Hello.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(Collocation_Oneway_Tests, Hello, "$Id$")
-
- Hello::Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
-{
-}
-
-void
-Hello::onewayTest (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) onewayTest() Upcall in process ..\n"));
- return;
-}
-
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- 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 ();
-
- if (orb_table->find ("server_orb") == 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 (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Collocation_Oneway_Tests/Hello.h b/TAO/tests/Collocation_Oneway_Tests/Hello.h
deleted file mode 100644
index c145e77f7c1..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Hello.h
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# pragma warning(push)
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-#include "ace/OS.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 (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void onewayTest (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- ACE_thread_t thr_id_;
-};
-
-#if defined(_MSC_VER)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp b/TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp
deleted file mode 100644
index 746c3ff7758..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Server_Task.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TestS.h"
-#include "Hello.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Collocation_Oneway_Tests,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (this->sorb_.in (),
- ACE_Thread::self ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (hello.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->sorb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Collocation_Oneway_Tests/Server_Task.h b/TAO/tests/Collocation_Oneway_Tests/Server_Task.h
deleted file mode 100644
index 60006aae0ba..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Server_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- 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 char *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 char *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/TAO/tests/Collocation_Oneway_Tests/Test.idl b/TAO/tests/Collocation_Oneway_Tests/Test.idl
deleted file mode 100644
index dc244b3ff58..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/Test.idl
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// $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 ();
-
- /// test oneway call
- oneway void onewayTest();
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Collocation_Oneway_Tests/run_test.pl b/TAO/tests/Collocation_Oneway_Tests/run_test.pl
deleted file mode 100755
index 833ea238102..00000000000
--- a/TAO/tests/Collocation_Oneway_Tests/run_test.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("Collocated_Test");
-}
-else {
- $SV = new PerlACE::Process ("Collocated_Test");
-}
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -m none ");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocation_Oneway_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -m transport");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocation_Oneway_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -m server");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocation_Oneway_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -m target");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocation_Oneway_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Collocation_Opportunities/.cvsignore b/TAO/tests/Collocation_Opportunities/.cvsignore
deleted file mode 100644
index 3189327922a..00000000000
--- a/TAO/tests/Collocation_Opportunities/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Collocation_Opportunities
diff --git a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp b/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp
deleted file mode 100644
index 28aa663f7aa..00000000000
--- a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Task.h"
-#include "tao/PortableServer/Object_Adapter.h"
-#include "tao/PortableServer/POA_Current.h"
-#include "tao/PortableServer/POA_Current_Impl.h"
-
-ACE_RCSID(Collocation_Opportunities, Collocation_Opportunities, "$Id$")
-
-class test_i :
- public POA_test
-{
-public:
-
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- void set_other (test_ptr test);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
- CORBA::ORB_var orb_;
-
- PortableServer::POA_var poa_;
-
- test_var other_;
-
- PortableServer::Current_var poa_current_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
- CORBA::Object_var object;
-
- object =
- this->orb_->resolve_initial_references ("POACurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->poa_current_ =
- PortableServer::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-test_i::set_other (test_ptr test)
-{
- this->other_ = test::_duplicate (test);
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->other_.in () != test::_nil ())
- {
- this->other_->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- TAO::Portable_Server::POA_Current &tao_poa_current =
- dynamic_cast <TAO::Portable_Server::POA_Current &>
- (*(this->poa_current_.in ()));
-
- TAO::Portable_Server::POA_Current_Impl &tao_poa_current_implementation =
- *tao_poa_current.implementation ();
-
- const char *upcall = 0;
- if (tao_poa_current_implementation.previous ())
- upcall = "collocated";
- else
- upcall = "remote";
-
- PortableServer::ObjectId_var id =
- this->poa_current_->get_object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var id_string =
- PortableServer::ObjectId_to_string (id.in ());
-
- ACE_DEBUG ((LM_DEBUG,
- "%s method() invoked for %s servant in thread %t\n",
- upcall,
- id_string.in ()));
- }
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Task task (orb.in ());
-
- int result =
- task.activate ();
- ACE_ASSERT (result != -1);
- ACE_UNUSED_ARG (result);
-
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- policies[0] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("child_poa",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *base_servant =
- new test_i (orb.in (),
- child_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ServantBase_var safe_base_servant (base_servant);
-
- PortableServer::ObjectId_var base_oid =
- PortableServer::string_to_ObjectId ("base");
-
- child_poa->activate_object_with_id (base_oid.in (),
- base_servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var base_test =
- base_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *first_servant =
- new test_i (orb.in (),
- child_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ServantBase_var safe_first_servant (first_servant);
-
- PortableServer::ObjectId_var first_oid =
- PortableServer::string_to_ObjectId ("first");
-
- child_poa->activate_object_with_id (first_oid.in (),
- first_servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var first_test =
- first_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- base_servant->set_other (first_test.in ());
-
- base_test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var second_oid =
- PortableServer::string_to_ObjectId ("second");
-
- object =
- child_poa->create_reference_with_id (second_oid.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var second_test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *second_servant =
- new test_i (orb.in (),
- child_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ServantBase_var safe_second_servant (second_servant);
-
- child_poa->activate_object_with_id (second_oid.in (),
- second_servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- base_servant->set_other (second_test.in ());
-
- base_test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var third_oid =
- PortableServer::string_to_ObjectId ("third");
-
- object =
- child_poa->create_reference_with_id (third_oid.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var third_ior =
- orb->object_to_string (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- orb->string_to_object (third_ior.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var third_test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *third_servant =
- new test_i (orb.in (),
- child_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ServantBase_var safe_third_servant (third_servant);
-
- child_poa->activate_object_with_id (third_oid.in (),
- third_servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- base_servant->set_other (third_test.in ());
-
- base_test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->shutdown (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- result =
- task.wait ();
- ACE_ASSERT (result != -1);
- ACE_UNUSED_ARG (result);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.mpc b/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.mpc
deleted file mode 100644
index 6abbe5ef004..00000000000
--- a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Collocation Opportunities): taoserver {
- exename = Collocation_Opportunities
-}
diff --git a/TAO/tests/Collocation_Opportunities/README b/TAO/tests/Collocation_Opportunities/README
deleted file mode 100644
index b5a02b94815..00000000000
--- a/TAO/tests/Collocation_Opportunities/README
+++ /dev/null
@@ -1,30 +0,0 @@
-# $Id$
-
-Description:
-
-A test for making sure the ORB avails all collocation opportunities it
-is presented with.
-
-This test has three collocated objects. The first object is
-collocated since the POA created this object and marked it
-collocated. In addition, endpoints in the object reference match the
-local endpoints and the servant is available.
-
-The second object is collocated since the POA created this object and
-marked it collocated. In addition, endpoints in the object reference
-match the local endpoints even though the servant is not available at
-the time the object was created.
-
-The third object is collocated even though the collocated flag set by
-the POA was lost when the second object was converted into a string
-and then back. Endpoints in the object reference match the local
-endpoints even though the servant is not available at the time the
-object was created.
-
-This test checks for POA currents to see if an upcall was collocated
-or remote. If remote, there will be only one POA current since the
-upcall will be handled by ORB Task thread. We ensure that the main
-thread does not handle the upcall by setting the
-ORBClientConnectionHandler option to RW. If collocated, there will be
-a <previous> POA current since the first POA current would be setup
-with a call to the <base> servant.
diff --git a/TAO/tests/Collocation_Opportunities/run_test.pl b/TAO/tests/Collocation_Opportunities/run_test.pl
deleted file mode 100755
index bb3e5277ea9..00000000000
--- a/TAO/tests/Collocation_Opportunities/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Collocation_Opportunities");
-}
-else {
- $T = new PerlACE::Process ("Collocation_Opportunities");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Collocation_Opportunities/svc.conf b/TAO/tests/Collocation_Opportunities/svc.conf
deleted file mode 100644
index 6e589381660..00000000000
--- a/TAO/tests/Collocation_Opportunities/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-static Client_Strategy_Factory "-ORBClientConnectionHandler RW"
diff --git a/TAO/tests/Collocation_Opportunities/test.idl b/TAO/tests/Collocation_Opportunities/test.idl
deleted file mode 100644
index 41f0d3e8e94..00000000000
--- a/TAO/tests/Collocation_Opportunities/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- void method ();
-};
diff --git a/TAO/tests/Collocation_Tests/.cvsignore b/TAO/tests/Collocation_Tests/.cvsignore
deleted file mode 100644
index 307259b4b57..00000000000
--- a/TAO/tests/Collocation_Tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Collocated_Test
diff --git a/TAO/tests/Collocation_Tests/Client_Task.cpp b/TAO/tests/Collocation_Tests/Client_Task.cpp
deleted file mode 100644
index 1b1e5ceed10..00000000000
--- a/TAO/tests/Collocation_Tests/Client_Task.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "TestC.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var tmp =
- this->corb_->string_to_object (input_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
diff --git a/TAO/tests/Collocation_Tests/Client_Task.h b/TAO/tests/Collocation_Tests/Client_Task.h
deleted file mode 100644
index 98ea06eca46..00000000000
--- a/TAO/tests/Collocation_Tests/Client_Task.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $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 char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Collocation_Tests/Collocated_Test.cpp b/TAO/tests/Collocation_Tests/Collocated_Test.cpp
deleted file mode 100644
index f807f7bf5b3..00000000000
--- a/TAO/tests/Collocation_Tests/Collocated_Test.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//$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 char *output = "test.ior";
-const char *input = "file://test.ior";
-// static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "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 sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (server_orb != client_orb)
- {
- corb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Collocation_Tests/Collocation_Tests.mpc b/TAO/tests/Collocation_Tests/Collocation_Tests.mpc
deleted file mode 100644
index a3b38d9513d..00000000000
--- a/TAO/tests/Collocation_Tests/Collocation_Tests.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Collocation_Tests): taoserver {
- exename = Collocated_Test
-}
diff --git a/TAO/tests/Collocation_Tests/Hello.cpp b/TAO/tests/Collocation_Tests/Hello.cpp
deleted file mode 100644
index 35bc75253ab..00000000000
--- a/TAO/tests/Collocation_Tests/Hello.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
- Hello::Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- 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 ();
-
- if (orb_table->find ("server_orb") == 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 (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // 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 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Collocation_Tests/Hello.h b/TAO/tests/Collocation_Tests/Hello.h
deleted file mode 100644
index ba9e6637812..00000000000
--- a/TAO/tests/Collocation_Tests/Hello.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS.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 (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-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/TAO/tests/Collocation_Tests/Server_Task.cpp b/TAO/tests/Collocation_Tests/Server_Task.cpp
deleted file mode 100644
index 85d842d34a0..00000000000
--- a/TAO/tests/Collocation_Tests/Server_Task.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TestS.h"
-#include "Hello.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Collocated_Test,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (this->sorb_.in (),
- ACE_Thread::self ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (hello.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Collocation_Tests/Server_Task.h b/TAO/tests/Collocation_Tests/Server_Task.h
deleted file mode 100644
index 60006aae0ba..00000000000
--- a/TAO/tests/Collocation_Tests/Server_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- 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 char *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 char *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/TAO/tests/Collocation_Tests/Test.idl b/TAO/tests/Collocation_Tests/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Collocation_Tests/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Collocation_Tests/run_test.pl b/TAO/tests/Collocation_Tests/run_test.pl
deleted file mode 100755
index c34197a9c57..00000000000
--- a/TAO/tests/Collocation_Tests/run_test.pl
+++ /dev/null
@@ -1,82 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("Collocated_Test");
-}
-else {
- $SV = new PerlACE::Process ("Collocated_Test");
-}
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with per-orb \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with no collocation \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation no");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in default mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n ");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in per-orb mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in no collocation mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Connect_Strategy_Test/.cvsignore b/TAO/tests/Connect_Strategy_Test/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Connect_Strategy_Test/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc b/TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc
deleted file mode 100644
index e64ad8d08a8..00000000000
--- a/TAO/tests/Connect_Strategy_Test/Connect_Strategy_Test.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Connect_Strategy_Test/Hello.cpp b/TAO/tests/Connect_Strategy_Test/Hello.cpp
deleted file mode 100644
index ca23555f202..00000000000
--- a/TAO/tests/Connect_Strategy_Test/Hello.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Connect_Strategy_Test,
- Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Connect_Strategy_Test/Hello.h b/TAO/tests/Connect_Strategy_Test/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/Connect_Strategy_Test/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Connect_Strategy_Test/README b/TAO/tests/Connect_Strategy_Test/README
deleted file mode 100644
index 06be22c2caa..00000000000
--- a/TAO/tests/Connect_Strategy_Test/README
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
-
-@page Connect_Strategy Test README File
-
- The simplest possible test for connection strategies in TAO.
-This is a very simple test for the connection strategies, and it can
-be argued that it is in fact too simple to make any conclusions based
-on the results from this test.
-
- Please refrain from "improving", extending or expanding this
-test, if you need to change
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Connect_Strategy_Test/Test.idl b/TAO/tests/Connect_Strategy_Test/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Connect_Strategy_Test/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Connect_Strategy_Test/blocked.conf b/TAO/tests/Connect_Strategy_Test/blocked.conf
deleted file mode 100644
index bb70bf3b8bb..00000000000
--- a/TAO/tests/Connect_Strategy_Test/blocked.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# $Id$
-#
-static Client_Strategy_Factory "-ORBConnectStrategy Blocked"
diff --git a/TAO/tests/Connect_Strategy_Test/blocked.conf.xml b/TAO/tests/Connect_Strategy_Test/blocked.conf.xml
deleted file mode 100644
index 3171e986573..00000000000
--- a/TAO/tests/Connect_Strategy_Test/blocked.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Connect_Strategy_Test/blocked.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="Client_Strategy_Factory" params="-ORBConnectStrategy Blocked"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Connect_Strategy_Test/client.cpp b/TAO/tests/Connect_Strategy_Test/client.cpp
deleted file mode 100644
index 07d0572d547..00000000000
--- a/TAO/tests/Connect_Strategy_Test/client.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Connect_Strategy_Test,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-int do_shutdown = 0;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'x':
- do_shutdown = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-x <do_shutdown>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- if (do_shutdown)
- {
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Connect_Strategy_Test/reactor.conf b/TAO/tests/Connect_Strategy_Test/reactor.conf
deleted file mode 100644
index 75f11aa8a40..00000000000
--- a/TAO/tests/Connect_Strategy_Test/reactor.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# $Id$
-#
-static Client_Strategy_Factory "-ORBConnectStrategy Reactive"
diff --git a/TAO/tests/Connect_Strategy_Test/reactor.conf.xml b/TAO/tests/Connect_Strategy_Test/reactor.conf.xml
deleted file mode 100644
index 1cb8ac86ea6..00000000000
--- a/TAO/tests/Connect_Strategy_Test/reactor.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Connect_Strategy_Test/reactor.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="Client_Strategy_Factory" params="-ORBConnectStrategy Reactive"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Connect_Strategy_Test/run_test.pl b/TAO/tests/Connect_Strategy_Test/run_test.pl
deleted file mode 100755
index c5797abb37e..00000000000
--- a/TAO/tests/Connect_Strategy_Test/run_test.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-ORBSvcConf reactor$PerlACE::svcconf_ext -k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-ORBSvcConf blocked$PerlACE::svcconf_ext -k file://$iorfile -x 1");
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-print STDERR "===== Base test, using LF \n";
-$client1 = $CL1->SpawnWaitKill (100);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-
-print STDERR "=================================== \n";
-print STDERR "===== Test, using reactor to connect \n";
-$client2 = $CL2->SpawnWaitKill (100);
-
-if ($client2 != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "========================================= \n";
-print STDERR "===== Test, using blocked connect strategy\n";
-$client3 = $CL3->SpawnWaitKill (100);
-
-if ($client3 != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Connect_Strategy_Test/server.cpp b/TAO/tests/Connect_Strategy_Test/server.cpp
deleted file mode 100644
index acd62195b16..00000000000
--- a/TAO/tests/Connect_Strategy_Test/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Connect_Strategy_Test,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Connection_Failure/.cvsignore b/TAO/tests/Connection_Failure/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Connection_Failure/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Connection_Failure/Connection_Failure.mpc b/TAO/tests/Connection_Failure/Connection_Failure.mpc
deleted file mode 100644
index 2e1ace5ef7a..00000000000
--- a/TAO/tests/Connection_Failure/Connection_Failure.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*client): taoclient {
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Connection_Failure/README b/TAO/tests/Connection_Failure/README
deleted file mode 100644
index 7ae5b95d45d..00000000000
--- a/TAO/tests/Connection_Failure/README
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
-
-@page Connection_Failure Test README File
-
-A simple test for connection failures. The client tries to connect to
-an non-existent server.
-
-*/
diff --git a/TAO/tests/Connection_Failure/client.cpp b/TAO/tests/Connection_Failure/client.cpp
deleted file mode 100644
index c9759652961..00000000000
--- a/TAO/tests/Connection_Failure/client.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/SystemException.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Connection_Failure,
- client,
- "$Id$")
-
-const char *ior =
- "corbaloc:iiop:192.3.47/10007/RandomObject";
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // First connection happens here..
- test::_narrow (tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::TRANSIENT, transient_exception)
- {
- // This exception is correct.
- ACE_DEBUG ((LM_DEBUG,
- "_narrow() to non-existent object failed correctly. Test succeeded.\n"));
- return 0;
- }
- ACE_ENDTRY;
-
- // Should not reach here.
- ACE_ERROR_RETURN ((LM_ERROR,
- "_narrow() succeeded to non-existent object when it should not have...\n"),
- -1);
-}
diff --git a/TAO/tests/Connection_Failure/run_test.pl b/TAO/tests/Connection_Failure/run_test.pl
deleted file mode 100755
index 16469fa132a..00000000000
--- a/TAO/tests/Connection_Failure/run_test.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$CL = new PerlACE::Process ("client", "");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Connection_Failure/test.idl b/TAO/tests/Connection_Failure/test.idl
deleted file mode 100644
index 0e52e7f2a6a..00000000000
--- a/TAO/tests/Connection_Failure/test.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
-};
diff --git a/TAO/tests/Connection_Purging/.cvsignore b/TAO/tests/Connection_Purging/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Connection_Purging/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Connection_Purging/Connection_Purging.mpc b/TAO/tests/Connection_Purging/Connection_Purging.mpc
deleted file mode 100644
index 321e97dff47..00000000000
--- a/TAO/tests/Connection_Purging/Connection_Purging.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, taoserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, taoclient {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Connection_Purging/README b/TAO/tests/Connection_Purging/README
deleted file mode 100644
index 8f8ec152c3b..00000000000
--- a/TAO/tests/Connection_Purging/README
+++ /dev/null
@@ -1,240 +0,0 @@
-# $Id$
-
-Connection Purging
-------------------
-
-The run_test.pl script tests the connection purging using the default
-transport protocol (iiop).
-
-Usage: run_test.pl [-u | -s]
- -u for UIOP
- -s for SHMIOP
-
-There are four configurator files, one for each strategy. Each configurator
-file sets the -ORBConnectionCacheMax to 10 and the
--ORBConnectionCachePurgePercentage to 30 (excluding client.null.conf).
-After 10 separate connections are made, 30% of the transport cache is
-purged in a way that corresponds to the chosen purging strategy.
-
-This test is very manual at this point (due to the lack of debug interface
-on the Transport Cache Manager). It relies on the debug output of level 1.
-Some time, we need to add a debug interface to allow for better (less
-manual) regression testing.
-
-Least Recently Used
--------------------
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 0 10
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54424> on 8
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc3990)
-TAO (17519|1) - Some stuff to send
-TAO (17519|1) - Some stuff to send
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 1 10
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54425> on 9
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4118)
-TAO (17520|1) - Some stuff to send
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 2 10
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54426> on 10
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4d50)
-TAO (17521|1) - Some stuff to send
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 3 10
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54427> on 11
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc42b0)
-TAO (17522|1) - Some stuff to send
-.
-.
-.
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 5 10
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54429> on 13
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4ff0)
-TAO (17524|1) - Some stuff to send
-TAO (17519|1) - Some stuff to send
-
-# Connection #1 (0xc3990) is used after the 5 new connection is made
-.
-.
-.
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 10 10
-TAO (17539|1) - Purging 3 of 10 cache entries
-TAO (17539|1) - Idle transport found in cache: 0xc4118
-TAO (17539|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17539|1) - Idle transport found in cache: 0xc4d50
-TAO (17539|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17539|1) - Idle transport found in cache: 0xc42b0
-TAO (17539|1) IIOP_Connection_Handler::handle_close (-1, 511)
-
-# Note that Connection #1 is not closed here
-
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54434> on 9
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4338)
-TAO (17529|1) - Some stuff to send
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 8 10
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54435> on 10
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xdbc10)
-TAO (17530|1) - Some stuff to send
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 9 10
-TAO (17539|1) IIOP connection to peer <132.200.200.10:54436> on 11
-TAO (17539|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xdd540)
-TAO (17531|1) - Some stuff to send
-TAO (17539|1) - TAO_Transport_Cache_Manager::fill_set_i - 10 10
-TAO (17539|1) - Purging 3 of 10 cache entries
-TAO (17539|1) - Idle transport found in cache: 0xc4e70
-TAO (17539|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17539|1) - Idle transport found in cache: 0xc4ff0
-TAO (17539|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17539|1) - Idle transport found in cache: 0xc3990
-TAO (17539|1) IIOP_Connection_Handler::handle_close (-1, 511)
-
-# Connection #1 (0xc3990)is the sixth transport closed (as is expected)
-.
-.
-.
-
-
-Least Frequently Used
----------------------
-TAO (17540|1) - TAO_Transport_Cache_Manager::fill_set_i - 0 10
-TAO (17540|1) IIOP connection to peer <132.200.200.10:54424> on 8
-TAO (17540|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc3990)
-TAO (17519|1) - Some stuff to send
-TAO (17519|1) - Some stuff to send
-
-# Connection #1 (0xc3990) is used twice upon creation
-
-TAO (17540|1) - TAO_Transport_Cache_Manager::fill_set_i - 1 10
-TAO (17540|1) IIOP connection to peer <132.200.200.10:54425> on 9
-TAO (17540|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4118)
-TAO (17520|1) - Some stuff to send
-TAO (17540|1) - TAO_Transport_Cache_Manager::fill_set_i - 2 10
-TAO (17540|1) IIOP connection to peer <132.200.200.10:54426> on 10
-TAO (17540|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4d50)
-TAO (17521|1) - Some stuff to send
-TAO (17540|1) - TAO_Transport_Cache_Manager::fill_set_i - 3 10
-TAO (17540|1) IIOP connection to peer <132.200.200.10:54427> on 11
-TAO (17540|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc42b0)
-TAO (17522|1) - Some stuff to send
-.
-.
-.
-TAO (17540|1) - TAO_Transport_Cache_Manager::fill_set_i - 10 10
-TAO (17540|1) - Purging 3 of 10 cache entries
-TAO (17540|1) - Idle transport found in cache: 0xc4118
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xc4d50
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xc42b0
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-.
-.
-.
-TAO (17540|1) - Purging 3 of 10 cache entries
-TAO (17540|1) - Idle transport found in cache: 0xc4e70
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xc4ff0
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xdb088
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-.
-.
-.
-TAO (17540|1) - Purging 3 of 10 cache entries
-TAO (17540|1) - Idle transport found in cache: 0xdb6f8
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xdb8a8
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xdc1e0
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-.
-.
-.
-TAO (17540|1) - Purging 3 of 10 cache entries
-TAO (17540|1) - Idle transport found in cache: 0xc4338
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xdbc10
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17540|1) - Idle transport found in cache: 0xdd540
-TAO (17540|1) IIOP_Connection_Handler::handle_close (-1, 511)
-.
-.
-.
-
-# Connection #1 (0xc3990) is never purged since was used more frequently
-# than any other connection
-
-First In First Out
-------------------
-TAO (17541|1) - TAO_Transport_Cache_Manager::fill_set_i - 0 10
-TAO (17541|1) IIOP connection to peer <132.200.200.10:54424> on 8
-TAO (17541|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc3990)
-TAO (17519|1) - Some stuff to send
-TAO (17519|1) - Some stuff to send
-TAO (17541|1) - TAO_Transport_Cache_Manager::fill_set_i - 1 10
-TAO (17541|1) IIOP connection to peer <132.200.200.10:54425> on 9
-TAO (17541|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4118)
-TAO (17520|1) - Some stuff to send
-TAO (17541|1) - TAO_Transport_Cache_Manager::fill_set_i - 2 10
-TAO (17541|1) IIOP connection to peer <132.200.200.10:54426> on 10
-TAO (17541|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4d50)
-TAO (17521|1) - Some stuff to send
-TAO (17541|1) - TAO_Transport_Cache_Manager::fill_set_i - 3 10
-TAO (17541|1) IIOP connection to peer <132.200.200.10:54427> on 11
-TAO (17541|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc42b0)
-TAO (17522|1) - Some stuff to send
-.
-.
-.
-TAO (17541|1) - Purging 3 of 10 cache entries
-TAO (17541|1) - Idle transport found in cache: 0xc3990
-TAO (17541|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17541|1) - Idle transport found in cache: 0xc4118
-TAO (17541|1) IIOP_Connection_Handler::handle_close (-1, 511)
-TAO (17541|1) - Idle transport found in cache: 0xc4d50
-TAO (17541|1) IIOP_Connection_Handler::handle_close (-1, 511)
-
-# Connection #1 (0xc3990) is purged first reguardless of its usage
-.
-.
-.
-
-NULL (no-op)
-------------
-TAO (17542|1) IIOP connection to peer <132.200.200.10:54424> on 8
-TAO (17542|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc3990)
-TAO (17519|1) - Some stuff to send
-TAO (17519|1) - Some stuff to send
-TAO (17542|1) IIOP connection to peer <132.200.200.10:54425> on 9
-TAO (17542|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4118)
-TAO (17520|1) - Some stuff to send
-TAO (17542|1) IIOP connection to peer <132.200.200.10:54426> on 10
-TAO (17542|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc4d50)
-TAO (17521|1) - Some stuff to send
-TAO (17542|1) IIOP connection to peer <132.200.200.10:54427> on 11
-TAO (17542|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xc42b0)
-TAO (17522|1) - Some stuff to send
-.
-.
-.
-TAO (17542|1) IIOP connection to peer <132.200.200.10:54443> on 27
-TAO (17542|1) - TAO_Transport_Cache_Manager::bind_i (0xffbeef34, 0xe5a58)
-TAO (17538|1) - Some stuff to send
-TAO (17542|1) IIOP_Connection_Handler::handle_close (8, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (9, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (10, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (11, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (12, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (13, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (14, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (15, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (16, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (17, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (18, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (19, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (20, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (21, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (22, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (23, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (24, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (25, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (26, 511)
-TAO (17542|1) IIOP_Connection_Handler::handle_close (27, 511)
-
-# No purging should take place at all
diff --git a/TAO/tests/Connection_Purging/client.cpp b/TAO/tests/Connection_Purging/client.cpp
deleted file mode 100644
index 3ef97cea443..00000000000
--- a/TAO/tests/Connection_Purging/client.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/Strategies/advanced_resource.h"
-
-const char *ior = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- int done = 0;
- test_var holder;
- for(int i = 0; !done; i++)
- {
- char number[64];
- ACE_CString iorfile(ior);
-
- ACE_OS::sprintf (number, ".%d", i);
- iorfile += number;
-
- if (ACE_OS::access(iorfile.c_str (), R_OK) == 0)
- {
- iorfile = "file://" + iorfile;
- CORBA::Object_var tmp =
- orb->string_to_object(iorfile.c_str () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil test reference <%s>\n",
- ior),
- 1);
- }
-
- test->send_stuff ("Some stuff to send" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK
-
- // Test for LFU strategy. The transport to any other
- // server should be removed before the first one.
- if (i == 0)
- {
- test->send_stuff ("Some stuff to send" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK
-
- holder = test;
- }
- else if (i == 5) // let a few go by before we reuse holder
- { // This will test the LRU strategy
- // This transport should be the 6th one
- // removed.
- if (!CORBA::is_nil(holder.in ()))
- {
- holder->send_stuff ("Some stuff to send" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK
- }
- }
- }
- else
- {
- done = 1;
- }
- }
-
- orb->shutdown (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Connection_Purging/client.fifo.conf b/TAO/tests/Connection_Purging/client.fifo.conf
deleted file mode 100644
index 7d94c63873c..00000000000
--- a/TAO/tests/Connection_Purging/client.fifo.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy fifo -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30"
diff --git a/TAO/tests/Connection_Purging/client.fifo.conf.xml b/TAO/tests/Connection_Purging/client.fifo.conf.xml
deleted file mode 100644
index 6cd6478682c..00000000000
--- a/TAO/tests/Connection_Purging/client.fifo.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Connection_Purging/client.fifo.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Advanced_Resource_Factory" params="-ORBConnectionPurgingStrategy fifo -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Connection_Purging/client.lfu.conf b/TAO/tests/Connection_Purging/client.lfu.conf
deleted file mode 100644
index 3c7eed6c16b..00000000000
--- a/TAO/tests/Connection_Purging/client.lfu.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy lfu -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30"
diff --git a/TAO/tests/Connection_Purging/client.lfu.conf.xml b/TAO/tests/Connection_Purging/client.lfu.conf.xml
deleted file mode 100644
index 36f43aa515a..00000000000
--- a/TAO/tests/Connection_Purging/client.lfu.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Connection_Purging/client.lfu.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Advanced_Resource_Factory" params="-ORBConnectionPurgingStrategy lfu -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Connection_Purging/client.lru.conf b/TAO/tests/Connection_Purging/client.lru.conf
deleted file mode 100644
index 03a9237697c..00000000000
--- a/TAO/tests/Connection_Purging/client.lru.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy lru -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30"
diff --git a/TAO/tests/Connection_Purging/client.lru.conf.xml b/TAO/tests/Connection_Purging/client.lru.conf.xml
deleted file mode 100644
index b6929bb102c..00000000000
--- a/TAO/tests/Connection_Purging/client.lru.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Connection_Purging/client.lru.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Advanced_Resource_Factory" params="-ORBConnectionPurgingStrategy lru -ORBConnectionCacheMax 10 -ORBConnectionCachePurgePercentage 30"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Connection_Purging/client.null.conf b/TAO/tests/Connection_Purging/client.null.conf
deleted file mode 100644
index dcb4c8ee4cf..00000000000
--- a/TAO/tests/Connection_Purging/client.null.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Advanced_Resource_Factory "-ORBConnectionPurgingStrategy null"
diff --git a/TAO/tests/Connection_Purging/client.null.conf.xml b/TAO/tests/Connection_Purging/client.null.conf.xml
deleted file mode 100644
index 35e362fd0cc..00000000000
--- a/TAO/tests/Connection_Purging/client.null.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Connection_Purging/client.null.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Advanced_Resource_Factory" params="-ORBConnectionPurgingStrategy null"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Connection_Purging/run_test.pl b/TAO/tests/Connection_Purging/run_test.pl
deleted file mode 100755
index 232eec1f955..00000000000
--- a/TAO/tests/Connection_Purging/run_test.pl
+++ /dev/null
@@ -1,80 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-$status = 0;
-$endopoint = "";
-$use_uiop = 0;
-$use_shmiop = 0;
-$server_count = 20;
-@SV = ();
-
-foreach $arg (@ARGV) {
- if ($arg eq "-h") {
- print "Usage: $0 [-u | -s]\n" .
- " -u for UIOP\n" .
- " -s for SHMIOP\n";
- exit(0);
- }
- elsif ($arg eq "-u") {
- $use_uiop = 1;
- }
- elsif ($arg eq "-s") {
- $use_shmiop = 1;
- }
-}
-
-for($i = 0; $i < $server_count; $i++) {
- if ($use_uiop) {
- $socket = PerlACE::LocalFile ("socket.$i");
- unlink $socket;
- $endpoint = "-ORBEndpoint uiop://$socket";
- }
- elsif ($use_shmiop) {
- $server_shmiop_conf = PerlACE::LocalFile ("server_shmiop$PerlACE::svcconf_ext");
- $endpoint = "-ORBEndpoint shmiop:// -ORBSvcConf $server_shmiop_conf";
- }
-
- unlink "$iorfile.$i";
-
- $SV[$i] = new PerlACE::Process ("server", "$endpoint -o $iorfile.$i");
- $SV[$i]->Spawn ();
-
- if (PerlACE::waitforfile_timed ("$iorfile.$i", 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile.$i>\n";
- $SV[$i]->Kill (); $SV[$i]->TimedWait (1);
- exit 1;
- }
-}
-
-foreach $conf ("client.lru$PerlACE::svcconf_ext", "client.lfu$PerlACE::svcconf_ext",
- "client.fifo$PerlACE::svcconf_ext", "client.null$PerlACE::svcconf_ext") {
- print "========== Client using $conf configurator file =========\n";
- $CL = new PerlACE::Process ("client", " -k $iorfile " .
- "-ORBSvcConf $conf ".
- "-ORBDebugLevel 1");
-
- $client = $CL->SpawnWaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-}
-
-for($i = 0; $i < $server_count; $i++) {
- $SV[$i]->Kill ();
- unlink "$iorfile.$i";
- unlink "socket.$i";
-}
-
-exit $status;
diff --git a/TAO/tests/Connection_Purging/server.cpp b/TAO/tests/Connection_Purging/server.cpp
deleted file mode 100644
index 0a9c8394ebf..00000000000
--- a/TAO/tests/Connection_Purging/server.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "tao/Strategies/advanced_resource.h"
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- test_i *test_impl;
- ACE_NEW_RETURN (test_impl,
- test_i (),
- 1);
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- test_var test =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- delete test_impl;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Connection_Purging/server_shmiop.conf b/TAO/tests/Connection_Purging/server_shmiop.conf
deleted file mode 100644
index 64e8f8656ea..00000000000
--- a/TAO/tests/Connection_Purging/server_shmiop.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# $Id$
-#
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop -MMAPFileSize 1000000"
diff --git a/TAO/tests/Connection_Purging/server_shmiop.conf.xml b/TAO/tests/Connection_Purging/server_shmiop.conf.xml
deleted file mode 100644
index 11b4d925774..00000000000
--- a/TAO/tests/Connection_Purging/server_shmiop.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Connection_Purging/server_shmiop.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop -MMAPFileSize 1000000"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Connection_Purging/test.idl b/TAO/tests/Connection_Purging/test.idl
deleted file mode 100644
index c5d7b77a2e1..00000000000
--- a/TAO/tests/Connection_Purging/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface test
-{
- void send_stuff(in string foo);
-
-// oneway void shutdown ();
-};
diff --git a/TAO/tests/Connection_Purging/test_i.cpp b/TAO/tests/Connection_Purging/test_i.cpp
deleted file mode 100644
index 48b6bc7ccb1..00000000000
--- a/TAO/tests/Connection_Purging/test_i.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-#include "test_i.h"
-
-void
-test_i::send_stuff (const char* string
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - %s\n", string));
-}
-
diff --git a/TAO/tests/Connection_Purging/test_i.h b/TAO/tests/Connection_Purging/test_i.h
deleted file mode 100644
index 2670a7a51d8..00000000000
--- a/TAO/tests/Connection_Purging/test_i.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef TEST_I_H
-#define TEST_I_H
-#include /**/ "ace/pre.h"
-
-#include "testS.h"
-
-class test_i
- : public virtual POA_test
-{
-public:
- // = The skeleton methods
- virtual void send_stuff (const char* string
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-};
-
-#include /**/ "ace/post.h"
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Connection_Timeout/.cvsignore b/TAO/tests/Connection_Timeout/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Connection_Timeout/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Connection_Timeout/Connection_Timeout.mpc b/TAO/tests/Connection_Timeout/Connection_Timeout.mpc
deleted file mode 100644
index 9d58f4e8439..00000000000
--- a/TAO/tests/Connection_Timeout/Connection_Timeout.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*client): taoserver, messaging {
- exename = client
- avoids += ace_for_tao
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Connection_Timeout/README b/TAO/tests/Connection_Timeout/README
deleted file mode 100644
index 05a7ee90273..00000000000
--- a/TAO/tests/Connection_Timeout/README
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-
-@page Connection_Timeout Test README File
-
- The simplest possible test for the proprietary
-Connection_Timeouts. This test sets the connection timeouts through a
-policy. The client tries to connect to an non-existent server. The
-timeout for the connection is controlled by the value supplied by that
-policy.
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Connection_Timeout/Test.idl b/TAO/tests/Connection_Timeout/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Connection_Timeout/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Connection_Timeout/client.cpp b/TAO/tests/Connection_Timeout/client.cpp
deleted file mode 100644
index 5a8556e908a..00000000000
--- a/TAO/tests/Connection_Timeout/client.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Profile_Timer.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(Connection_Timeout, client, "$Id$")
-
-const char *ior =
- "corbaloc:iiop:192.3.47/10007/RandomObject";
-
-ACE_Profile_Timer profile_timer;
-TimeBase::TimeT timeout_period = 1000000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-test_timeout (CORBA::Object_ptr object ACE_ENV_ARG_DECL)
-{
- // Start the timer
- profile_timer.start ();
-
- ACE_TRY
- {
- // First connection happens here..
- Test::Hello_var hello =
- Test::Hello::_narrow(object ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // Stop the timer
- profile_timer.stop ();
-
- // Get the elampsed time
- ACE_Profile_Timer::ACE_Elapsed_Time el;
- profile_timer.elapsed_time (el);
-
- // Give a 30% error margin for handling exceptions etc. It is a
- // high margin, though!. But the timeout is too small and wider
- // range would help.
-#if defined (ACE_LACKS_FLOATING_POINT) && (ACE_LACKS_FLOATING_POINT != 0)
- // The elapsed time is in usecs
- if (el.real_time > 200000)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) ERROR: Too long to timeout: %u \n",
- el.real_time),
- 1);
- }
- else
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Success, timeout: %u \n",
- el.real_time));
-#else
- // The elapsed time is in secs
- if (el.real_time > 0.200)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) ERROR: Too long to timeout: %F \n",
- el.real_time),
- 1);
- }
- else
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Success, timeout: %F \n",
- el.real_time));
-
-#endif /* ACE_LACKS_FLOATING_POINT == 1*/
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int retval = 1;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any timeout_as_any;
- timeout_as_any <<= timeout_period;
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (TAO::CONNECTION_TIMEOUT_POLICY_TYPE,
- timeout_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (CORBA::ULong l = 0;
- l != policy_list.length ();
- ++l)
- {
- policy_list[l]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- retval = test_timeout (tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
diff --git a/TAO/tests/Connection_Timeout/run_test.pl b/TAO/tests/Connection_Timeout/run_test.pl
deleted file mode 100755
index 8a5b5817f0f..00000000000
--- a/TAO/tests/Connection_Timeout/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("client", "");
-}
-else {
- $CL = new PerlACE::Process ("client", "");
-}
-
-$client = $CL->SpawnWaitKill (25);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Crash_On_Write/.cvsignore b/TAO/tests/Crash_On_Write/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Crash_On_Write/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Crash_On_Write/Crash_On_Write.mpc b/TAO/tests/Crash_On_Write/Crash_On_Write.mpc
deleted file mode 100644
index 2398d1eac4c..00000000000
--- a/TAO/tests/Crash_On_Write/Crash_On_Write.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Oneway_Receiver.cpp
- Crash_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Crash_On_Write/Crash_Task.cpp b/TAO/tests/Crash_On_Write/Crash_Task.cpp
deleted file mode 100644
index 6b6e9c7d896..00000000000
--- a/TAO/tests/Crash_On_Write/Crash_Task.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// $Id$
-//
-
-#include "Crash_Task.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Crash_On_Write, Crash_Task, "$Id$")
-
-Crash_Task::Crash_Task (ACE_Thread_Manager *thr_mgr,
- const ACE_Time_Value &running_time)
- : ACE_Task_Base (thr_mgr)
- , running_time_ (running_time)
-{
-}
-
-int
-Crash_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting crash task\n"));
- ACE_OS::sleep (this->running_time_);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Sleep done, crashing the server\n"));
- ACE_DEBUG ((LM_DEBUG, "%a"));
-
- return 0;
-}
diff --git a/TAO/tests/Crash_On_Write/Crash_Task.h b/TAO/tests/Crash_On_Write/Crash_Task.h
deleted file mode 100644
index d9a6953ac94..00000000000
--- a/TAO/tests/Crash_On_Write/Crash_Task.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CRASH_TASK_H
-#define CRASH_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Crash_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Crash_Task (ACE_Thread_Manager *thr_mgr,
- const ACE_Time_Value &running_time);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Total running time for each thread
- ACE_Time_Value running_time_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CRASH_TASK_H */
diff --git a/TAO/tests/Crash_On_Write/Oneway_Receiver.cpp b/TAO/tests/Crash_On_Write/Oneway_Receiver.cpp
deleted file mode 100644
index 59b0bcb3398..00000000000
--- a/TAO/tests/Crash_On_Write/Oneway_Receiver.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-// $Id$
-//
-#include "Oneway_Receiver.h"
-
-ACE_RCSID(Crash_On_Write, Oneway_Receiver, "$Id$")
-
-Oneway_Receiver::Oneway_Receiver (void)
-{
-}
-
-void
-Oneway_Receiver::receive_oneway (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/Crash_On_Write/Oneway_Receiver.h b/TAO/tests/Crash_On_Write/Oneway_Receiver.h
deleted file mode 100644
index fae5e073bae..00000000000
--- a/TAO/tests/Crash_On_Write/Oneway_Receiver.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAY_RECEIVER_H
-#define ONEWAY_RECEIVER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Oneway_Receiver interface
-class Oneway_Receiver
- : public virtual POA_Test::Oneway_Receiver
-{
-public:
- /// Constructor
- Oneway_Receiver (void);
-
- // = The skeleton methods
- virtual void receive_oneway (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAY_RECEIVER_H */
diff --git a/TAO/tests/Crash_On_Write/README b/TAO/tests/Crash_On_Write/README
deleted file mode 100644
index b674ec1d873..00000000000
--- a/TAO/tests/Crash_On_Write/README
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
-
-@page Crash_On_Write Test README File
-
- Test the behavior of the ORB when the server crashes in the
-middle of a write() operation. This is a regression test for:
-
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=678
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=856
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Crash_On_Write/Test.idl b/TAO/tests/Crash_On_Write/Test.idl
deleted file mode 100644
index d57fc69976f..00000000000
--- a/TAO/tests/Crash_On_Write/Test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /// An interface to send oneway messages
- interface Oneway_Receiver
- {
- /// Return a simple string
- oneway void receive_oneway ();
- };
-};
diff --git a/TAO/tests/Crash_On_Write/client.cpp b/TAO/tests/Crash_On_Write/client.cpp
deleted file mode 100644
index 92fc7daaf0b..00000000000
--- a/TAO/tests/Crash_On_Write/client.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Crash_On_Write, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int iterations = 2000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i iterations "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-single_iteration (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- oneway_receiver->receive_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_Time_Value tv (0, 40000);
- ACE_OS::sleep (tv);
- }
- ACE_CATCHANY
- {
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Receiver_var oneway_receiver =
- Test::Oneway_Receiver::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (oneway_receiver.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil process reference <%s>\n",
- ior),
- 1);
- }
-
- int normal_count = 0;
- int exception_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- int result = single_iteration (oneway_receiver.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result)
- exception_count++;
- else
- normal_count++;
-
- if (i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "Finished iteration %d\n", i));
- }
-
- if (exception_count == 0)
- ACE_ERROR ((LM_ERROR, "ERROR: no exceptions detected\n"));
-
- if (normal_count == 0)
- ACE_ERROR ((LM_ERROR, "ERROR: no request was succesful\n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Crash_On_Write/run_test.pl b/TAO/tests/Crash_On_Write/run_test.pl
deleted file mode 100755
index 28cfc0e71a7..00000000000
--- a/TAO/tests/Crash_On_Write/run_test.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-# The server crashes, therefore it normally exists with status != 0,
-# but a status of -1 would be a serious error.
-$server = $SV->WaitKill (60);
-
-if ($server == -10) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Crash_On_Write/server.cpp b/TAO/tests/Crash_On_Write/server.cpp
deleted file mode 100644
index 8c25517be99..00000000000
--- a/TAO/tests/Crash_On_Write/server.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// $Id$
-
-#include "Oneway_Receiver.h"
-#include "Crash_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Crash_On_Write, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Oneway_Receiver *oneway_receiver_impl;
- ACE_NEW_RETURN (oneway_receiver_impl,
- Oneway_Receiver,
- 1);
- PortableServer::ServantBase_var owner_transfer(oneway_receiver_impl);
-
- Test::Oneway_Receiver_var oneway_receiver =
- oneway_receiver_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (oneway_receiver.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a separate thread to crash the server.
- Crash_Task crash_task (ACE_Thread_Manager::instance (), ACE_Time_Value(20));
-
- if (crash_task.activate () == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating crash task\n"));
- return 1;
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /*NOTREACHED*/
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Crashed_Callback/.cvsignore b/TAO/tests/Crashed_Callback/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Crashed_Callback/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Crashed_Callback/Crashed_Callback.cpp b/TAO/tests/Crashed_Callback/Crashed_Callback.cpp
deleted file mode 100644
index c90594a4f2f..00000000000
--- a/TAO/tests/Crashed_Callback/Crashed_Callback.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// $Id$
-//
-#include "Crashed_Callback.h"
-
-ACE_RCSID(Crashed_Callback, Crashed_Callback, "$Id$")
-
-Crashed_Callback::Crashed_Callback (void)
-{
-}
-
-CORBA::Boolean
-Crashed_Callback::are_you_there (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 1;
-}
-
-void
-Crashed_Callback::crash_now_please (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Crashed_Callback - crashing application \n"));
-// Tru64 seems to hang and not abort and dump core when abort() is called
-// here. This needs further investigation. This fix is a temporary one.
-#if defined (DIGITAL_UNIX) || defined (DEC_CXX)
- ACE_OS::_exit();
-#else
- ACE_OS::abort();
-#endif
-
-}
-
-void
-Crashed_Callback::test_oneway (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/Crashed_Callback/Crashed_Callback.h b/TAO/tests/Crashed_Callback/Crashed_Callback.h
deleted file mode 100644
index 5a0614f1b74..00000000000
--- a/TAO/tests/Crashed_Callback/Crashed_Callback.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CRASHED_CALLBACK_CRASHED_CALLBACK_H
-#define CRASHED_CALLBACK_CRASHED_CALLBACK_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Crashed_Callback interface
-class Crashed_Callback
- : public virtual POA_Test::Crashed_Callback
-{
-public:
- /// Constructor
- Crashed_Callback (void);
-
- // = The skeleton methods
- virtual CORBA::Boolean are_you_there (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void crash_now_please (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void test_oneway (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#include /**/ "ace/post.h"
-#endif /* CRASHED_CALLBACK_CRASHED_CALLBACK_H */
diff --git a/TAO/tests/Crashed_Callback/Crashed_Callback.mpc b/TAO/tests/Crashed_Callback/Crashed_Callback.mpc
deleted file mode 100644
index 34711dbef67..00000000000
--- a/TAO/tests/Crashed_Callback/Crashed_Callback.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Service.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, portableserver, messaging {
- after += *Server
- Source_Files {
- Crashed_Callback.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Crashed_Callback/README b/TAO/tests/Crashed_Callback/README
deleted file mode 100644
index 3d94e37c2c5..00000000000
--- a/TAO/tests/Crashed_Callback/README
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-
-@page Crashed Callback Test README File
-
- On TAO-1.1.12 the ORB would dead-lock when trying to send a
-callback to a crashed server. As far as we know it only happens with
-reliable oneways.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Crashed_Callback/Service.cpp b/TAO/tests/Crashed_Callback/Service.cpp
deleted file mode 100644
index d4786b4fb6c..00000000000
--- a/TAO/tests/Crashed_Callback/Service.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// $Id$
-//
-#include "Service.h"
-
-ACE_RCSID(Crashed_Callback, Service, "$Id$")
-
-Service::Service (void)
- : test_count_ (0)
-{
-}
-
-void
-Service::dump_results (void)
-{
- if (this->test_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: no tests were completed!\n"));
- }
-}
-
-void
-Service::run_test (Test::Crashed_Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- int pre_crash_exceptions =
- this->call_are_you_there (callback ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- pre_crash_exceptions +=
- this->call_test_oneway (callback ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) - Service, calling crash_now_please\n"));
- callback->crash_now_please (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
-
- int pos_crash_exceptions =
- this->call_test_oneway (callback ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (pre_crash_exceptions != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: There were %d exceptions before crash\n"));
- }
-
- if (pos_crash_exceptions == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: There were no exceptions after crash\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "Good!! %d exceptions raised after crash\n",
- pos_crash_exceptions));
- }
-
- /// Increment the number of tests completed
- this->test_count_++;
-}
-
-int
-Service::call_are_you_there (Test::Crashed_Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Service, calling are_you_there\n"));
- const int iterations = 50;
-
- int exception_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- ACE_TRY
- {
- (void) callback->are_you_there (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- exception_count++;
- }
- ACE_ENDTRY;
- }
- return exception_count;
-}
-
-int
-Service::call_test_oneway (Test::Crashed_Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Service, calling test_oneway\n"));
- const int iterations = 50;
-
- int exception_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- ACE_TRY
- {
- (void) callback->test_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- exception_count++;
- }
- ACE_ENDTRY;
- }
- return exception_count;
-}
diff --git a/TAO/tests/Crashed_Callback/Service.h b/TAO/tests/Crashed_Callback/Service.h
deleted file mode 100644
index 6f4de205f13..00000000000
--- a/TAO/tests/Crashed_Callback/Service.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef CRASHED_CALLBACK_SERVICE_H
-#define CRASHED_CALLBACK_SERVICE_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Service interface
-class Service
- : public virtual POA_Test::Service
-{
-public:
- /// Constructor
- Service (void);
-
- /// Dump the results.
- /**
- * In case of failure this exposes any incomplete runs.
- */
- void dump_results (void);
-
- // = The skeleton methods
- virtual void run_test (Test::Crashed_Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Call the are_you_there callback multiple times.
- /**
- * @return Number of exceptions raised
- */
- int call_are_you_there (Test::Crashed_Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (());
-
- /// Call the test_oneway method mutiple times.
- /**
- * @return Number of exceptions raised
- */
- int call_test_oneway (Test::Crashed_Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (());
-
-private:
- /// Count the number of tests executed
- int test_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* CRASHED_CALLBACK_SERVICE_H */
diff --git a/TAO/tests/Crashed_Callback/Test.idl b/TAO/tests/Crashed_Callback/Test.idl
deleted file mode 100644
index d81f1f3638a..00000000000
--- a/TAO/tests/Crashed_Callback/Test.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /**
- * Callback interface used to test the behavior of the ORB under
- * crashes.
- */
- interface Crashed_Callback
- {
- /// Make sure the callback object is still in good shape
- /**
- * The server needs to verify that at least some requests worked
- * before trying to test the behavior of the ORB after a crash.
- */
- boolean are_you_there ();
-
- /// Force an abort() on the process implementing the callback
- /// interface
- oneway void crash_now_please ();
-
- /// Receive the first callback
- oneway void test_oneway ();
- };
-
- /**
- * Clients connect to this interface passing in a Crashed_Callback
- * object.
- * The service will then invoke all the methods on the
- * Crashed_Callback, and verify that only exceptions are raised
- * after invoking @c crash_now_please()
- *
- */
- interface Service
- {
- /// Invoke the callback object from the server
- oneway void run_test (in Crashed_Callback the_callback);
- };
-
-};
diff --git a/TAO/tests/Crashed_Callback/client.cpp b/TAO/tests/Crashed_Callback/client.cpp
deleted file mode 100644
index 4f020c7d89c..00000000000
--- a/TAO/tests/Crashed_Callback/client.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-// $Id$
-
-#include "Crashed_Callback.h"
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Crashed_Callback, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Make all oneways "reliable."
- {
- CORBA::Object_var manager_object =
- orb->resolve_initial_references("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow(manager_object.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_manager.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil PolicyManager\n"),
- 1);
- CORBA::Any policy_value;
- policy_value <<= Messaging::SYNC_WITH_SERVER;
- CORBA::PolicyList policies(1); policies.length(1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Service_var service =
- Test::Service::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (service.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil service reference <%s>\n",
- ior),
- 1);
- }
-
- Crashed_Callback *crashed_callback_impl;
- ACE_NEW_RETURN (crashed_callback_impl,
- Crashed_Callback,
- 1);
- PortableServer::ServantBase_var owner_transfer(crashed_callback_impl);
-
- Test::Crashed_Callback_var crashed_callback =
- crashed_callback_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- service->run_test (crashed_callback.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Crashed_Callback/run_test.pl b/TAO/tests/Crashed_Callback/run_test.pl
deleted file mode 100755
index 4fbbc680ff2..00000000000
--- a/TAO/tests/Crashed_Callback/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-# The client crashes, therefore it normally exists with status != 0,
-# but a status of -1 would be a serious error.
-if ($client == -1) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Crashed_Callback/server.cpp b/TAO/tests/Crashed_Callback/server.cpp
deleted file mode 100644
index 11b8a975a14..00000000000
--- a/TAO/tests/Crashed_Callback/server.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-// $Id$
-
-#include "Service.h"
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Crashed_Callback, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Make all oneways "reliable."
- {
- CORBA::Object_var manager_object =
- orb->resolve_initial_references("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow(manager_object.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_manager.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil PolicyManager\n"),
- 1);
- CORBA::Any policy_value;
- policy_value <<= Messaging::SYNC_WITH_SERVER;
- CORBA::PolicyList policies(1); policies.length(1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Service *service_impl;
- ACE_NEW_RETURN (service_impl,
- Service,
- 1);
- PortableServer::ServantBase_var owner_transfer(service_impl);
-
- Test::Service_var service =
- service_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (service.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (50, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished\n"));
-
- service_impl->dump_results ();
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp b/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp
deleted file mode 100644
index f7c3f321248..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-//
-// $Id$
-//
-
-#include "tao/DynamicInterface/Request.h" /* This must come first for
- G++ 3.4 or better */
-#include "Client_Task.h"
-#include "TestC.h"
-#include "tao/Object.h"
-
-ACE_RCSID(DII_Collocation_Tests, Client_Task, "$Id$")
-
-char TEST_STR[] = "This is a DII collocation test.";
-CORBA::Long TEST_BASIC_VALUE = 12345;
-CORBA::Char TEST_SPECIAL_VALUE = 'x';
-CORBA::Short TEST_HOUR = 12;
-CORBA::Short TEST_MINUTE = 59;
-CORBA::Short TEST_SECOND = 59;
-
-Client_Task::Client_Task (const char *ior,
- const char *simple_test_ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , input_ (ior)
- , simple_test_input_ (simple_test_ior)
- , corb_ (CORBA::ORB::_duplicate (corb))
- , error_count_ (0)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var obj =
- this->corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (obj.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- input_),
- 1);
- }
-
- CORBA::Object_var simple_test_obj =
- this->corb_->string_to_object (simple_test_input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (simple_test_obj.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Simple_Test reference <%s>\n",
- simple_test_input_),
- 1);
- }
-
- Test::Simple_Test_var simple_test
- = Test::Simple_Test::_narrow (simple_test_obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Request_var req (obj->_request ("test_basic_arg" ACE_ENV_ARG_PARAMETER));
- ACE_TRY_CHECK;
- req->add_in_arg ("basic") <<= TEST_BASIC_VALUE;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_unbounded_string_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("ub_string") <<= TEST_STR;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_bounded_string_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_CString bs (TEST_STR);
- bs = bs.substr (0, ::Test::BOUNDED_STRING_SIZE);
-
- req->add_in_arg ("bd_string")
- <<= CORBA::Any::from_string (bs.c_str (), ::Test::BOUNDED_STRING_SIZE);
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_fixed_array_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::Fixed_Array fixed_array;
-
- for (CORBA::ULong m = 0 ; m < ::Test::FIX_ARRAY_SIZE; m ++)
- {
- fixed_array[m] = m + 999;
- }
-
- req->add_in_arg ("fixed_array") <<= ::Test::Fixed_Array_forany (fixed_array);
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_var_array_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::Var_Array var_array;
-
- for (CORBA::ULong i = 0; i < ::Test::VAR_ARRAY_SIZE; ++i)
- {
- var_array[i] = CORBA::string_dup(TEST_STR);
- }
-
- req->add_in_arg ("var_array") <<= var_array;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_bounded_var_size_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_CString bvs (TEST_STR);
- bvs = bvs.substr (0, ::Test::BOUNDED_VAR_SIZE);
-
- ::Test::Bounded_Var_Size_Arg* bd_var_size
- = new ::Test::Bounded_Var_Size_Arg();
-
- bd_var_size->replace (::Test::BOUNDED_VAR_SIZE,
- const_cast <CORBA::Char*> (bvs.c_str ()));
-
- req->add_in_arg ("bd_var_size") <<= bd_var_size;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_unbounded_var_size_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::Unbounded_Var_Size_Arg* ub_var_size
- = new ::Test::Unbounded_Var_Size_Arg();
- ub_var_size->replace (ub_var_size->maximum (),
- ACE_OS::strlen (TEST_STR),
- TEST_STR);
-
- req->add_in_arg ("ub_var_size") <<= ub_var_size;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_fixed_size_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::TimeOfDay t;
- t.hour = TEST_HOUR;
- t.minute = TEST_MINUTE;
- t.second = TEST_SECOND;
-
- req->add_in_arg ("fixed_size") <<= t;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_special_basic_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("special") <<= CORBA::Any::from_char (TEST_SPECIAL_VALUE);
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_object_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("object") <<= simple_test_obj.in ();
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_objref_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("objref") <<= simple_test.in ();
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_args_1"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("arg1") <<= simple_test_obj.in ();
- req->add_in_arg ("arg2") <<= CORBA::Any::from_char (TEST_SPECIAL_VALUE);
- req->add_in_arg ("arg3") <<= simple_test.in ();
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_args_2"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("arg1") <<= TEST_STR;
- req->add_in_arg ("arg2") <<= ::Test::Fixed_Array_forany (fixed_array);
- req->add_in_arg ("arg3") <<= t;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_args_3"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- bd_var_size
- = new ::Test::Bounded_Var_Size_Arg();
- bd_var_size->replace (::Test::BOUNDED_VAR_SIZE,
- const_cast <CORBA::Char*> (bvs.c_str ()));
-
- ub_var_size
- = new ::Test::Unbounded_Var_Size_Arg();
- ub_var_size->replace (ub_var_size->maximum (),
- ACE_OS::strlen (TEST_STR),
- TEST_STR);
-
- for (CORBA::ULong j = 0; j < ::Test::VAR_ARRAY_SIZE; ++j)
- {
- var_array[j] = CORBA::string_dup(TEST_STR);
- }
-
- req->add_in_arg ("arg1")
- <<= CORBA::Any::from_string (bs.c_str (), ::Test::BOUNDED_STRING_SIZE);
-
- req->add_in_arg ("arg2") <<= bd_var_size;
- req->add_in_arg ("arg3") <<= ub_var_size;
- req->add_in_arg ("arg4") <<= var_array;
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("shutdown"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- }
- ACE_CATCHANY
- {
- error_count_ ++;
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_CATCHALL
- {
- error_count_ ++;
- ACE_ERROR ((LM_ERROR, "(%P|%t)Client_Task::svc - caught unknown exception \n"));
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-CORBA::ULong
-Client_Task::error_count () const
-{
- return error_count_;
-}
-
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.h b/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.h
deleted file mode 100644
index 2659536d7ad..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $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 char *input,
- const char *simple_test_ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- CORBA::ULong error_count () const;
-
-private:
- const char *input_;
- const char *simple_test_input_;
-
- CORBA::ORB_var corb_;
- CORBA::ULong error_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Collocated_Test.cpp b/TAO/tests/DII_Collocation_Tests/oneway/Collocated_Test.cpp
deleted file mode 100644
index 3e2bab6c3fc..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Collocated_Test.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-//$Id$
-
-// This include is needed for static builds to initialize DII_Arguments_Converter
-// service object.
-//#include "tao/DynamicInterface/DII_Arguments_Converter_Impl.h"
-
-#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 char *output = "server.ior";
-const char *input = "file://server.ior";
-const char *simple_test_output = "simple_test.ior";
-const char *simple_test_input = "file://simple_test.ior";
-// static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-
-CORBA::Boolean debug = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o:nd");
- 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 'd':
- debug = 1;
- break;
- case '?':
- default:
- // This is a hack but that is okay!
- return 0;
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event me;
- Server_Task server_task (output,
- simple_test_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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (input,
- simple_test_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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (server_orb != client_orb)
- {
- corb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- CORBA::ULong errors = client_task.error_count () + server_task.error_count ();
- if (errors == 0)
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t) test passed\n"));
- }
- else
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t) test failed - error_count=%u\n", errors));
- return 1;
- }
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/DII_Collocation_Tests.mpc b/TAO/tests/DII_Collocation_Tests/oneway/DII_Collocation_Tests.mpc
deleted file mode 100644
index afa9884eed8..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/DII_Collocation_Tests.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*oneway) : taoserver, dynamicinterface, minimum_corba{
- exename = Collocated_Test
-}
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp b/TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp
deleted file mode 100644
index dc2030bf61e..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp
+++ /dev/null
@@ -1,397 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(DII_Collocation_Tests, Hello, "$Id$")
-
-extern CORBA::Boolean debug;
-extern char TEST_STR[];
-extern CORBA::Long TEST_BASIC_VALUE;
-extern CORBA::Char TEST_SPECIAL_VALUE;
-extern CORBA::Short TEST_HOUR;
-extern CORBA::Short TEST_MINUTE;
-extern CORBA::Short TEST_SECOND;
-
-#define ERROR_COUNT(message) \
-{ error_count_ ++; \
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)%s - failed error_count = %u\n"), \
- message, error_count_)); \
-}
-
-// Implementation skeleton constructor
-Test_Simple_Test_i::Test_Simple_Test_i (void)
-{
-}
-
-// Implementation skeleton destructor
-Test_Simple_Test_i::~Test_Simple_Test_i (void)
-{
-}
-
-void Test_Simple_Test_i::test_method (
- ::CORBA::ULong & error_count
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- error_count --;
-}
-
-Hello::Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
- , error_count_ (0)
-{
-}
-
-void
-Hello::test_basic_arg (
- ::CORBA::Long basic
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (basic != TEST_BASIC_VALUE)
- ERROR_COUNT ("Hello::test_basic_arg")
-}
-
-void
-Hello::test_unbounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_unbounded_string_arg ")
- ACE_TEXT("got unbounded string: %s\n"),
- message));
- if (ACE_OS::strncmp (message, TEST_STR, strlen (TEST_STR) != 0))
- {
- ERROR_COUNT ("Hello::test_unbounded_string_arg")
- }
-}
-
-
-void
-Hello::test_bounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_bounded_string_arg ")
- ACE_TEXT("got bounded string: %s\n"),
- message));
- if (ACE_OS::strncmp (message, TEST_STR, ::Test::BOUNDED_STRING_SIZE) != 0)
- {
- ERROR_COUNT ("Hello::test_bounded_string_arg")
- }
-}
-
-
-void
-Hello::test_fixed_array_arg(const ::Test::Fixed_Array message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- for (unsigned i = 0; i < ::Test::FIX_ARRAY_SIZE; i++)
- {
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_fixed_array_arg ")
- ACE_TEXT("got fixed array: %d\n"),
- message[i]));
- if (message[i] != static_cast<CORBA::Long> (i + 999))
- ERROR_COUNT ("Hello::test_fixed_array_arg")
- }
-}
-
-
-void
-Hello::test_bounded_var_size_arg(const ::Test::Bounded_Var_Size_Arg& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_bounded_var_size_arg ")
- ACE_TEXT("got bounded var size arg\n")));
- if (ACE_OS::strncmp (message.get_buffer (), TEST_STR, ::Test::BOUNDED_VAR_SIZE) != 0)
- ERROR_COUNT ("Hello::test_bounded_var_size_arg")
-}
-
-
-void
-Hello::test_unbounded_var_size_arg(const ::Test::Unbounded_Var_Size_Arg& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_unbounded_var_size_arg ")
- ACE_TEXT("got unbounded var size arg.\n")));
- if (ACE_OS::strncmp (message.get_buffer (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_unbounded_var_size_arg")
-}
-
-
-void
-Hello::test_fixed_size_arg(const ::Test::TimeOfDay& t
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_fixed_size_arg ")
- ACE_TEXT("got timeofday: %d:%d:%d\n"),
- t.hour, t.minute, t.second));
-
- if (t.hour != TEST_HOUR
- || t.minute != TEST_MINUTE
- || t.second != TEST_SECOND)
- ERROR_COUNT ("Hello::test_fixed_size_arg")
-}
-
-
-void
-Hello::test_var_array_arg(const Test::Var_Array messages
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- for (CORBA::ULong i = 0; i != ::Test::VAR_ARRAY_SIZE; i ++)
- {
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_var_array_arg ")
- ACE_TEXT("messages[%d] = %s \n"), i, messages[i].in ()));
- if (ACE_OS::strncmp (messages[i].in (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_var_array_arg")
- }
-}
-
-
-void
-Hello::test_special_basic_arg(CORBA::Char value
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_special_basic_arg ")
- ACE_TEXT(" got special basic arg: %c \n"), value));
- if (value != TEST_SPECIAL_VALUE)
- ERROR_COUNT ("Hello::test_special_basic_arg")
-}
-
-
-void Hello::test_objref_arg (
- ::Test::Simple_Test_ptr test
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_objref_arg \n")));
-
- if (CORBA::is_nil (test))
- ERROR_COUNT ("Hello::test_objref_arg")
- else
- {
- // Increment the error_count before calling test_method() and decrement
- // the error_count when the server handling the test_method() call.
- CORBA::ULong error_count = 0;
- error_count ++;
- test->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (error_count != 0)
- {
- ERROR_COUNT ("Hello::test_objref_arg")
- }
- }
-}
-
-void Hello::test_object_arg (
- ::CORBA::Object_ptr o
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_object_arg \n")));
- ::Test::Simple_Test_var simple_test = ::Test::Simple_Test::_narrow (o);
-
- CORBA::ULong error_count = 0;
- error_count ++;
- simple_test->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (error_count != 0)
- {
- ERROR_COUNT ("Hello::test_object_arg")
- }
-}
-
-void Hello::test_args_1 (
- ::CORBA::Object_ptr arg1,
- ::CORBA::Char arg2,
- ::Test::Simple_Test_ptr arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_1 \n")));
- ::Test::Simple_Test_var simple_test = ::Test::Simple_Test::_narrow (arg1);
-
- CORBA::ULong error_count = 0;
- error_count ++;
- simple_test->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- error_count ++;
- arg3->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (error_count != 0)
- {
- ERROR_COUNT ("Hello::test_args_1")
- }
-
- if (arg2 != TEST_SPECIAL_VALUE)
- ERROR_COUNT ("Hello::test_args_1")
-}
-
-void Hello::test_args_2 (
- const char * arg1,
- const ::Test::Fixed_Array arg2,
- const ::Test::TimeOfDay & arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_2 \n")));
- if (ACE_OS::strncmp (arg1, TEST_STR, strlen (TEST_STR)) != 0 )
- ERROR_COUNT ("Hello::test_args_2")
-
- for (unsigned i = 0; i < ::Test::FIX_ARRAY_SIZE; i++)
- {
- if (arg2[i] != static_cast<CORBA::Long> (i + 999))
- ERROR_COUNT ("Hello::test_args_2")
- }
-
- if (arg3.hour != TEST_HOUR
- || arg3.minute != TEST_MINUTE
- || arg3.second != TEST_SECOND)
- ERROR_COUNT ("Hello::test_args_2")
-}
-
-void Hello::test_args_3 (
- const char * arg1,
- const ::Test::Bounded_Var_Size_Arg & arg2,
- const ::Test::Unbounded_Var_Size_Arg & arg3,
- const ::Test::Var_Array arg4
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_3 \n")));
- if (ACE_OS::strncmp (arg1, TEST_STR, strlen (arg1)) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- if (ACE_OS::strncmp (arg2.get_buffer (), TEST_STR, ::Test::BOUNDED_VAR_SIZE) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- if (ACE_OS::strncmp (arg3.get_buffer (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- for (CORBA::ULong i = 0; i != ::Test::VAR_ARRAY_SIZE; i ++)
- {
- if (ACE_OS::strncmp (arg4[i].in (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- }
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Upcall in process ..\n"));
-
- if (ACE_Thread::self () == this->thr_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 ();
-
- if (orb_table->find ("server_orb") == 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!");
-}
-
-char *
-Hello::test_unbounded_string (
- const char * s1,
- char *& s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- char *retstr = CORBA::string_dup (s1);
- s3 = CORBA::string_dup (s1);
- char *tmp = CORBA::string_alloc (2*ACE_OS::strlen (s2));
- ACE_OS::sprintf (tmp, "%s%s", s2, s2);
- CORBA::string_free (s2);
- s2 = tmp;
- return retstr;
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // 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 ACE_ENV_ARG_PARAMETER);
-}
-
-CORBA::ULong Hello::error_count () const
-{
- return error_count_;
-}
-
-
-
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Hello.h b/TAO/tests/DII_Collocation_Tests/oneway/Hello.h
deleted file mode 100644
index 8dde8446d54..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Hello.h
+++ /dev/null
@@ -1,207 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS.h"
-
-class Test_Simple_Test_i
- : public virtual POA_Test::Simple_Test
-{
-public:
- //Constructor
- Test_Simple_Test_i (void);
-
- //Destructor
- virtual ~Test_Simple_Test_i (void);
-
- virtual
- void test_method (
- ::CORBA::ULong & error_count
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-};
-
-/// 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
- void test_basic_arg (
- ::CORBA::Long basic
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_unbounded_string_arg (
- const char * message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_bounded_string_arg (
- const char * message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_fixed_array_arg (
- const ::Test::Fixed_Array message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_var_array_arg (
- const ::Test::Var_Array messages
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_bounded_var_size_arg (
- const ::Test::Bounded_Var_Size_Arg & message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_unbounded_var_size_arg (
- const ::Test::Unbounded_Var_Size_Arg & message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_fixed_size_arg (
- const ::Test::TimeOfDay & t
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_special_basic_arg (
- ::CORBA::Char value
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_objref_arg (
- ::Test::Simple_Test_ptr test
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_object_arg (
- ::CORBA::Object_ptr o
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_args_1 (
- ::CORBA::Object_ptr arg1,
- ::CORBA::Char arg2,
- ::Test::Simple_Test_ptr arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_args_2 (
- const char * arg1,
- const ::Test::Fixed_Array arg2,
- const ::Test::TimeOfDay & arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_args_3 (
- const char * arg1,
- const ::Test::Bounded_Var_Size_Arg & arg2,
- const ::Test::Unbounded_Var_Size_Arg & arg3,
- const ::Test::Var_Array arg4
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual
- char * test_unbounded_string (
- const char * s1,
- char *& s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::ULong error_count () const;
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- ACE_thread_t thr_id_;
-
- CORBA::ULong error_count_;
-};
-
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/README b/TAO/tests/DII_Collocation_Tests/oneway/README
deleted file mode 100644
index cc947507808..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/README
+++ /dev/null
@@ -1,55 +0,0 @@
-# $Id$
-
-Description:
-This test is used to test the bug fix on collocated dii oneway request
-invocation via send_oneway() crash on get_in_arg() when the request has multiple
-"IN" parameters.
-
-The test.idl defines oneway operations with all sorts SArgument to test the
-conversion of the DII parameters in NVList to the list of arguments.
-It also defines the operations with multiple "IN" arguments to test the
-bug fix.
-
-
-This test is a modification of the Collocation_Tests. The big difference is
-this test invokes the oneway operations using DII while the Collocation_Tests
-invoke a simple twoway operations.
-
-
-Usage:
-=====
-
-The run_test.pl runs several test cases listed below. The test result will be printed
-after the test completes. To debug the test failure, the operation "-d" can be passed
-to have verbose log.
-
-
-======== Running in Default Mode
-
-Collocated_Test -o test.ior -k file://test.ior
-
-
-======== Running with per-orb
-
-Collocated_Test -o test.ior -k file://test.ior -ORBCollocation per-orb
-
-
-======== Running with no collocation
-
-Collocated_Test -o test.ior -k file://test.ior -ORBCollocation no
-
-
-======== Running in default mode and two ORBS
-
-Collocated_Test -o test.ior -k file://test.ior -n
-
-
-======== Running in per-orb mode and two ORBS
-
-Collocated_Test -o test.ior -k file://test.ior -n -ORBCollocation per-orb
-
-
-======== Running in no collocation mode and two ORBS
-
-Collocated_Test -o test.ior -k file://test.ior -n -ORBCollocation per-orb
-
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Server_Task.cpp b/TAO/tests/DII_Collocation_Tests/oneway/Server_Task.cpp
deleted file mode 100644
index 15754f7aaf3..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Server_Task.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TestS.h"
-#include "Hello.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(DII_Collocation_Tests,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *output,
- const char *simple_test_output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , output_ (output)
- , simple_test_output_ (simple_test_output)
- , me_ (me)
- , sorb_ (CORBA::ORB::_duplicate (sorb))
- , error_count_ (0)
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (this->sorb_.in (),
- ACE_Thread::self ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (hello.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // 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 Hello IOR: %s",
- this->output_),
- 1);
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- Test_Simple_Test_i *simple_impl;
- ACE_NEW_RETURN (simple_impl,
- Test_Simple_Test_i (),
- 1);
-
- PortableServer::ServantBase_var owner_transfer_simple(simple_impl);
-
- Test::Simple_Test_var simple_test =
- simple_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var simple_test_ior =
- this->sorb_->object_to_string (simple_test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <this->output_>
- FILE *simple_test_output_file= ACE_OS::fopen (this->simple_test_output_,
- "w");
- if (simple_test_output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing Simple_Test IOR: %s",
- this->simple_test_output_),
- 1);
-
- ACE_OS::fprintf (simple_test_output_file, "%s", simple_test_ior.in ());
- ACE_OS::fclose (simple_test_output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - verifing results\n"));
-
- CORBA::ULong errors = hello_impl->error_count ();
-
- error_count_ += errors;
- }
- ACE_CATCHANY
- {
- error_count_ ++;
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_CATCHALL
- {
- error_count_ ++;
- ACE_ERROR ((LM_ERROR, "(%P|%t)Server_Task::svc - caught unknown exception \n"));
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-CORBA::ULong
-Server_Task::error_count () const
-{
- return error_count_;
-}
-
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Server_Task.h b/TAO/tests/DII_Collocation_Tests/oneway/Server_Task.h
deleted file mode 100644
index ca7b9090ea5..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Server_Task.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// -*- 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 char *output,
- const char *simple_test_output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- CORBA::ULong error_count () const;
-
-private:
- /// Output file for server IOR
- const char *output_;
-
- /// Output file for Simple_Test IOR
- const char *simple_test_output_;
-
- /// Manual event to wake up the main thread to create a client
- /// thread.
- ACE_Manual_Event &me_;
-
- CORBA::ORB_var sorb_;
-
- CORBA::ULong error_count_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Test.idl b/TAO/tests/DII_Collocation_Tests/oneway/Test.idl
deleted file mode 100644
index 3bd69e1642a..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/Test.idl
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- const unsigned long FIX_ARRAY_SIZE = 10;
- const unsigned long VAR_ARRAY_SIZE = 3;
- const unsigned long BOUNDED_STRING_SIZE = 10;
- const unsigned long BOUNDED_VAR_SIZE = 10;
-
- typedef sequence<char, BOUNDED_VAR_SIZE> Bounded_Var_Size_Arg;
- typedef sequence<char> Unbounded_Var_Size_Arg;
- typedef long Fixed_Array[FIX_ARRAY_SIZE];
- typedef string Var_Array [VAR_ARRAY_SIZE];
-
- struct TimeOfDay {
- short hour; // 0 - 23
- short minute; // 0 - 59
- short second; // 0 - 59
- };
-
- interface Simple_Test
- {
- void test_method(inout unsigned long error_count);
- };
-
- /// A very simple interface
- interface Hello
- {
- oneway void test_basic_arg(in long value);
-
- oneway void test_unbounded_string_arg(in string message);
-
- oneway void test_bounded_string_arg(in string<BOUNDED_STRING_SIZE> message);
-
- oneway void test_fixed_array_arg(in Fixed_Array message);
-
- oneway void test_var_array_arg(in Var_Array messages);
-
- oneway void test_bounded_var_size_arg(in Bounded_Var_Size_Arg message);
-
- oneway void test_unbounded_var_size_arg(in Unbounded_Var_Size_Arg message);
-
- oneway void test_fixed_size_arg (in TimeOfDay t);
-
- oneway void test_special_basic_arg(in char value);
-
- oneway void test_objref_arg (in Simple_Test test);
-
- oneway void test_object_arg (in Object o);
-
- oneway void test_args_1 (in Object arg1,
- in char arg2,
- in Simple_Test arg3);
-
- oneway void test_args_2 (in string arg1,
- in Fixed_Array arg2,
- in TimeOfDay arg3);
-
- oneway void test_args_3 (in string<BOUNDED_STRING_SIZE> arg1,
- in Bounded_Var_Size_Arg arg2,
- in Unbounded_Var_Size_Arg arg3,
- in Var_Array arg4);
-
- /// 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/TAO/tests/DII_Collocation_Tests/oneway/run_test.pl b/TAO/tests/DII_Collocation_Tests/oneway/run_test.pl
deleted file mode 100755
index 592179ac316..00000000000
--- a/TAO/tests/DII_Collocation_Tests/oneway/run_test.pl
+++ /dev/null
@@ -1,77 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("Collocated_Test");
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with per-orb \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with no collocation \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation no");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in default mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n ");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in per-orb mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in no collocation mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp b/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp
deleted file mode 100644
index f4bbfe757e4..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp
+++ /dev/null
@@ -1,289 +0,0 @@
-//
-// $Id$
-//
-
-#include "tao/DynamicInterface/Request.h" /* This must come first for
- G++ 3.4 or better */
-#include "Client_Task.h"
-#include "TestC.h"
-#include "tao/Object.h"
-
-ACE_RCSID(DII_Collocation_Tests, Client_Task, "$Id$")
-
-char TEST_STR[] = "This is a DII collocation test.";
-CORBA::Long TEST_BASIC_VALUE = 12345;
-CORBA::Char TEST_SPECIAL_VALUE = 'x';
-CORBA::Short TEST_HOUR = 12;
-CORBA::Short TEST_MINUTE = 59;
-CORBA::Short TEST_SECOND = 59;
-
-Client_Task::Client_Task (const char *ior,
- const char *simple_test_ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , input_ (ior)
- , simple_test_input_ (simple_test_ior)
- , corb_ (CORBA::ORB::_duplicate (corb))
- , error_count_ (0)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var obj =
- this->corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (obj.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- input_),
- 1);
- }
-
- CORBA::Object_var simple_test_obj =
- this->corb_->string_to_object (simple_test_input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (simple_test_obj.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Simple_Test reference <%s>\n",
- simple_test_input_),
- 1);
- }
-
- Test::Simple_Test_var simple_test
- = Test::Simple_Test::_narrow (simple_test_obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-CORBA::Long l = 200;
- CORBA::Request_var req (obj->_request ("test_basic_arg" ACE_ENV_ARG_PARAMETER));
- ACE_TRY_CHECK;
- req->add_in_arg ("basic") <<= TEST_BASIC_VALUE;
- req->add_out_arg ("x") <<= l;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (req->response_received ())
- {
-
- }
-
- req = obj->_request ("test_unbounded_string_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("ub_string") <<= TEST_STR;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_bounded_string_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_CString bs (TEST_STR);
- bs = bs.substr (0, ::Test::BOUNDED_STRING_SIZE);
-
- req->add_in_arg ("bd_string")
- <<= CORBA::Any::from_string (bs.c_str (), ::Test::BOUNDED_STRING_SIZE);
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_fixed_array_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::Fixed_Array fixed_array;
-
- for (CORBA::ULong m = 0 ; m < ::Test::FIX_ARRAY_SIZE; m ++)
- {
- fixed_array[m] = m + 999;
- }
-
- req->add_in_arg ("fixed_array") <<= ::Test::Fixed_Array_forany (fixed_array);
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_var_array_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::Var_Array var_array;
-
- for (CORBA::ULong i = 0; i < ::Test::VAR_ARRAY_SIZE; ++i)
- {
- var_array[i] = CORBA::string_dup(TEST_STR);
- }
-
- req->add_in_arg ("var_array") <<= var_array;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_bounded_var_size_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_CString bvs (TEST_STR);
- bvs = bvs.substr (0, ::Test::BOUNDED_VAR_SIZE);
-
- ::Test::Bounded_Var_Size_Arg* bd_var_size
- = new ::Test::Bounded_Var_Size_Arg();
-
- bd_var_size->replace (::Test::BOUNDED_VAR_SIZE,
- const_cast <CORBA::Char*> (bvs.c_str ()));
-
- req->add_in_arg ("bd_var_size") <<= bd_var_size;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_unbounded_var_size_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::Unbounded_Var_Size_Arg* ub_var_size
- = new ::Test::Unbounded_Var_Size_Arg();
- ub_var_size->replace (ub_var_size->maximum (),
- ACE_OS::strlen (TEST_STR),
- TEST_STR);
-
- req->add_in_arg ("ub_var_size") <<= ub_var_size;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_fixed_size_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::Test::TimeOfDay t;
- t.hour = TEST_HOUR;
- t.minute = TEST_MINUTE;
- t.second = TEST_SECOND;
-
- req->add_in_arg ("fixed_size") <<= t;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_special_basic_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("special") <<= CORBA::Any::from_char (TEST_SPECIAL_VALUE);
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_object_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("object") <<= simple_test_obj.in ();
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_objref_arg"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("objref") <<= simple_test.in ();
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_args_1"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("arg1") <<= simple_test_obj.in ();
- req->add_in_arg ("arg2") <<= CORBA::Any::from_char (TEST_SPECIAL_VALUE);
- req->add_in_arg ("arg3") <<= simple_test.in ();
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_args_2"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->add_in_arg ("arg1") <<= TEST_STR;
- req->add_in_arg ("arg2") <<= ::Test::Fixed_Array_forany (fixed_array);
- req->add_in_arg ("arg3") <<= t;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("test_args_3"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- bd_var_size
- = new ::Test::Bounded_Var_Size_Arg();
- bd_var_size->replace (::Test::BOUNDED_VAR_SIZE,
- const_cast <CORBA::Char*> (bvs.c_str ()));
-
- ub_var_size
- = new ::Test::Unbounded_Var_Size_Arg();
- ub_var_size->replace (ub_var_size->maximum (),
- ACE_OS::strlen (TEST_STR),
- TEST_STR);
-
- for (CORBA::ULong j = 0; j < ::Test::VAR_ARRAY_SIZE; ++j)
- {
- var_array[j] = CORBA::string_dup(TEST_STR);
- }
-
- req->add_in_arg ("arg1")
- <<= CORBA::Any::from_string (bs.c_str (), ::Test::BOUNDED_STRING_SIZE);
-
- req->add_in_arg ("arg2") <<= bd_var_size;
- req->add_in_arg ("arg3") <<= ub_var_size;
- req->add_in_arg ("arg4") <<= var_array;
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- req = obj->_request ("shutdown"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->send_oneway (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- }
- ACE_CATCHANY
- {
- error_count_ ++;
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_CATCHALL
- {
- error_count_ ++;
- ACE_ERROR ((LM_ERROR, "(%P|%t)Client_Task::svc - caught unknown exception \n"));
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-CORBA::ULong
-Client_Task::error_count () const
-{
- return error_count_;
-}
-
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.h b/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.h
deleted file mode 100644
index 2659536d7ad..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $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 char *input,
- const char *simple_test_ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- CORBA::ULong error_count () const;
-
-private:
- const char *input_;
- const char *simple_test_input_;
-
- CORBA::ORB_var corb_;
- CORBA::ULong error_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Collocated_Test.cpp b/TAO/tests/DII_Collocation_Tests/twoway/Collocated_Test.cpp
deleted file mode 100644
index 3e2bab6c3fc..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Collocated_Test.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-//$Id$
-
-// This include is needed for static builds to initialize DII_Arguments_Converter
-// service object.
-//#include "tao/DynamicInterface/DII_Arguments_Converter_Impl.h"
-
-#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 char *output = "server.ior";
-const char *input = "file://server.ior";
-const char *simple_test_output = "simple_test.ior";
-const char *simple_test_input = "file://simple_test.ior";
-// static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-
-CORBA::Boolean debug = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o:nd");
- 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 'd':
- debug = 1;
- break;
- case '?':
- default:
- // This is a hack but that is okay!
- return 0;
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event me;
- Server_Task server_task (output,
- simple_test_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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (input,
- simple_test_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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (server_orb != client_orb)
- {
- corb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- CORBA::ULong errors = client_task.error_count () + server_task.error_count ();
- if (errors == 0)
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t) test passed\n"));
- }
- else
- {
- ACE_DEBUG((LM_DEBUG, "(%P|%t) test failed - error_count=%u\n", errors));
- return 1;
- }
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Hello.cpp b/TAO/tests/DII_Collocation_Tests/twoway/Hello.cpp
deleted file mode 100644
index 85884f513a5..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Hello.cpp
+++ /dev/null
@@ -1,400 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB_Table.h"
-
-ACE_RCSID(DII_Collocation_Tests, Hello, "$Id$")
-
-extern CORBA::Boolean debug;
-extern char TEST_STR[];
-extern CORBA::Long TEST_BASIC_VALUE;
-extern CORBA::Char TEST_SPECIAL_VALUE;
-extern CORBA::Short TEST_HOUR;
-extern CORBA::Short TEST_MINUTE;
-extern CORBA::Short TEST_SECOND;
-
-#define ERROR_COUNT(message) \
-{ error_count_ ++; \
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)%s - failed error_count = %u\n"), \
- message, error_count_)); \
-}
-
-// Implementation skeleton constructor
-Test_Simple_Test_i::Test_Simple_Test_i (void)
-{
-}
-
-// Implementation skeleton destructor
-Test_Simple_Test_i::~Test_Simple_Test_i (void)
-{
-}
-
-void Test_Simple_Test_i::test_method (
- ::CORBA::ULong & error_count
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- error_count --;
-}
-
-Hello::Hello (CORBA::ORB_ptr orb,
- ACE_thread_t thrid)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , thr_id_ (thrid)
- , error_count_ (0)
-{
-}
-
-void
-Hello::test_basic_arg (
- ::CORBA::Long basic,
- ::CORBA::Long_out x
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (basic != TEST_BASIC_VALUE)
- ERROR_COUNT ("Hello::test_basic_arg")
-
- x = 10;
-}
-
-void
-Hello::test_unbounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_unbounded_string_arg ")
- ACE_TEXT("got unbounded string: %s\n"),
- message));
- if (ACE_OS::strncmp (message, TEST_STR, strlen (TEST_STR) != 0))
- {
- ERROR_COUNT ("Hello::test_unbounded_string_arg")
- }
-}
-
-
-void
-Hello::test_bounded_string_arg(const char* message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_bounded_string_arg ")
- ACE_TEXT("got bounded string: %s\n"),
- message));
- if (ACE_OS::strncmp (message, TEST_STR, ::Test::BOUNDED_STRING_SIZE) != 0)
- {
- ERROR_COUNT ("Hello::test_bounded_string_arg")
- }
-}
-
-
-void
-Hello::test_fixed_array_arg(const ::Test::Fixed_Array message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- for (unsigned i = 0; i < ::Test::FIX_ARRAY_SIZE; i++)
- {
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_fixed_array_arg ")
- ACE_TEXT("got fixed array: %d\n"),
- message[i]));
- if (message[i] != static_cast<CORBA::Long> (i + 999))
- ERROR_COUNT ("Hello::test_fixed_array_arg")
- }
-}
-
-
-void
-Hello::test_bounded_var_size_arg(const ::Test::Bounded_Var_Size_Arg& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_bounded_var_size_arg ")
- ACE_TEXT("got bounded var size arg\n")));
- if (ACE_OS::strncmp (message.get_buffer (), TEST_STR, ::Test::BOUNDED_VAR_SIZE) != 0)
- ERROR_COUNT ("Hello::test_bounded_var_size_arg")
-}
-
-
-void
-Hello::test_unbounded_var_size_arg(const ::Test::Unbounded_Var_Size_Arg& message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_unbounded_var_size_arg ")
- ACE_TEXT("got unbounded var size arg.\n")));
- if (ACE_OS::strncmp (message.get_buffer (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_unbounded_var_size_arg")
-}
-
-
-void
-Hello::test_fixed_size_arg(const ::Test::TimeOfDay& t
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_fixed_size_arg ")
- ACE_TEXT("got timeofday: %d:%d:%d\n"),
- t.hour, t.minute, t.second));
-
- if (t.hour != TEST_HOUR
- || t.minute != TEST_MINUTE
- || t.second != TEST_SECOND)
- ERROR_COUNT ("Hello::test_fixed_size_arg")
-}
-
-
-void
-Hello::test_var_array_arg(const Test::Var_Array messages
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- for (CORBA::ULong i = 0; i != ::Test::VAR_ARRAY_SIZE; i ++)
- {
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_var_array_arg ")
- ACE_TEXT("messages[%d] = %s \n"), i, messages[i].in ()));
- if (ACE_OS::strncmp (messages[i].in (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_var_array_arg")
- }
-}
-
-
-void
-Hello::test_special_basic_arg(CORBA::Char value
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_special_basic_arg ")
- ACE_TEXT(" got special basic arg: %c \n"), value));
- if (value != TEST_SPECIAL_VALUE)
- ERROR_COUNT ("Hello::test_special_basic_arg")
-}
-
-
-void Hello::test_objref_arg (
- ::Test::Simple_Test_ptr test
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_objref_arg \n")));
-
- if (CORBA::is_nil (test))
- ERROR_COUNT ("Hello::test_objref_arg")
- else
- {
- // Increment the error_count before calling test_method() and decrement
- // the error_count when the server handling the test_method() call.
- CORBA::ULong error_count = 0;
- error_count ++;
- test->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (error_count != 0)
- {
- ERROR_COUNT ("Hello::test_objref_arg")
- }
- }
-}
-
-void Hello::test_object_arg (
- ::CORBA::Object_ptr o
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_object_arg \n")));
- ::Test::Simple_Test_var simple_test = ::Test::Simple_Test::_narrow (o);
-
- CORBA::ULong error_count = 0;
- error_count ++;
- simple_test->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (error_count != 0)
- {
- ERROR_COUNT ("Hello::test_object_arg")
- }
-}
-
-void Hello::test_args_1 (
- ::CORBA::Object_ptr arg1,
- ::CORBA::Char arg2,
- ::Test::Simple_Test_ptr arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_1 \n")));
- ::Test::Simple_Test_var simple_test = ::Test::Simple_Test::_narrow (arg1);
-
- CORBA::ULong error_count = 0;
- error_count ++;
- simple_test->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- error_count ++;
- arg3->test_method (error_count ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (error_count != 0)
- {
- ERROR_COUNT ("Hello::test_args_1")
- }
-
- if (arg2 != TEST_SPECIAL_VALUE)
- ERROR_COUNT ("Hello::test_args_1")
-}
-
-void Hello::test_args_2 (
- const char * arg1,
- const ::Test::Fixed_Array arg2,
- const ::Test::TimeOfDay & arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_2 \n")));
- if (ACE_OS::strncmp (arg1, TEST_STR, strlen (TEST_STR)) != 0 )
- ERROR_COUNT ("Hello::test_args_2")
-
- for (unsigned i = 0; i < ::Test::FIX_ARRAY_SIZE; i++)
- {
- if (arg2[i] != static_cast<CORBA::Long> (i + 999))
- ERROR_COUNT ("Hello::test_args_2")
- }
-
- if (arg3.hour != TEST_HOUR
- || arg3.minute != TEST_MINUTE
- || arg3.second != TEST_SECOND)
- ERROR_COUNT ("Hello::test_args_2")
-}
-
-void Hello::test_args_3 (
- const char * arg1,
- const ::Test::Bounded_Var_Size_Arg & arg2,
- const ::Test::Unbounded_Var_Size_Arg & arg3,
- const ::Test::Var_Array arg4
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- if (debug)
- ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_3 \n")));
- if (ACE_OS::strncmp (arg1, TEST_STR, strlen (arg1)) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- if (ACE_OS::strncmp (arg2.get_buffer (), TEST_STR, ::Test::BOUNDED_VAR_SIZE) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- if (ACE_OS::strncmp (arg3.get_buffer (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- for (CORBA::ULong i = 0; i != ::Test::VAR_ARRAY_SIZE; i ++)
- {
- if (ACE_OS::strncmp (arg4[i].in (), TEST_STR, strlen (TEST_STR)) != 0)
- ERROR_COUNT ("Hello::test_args_3")
- }
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Upcall in process ..\n"));
-
- if (ACE_Thread::self () == this->thr_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 ();
-
- if (orb_table->find ("server_orb") == 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!");
-}
-
-char *
-Hello::test_unbounded_string (
- const char * s1,
- char *& s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- char *retstr = CORBA::string_dup (s1);
- s3 = CORBA::string_dup (s1);
- char *tmp = CORBA::string_alloc (2*ACE_OS::strlen (s2));
- ACE_OS::sprintf (tmp, "%s%s", s2, s2);
- CORBA::string_free (s2);
- s2 = tmp;
- return retstr;
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // 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 ACE_ENV_ARG_PARAMETER);
-}
-
-CORBA::ULong Hello::error_count () const
-{
- return error_count_;
-}
-
-
-
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Hello.h b/TAO/tests/DII_Collocation_Tests/twoway/Hello.h
deleted file mode 100644
index 37271331d77..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Hello.h
+++ /dev/null
@@ -1,208 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS.h"
-
-class Test_Simple_Test_i
- : public virtual POA_Test::Simple_Test
-{
-public:
- //Constructor
- Test_Simple_Test_i (void);
-
- //Destructor
- virtual ~Test_Simple_Test_i (void);
-
- virtual
- void test_method (
- ::CORBA::ULong & error_count
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-};
-
-/// 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
- void test_basic_arg (
- ::CORBA::Long basic,
- ::CORBA::Long_out x
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_unbounded_string_arg (
- const char * message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_bounded_string_arg (
- const char * message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_fixed_array_arg (
- const ::Test::Fixed_Array message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_var_array_arg (
- const ::Test::Var_Array messages
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_bounded_var_size_arg (
- const ::Test::Bounded_Var_Size_Arg & message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_unbounded_var_size_arg (
- const ::Test::Unbounded_Var_Size_Arg & message
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_fixed_size_arg (
- const ::Test::TimeOfDay & t
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_special_basic_arg (
- ::CORBA::Char value
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_objref_arg (
- ::Test::Simple_Test_ptr test
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_object_arg (
- ::CORBA::Object_ptr o
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_args_1 (
- ::CORBA::Object_ptr arg1,
- ::CORBA::Char arg2,
- ::Test::Simple_Test_ptr arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_args_2 (
- const char * arg1,
- const ::Test::Fixed_Array arg2,
- const ::Test::TimeOfDay & arg3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual
- void test_args_3 (
- const char * arg1,
- const ::Test::Bounded_Var_Size_Arg & arg2,
- const ::Test::Unbounded_Var_Size_Arg & arg3,
- const ::Test::Var_Array arg4
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual
- char * test_unbounded_string (
- const char * s1,
- char *& s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::ULong error_count () const;
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-
- ACE_thread_t thr_id_;
-
- CORBA::ULong error_count_;
-};
-
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/README b/TAO/tests/DII_Collocation_Tests/twoway/README
deleted file mode 100644
index 77df8565097..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/README
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-NOTE: This test has not completed yet !!!. This test currently just tested with "IN"
-arguments. The OUT, INOUT and RETURN arguments test cases need be added.
-
-
-Description:
-This test is used to test the bug fix on collocated dii twoway request
-invocation via invoke() crash on get_in_arg() when the request has multiple
-"IN" parameters.
-
-The test.idl defines twoway operations with all sorts "IN" SArgument to test the
-conversion of the DII parameters in NVList to the list of arguments.
-It also defines the operations with multiple "IN" arguments to test the
-bug fix.
-
-
-This test is a modification of the DII_Collocation_Tests/oneway test. The
-idl interfaces define twoway method instead of oneway and the client invokes
-the twoway operations via invoke() instead of oneway operations via
-send_oneway().
-
-
-
-
-
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Server_Task.cpp b/TAO/tests/DII_Collocation_Tests/twoway/Server_Task.cpp
deleted file mode 100644
index 15754f7aaf3..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Server_Task.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TestS.h"
-#include "Hello.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(DII_Collocation_Tests,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *output,
- const char *simple_test_output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , output_ (output)
- , simple_test_output_ (simple_test_output)
- , me_ (me)
- , sorb_ (CORBA::ORB::_duplicate (sorb))
- , error_count_ (0)
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (this->sorb_.in (),
- ACE_Thread::self ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (hello.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // 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 Hello IOR: %s",
- this->output_),
- 1);
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- Test_Simple_Test_i *simple_impl;
- ACE_NEW_RETURN (simple_impl,
- Test_Simple_Test_i (),
- 1);
-
- PortableServer::ServantBase_var owner_transfer_simple(simple_impl);
-
- Test::Simple_Test_var simple_test =
- simple_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var simple_test_ior =
- this->sorb_->object_to_string (simple_test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <this->output_>
- FILE *simple_test_output_file= ACE_OS::fopen (this->simple_test_output_,
- "w");
- if (simple_test_output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing Simple_Test IOR: %s",
- this->simple_test_output_),
- 1);
-
- ACE_OS::fprintf (simple_test_output_file, "%s", simple_test_ior.in ());
- ACE_OS::fclose (simple_test_output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - verifing results\n"));
-
- CORBA::ULong errors = hello_impl->error_count ();
-
- error_count_ += errors;
- }
- ACE_CATCHANY
- {
- error_count_ ++;
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_CATCHALL
- {
- error_count_ ++;
- ACE_ERROR ((LM_ERROR, "(%P|%t)Server_Task::svc - caught unknown exception \n"));
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-CORBA::ULong
-Server_Task::error_count () const
-{
- return error_count_;
-}
-
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Server_Task.h b/TAO/tests/DII_Collocation_Tests/twoway/Server_Task.h
deleted file mode 100644
index cd8b0582e6f..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Server_Task.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// -*- 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"
-
-class ACE_Manual_Event;
-
-/// Implement a Task to run the server in a single thread
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (const char *output,
- const char *simple_test_output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- CORBA::ULong error_count () const;
-
-private:
- /// Output file for server IOR
- const char *output_;
-
- /// Output file for Simple_Test IOR
- const char *simple_test_output_;
-
- /// Manual event to wake up the main thread to create a client
- /// thread.
- ACE_Manual_Event &me_;
-
- CORBA::ORB_var sorb_;
-
- CORBA::ULong error_count_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Test.idl b/TAO/tests/DII_Collocation_Tests/twoway/Test.idl
deleted file mode 100644
index f248f37c698..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/Test.idl
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- const unsigned long FIX_ARRAY_SIZE = 10;
- const unsigned long VAR_ARRAY_SIZE = 3;
- const unsigned long BOUNDED_STRING_SIZE = 10;
- const unsigned long BOUNDED_VAR_SIZE = 10;
-
- typedef sequence<char, BOUNDED_VAR_SIZE> Bounded_Var_Size_Arg;
- typedef sequence<char> Unbounded_Var_Size_Arg;
- typedef long Fixed_Array[FIX_ARRAY_SIZE];
- typedef string Var_Array [VAR_ARRAY_SIZE];
-
- struct TimeOfDay {
- short hour; // 0 - 23
- short minute; // 0 - 59
- short second; // 0 - 59
- };
-
- interface Simple_Test
- {
- void test_method(inout unsigned long error_count);
- };
-
- /// A very simple interface
- interface Hello
- {
- void test_basic_arg(in long inval, out long outval);
-
- void test_unbounded_string_arg(in string message);
-
- void test_bounded_string_arg(in string<BOUNDED_STRING_SIZE> message);
-
- void test_fixed_array_arg(in Fixed_Array message);
-
- void test_var_array_arg(in Var_Array messages);
-
- void test_bounded_var_size_arg(in Bounded_Var_Size_Arg message);
-
- void test_unbounded_var_size_arg(in Unbounded_Var_Size_Arg message);
-
- void test_fixed_size_arg (in TimeOfDay t);
-
- void test_special_basic_arg(in char value);
-
- void test_objref_arg (in Simple_Test test);
-
- void test_object_arg (in Object o);
-
- void test_args_1 (in Object arg1,
- in char arg2,
- in Simple_Test arg3);
-
- void test_args_2 (in string arg1,
- in Fixed_Array arg2,
- in TimeOfDay arg3);
-
- void test_args_3 (in string<BOUNDED_STRING_SIZE> arg1,
- in Bounded_Var_Size_Arg arg2,
- in Unbounded_Var_Size_Arg arg3,
- in Var_Array arg4);
-
- /// 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/TAO/tests/DII_Collocation_Tests/twoway/run_test.pl b/TAO/tests/DII_Collocation_Tests/twoway/run_test.pl
deleted file mode 100755
index 592179ac316..00000000000
--- a/TAO/tests/DII_Collocation_Tests/twoway/run_test.pl
+++ /dev/null
@@ -1,77 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("Collocated_Test");
-
-print STDERR "======== Running in Default Mode \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with per-orb \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with no collocation \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -ORBCollocation no");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in default mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n ");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in per-orb mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in no collocation mode and two ORBS \n";
-$SV->Arguments ("-o $iorfile -k file://$iorfile -n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/DLL_ORB/.cvsignore b/TAO/tests/DLL_ORB/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/DLL_ORB/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/DLL_ORB/DLL_ORB.mpc b/TAO/tests/DLL_ORB/DLL_ORB.mpc
deleted file mode 100644
index 34ed08c9359..00000000000
--- a/TAO/tests/DLL_ORB/DLL_ORB.mpc
+++ /dev/null
@@ -1,43 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Test_Client_Module): taolib_with_idl, anytypecode {
- sharedname = Test_Client_Module
- dynamicflags = TEST_CLIENT_MODULE_BUILD_DLL
-
- Source_Files {
- TestC.cpp
- Test_Client_Module.cpp
- }
-}
-
-project(*Test_Server_Module) : taolib_with_idl, portableserver {
- sharedname = Test_Server_Module
- dynamicflags = TEST_SERVER_MODULE_BUILD_DLL
- after += *Test_CLient_Module
-
- Source_Files {
- Test_Server_Module.cpp
- Test_i.cpp
- }
-}
-
-project(*Server) : taoexe {
- exename = server
- IDL_Files {
- }
-
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoexe {
- IDL_Files {
- }
-
- Source_Files {
- client.cpp
- }
-}
-
diff --git a/TAO/tests/DLL_ORB/Test.idl b/TAO/tests/DLL_ORB/Test.idl
deleted file mode 100644
index f58e6b90ec7..00000000000
--- a/TAO/tests/DLL_ORB/Test.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * "Test" IDL interface for the DLL_ORB test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-/**
- * @class Test
- *
- * @brief Simple interface that supplies an operation to invoke.
- */
-interface Test
-{
-
- // Simple two-way operation to invoke so that the ORB transport
- // internals are excercised.
- void invoke_me ();
-
- // Shutdown the server-side ORB.
- oneway void shutdown ();
-
-};
diff --git a/TAO/tests/DLL_ORB/Test_Client_Module.cpp b/TAO/tests/DLL_ORB/Test_Client_Module.cpp
deleted file mode 100644
index f6cd461b12e..00000000000
--- a/TAO/tests/DLL_ORB/Test_Client_Module.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-// -*- C++ -*-
-
-#include "Test_Client_Module.h"
-#include "tao/TAO_Singleton_Manager.h"
-#include "tao/StringSeqC.h"
-
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (DLL_ORB,
- Test_Client_Module,
- "$Id$")
-
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: -k <ior>\n"),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int
-Test_Client_Module::init (int argc, ACE_TCHAR *argv[])
-{
- // -----------------------------------------------------------------
- // Pre-ORB initialization steps necessary for proper DLL ORB
- // support.
- // -----------------------------------------------------------------
- // Make sure TAO's singleton manager is initialized, and set to not
- // register itself with the ACE_Object_Manager since it is under the
- // control of the Service Configurator. If we register with the
- // ACE_Object_Manager, then the ACE_Object_Manager will still hold
- // (dangling) references to instances of objects created by this
- // module and destroyed by this object when it is dynamically
- // unloaded.
- int register_with_object_manager = 0;
-
- if (TAO_Singleton_Manager::instance ()->init (
- register_with_object_manager) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Test_Client_Module::init -- ORB pre-initialization "
- "failed."),
- -1); // No exceptions available yet, so return
- // an error status.
-
- // -----------------------------------------------------------------
- // Boilerplate CORBA/TAO client-side ORB initialization code.
- // -----------------------------------------------------------------
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Prepend a "dummy" program name argument to the Service
- // Configurator argument vector.
- int new_argc = argc + 1;
-
- CORBA::StringSeq new_argv (new_argc);
- new_argv.length (new_argc);
-
- // Prevent the ORB from opening the Service Configurator file
- // again since the Service Configurator file is already in the
- // process of being opened.
- new_argv[0] = CORBA::string_dup ("dummy");
-
- // Copy the remaining arguments into the new argument vector.
- for (int i = new_argc - argc, j = 0;
- j < argc;
- ++i, ++j)
- new_argv[i] = CORBA::string_dup (argv[j]);
-
- // Initialize the ORB.
- this->orb_ = CORBA::ORB_init (new_argc,
- new_argv.get_buffer (),
- "CLIENT"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (this->orb_.in ()))
- return -1;
-
- if (::parse_args (new_argc, new_argv.get_buffer ()) != 0)
- return 1;
-
- CORBA::Object_var obj =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->test_ =
- Test::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (this->test_.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- ACE_TEXT ("Nil Test reference <%s>\n"),
- ior),
- 1);
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- ACE_TEXT ("Test_Client_Module::init"));
-
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
-#if defined (ACE_HAS_THREADS)
-
- // Become an Active Object so that the ORB will execute in a
- // separate thread.
- return this->activate ();
-
-#else
-
- return 0;
-
-#endif /* ACE_HAS_THREADS */
-}
-
-int
-Test_Client_Module::fini (void)
-{
- ACE_DEBUG ((LM_INFO,
- "Client is being finalized.\n"));
-
- // ------------------------------------------------------------
- // Pre-Test_Client_Module termination steps.
- // ------------------------------------------------------------
- // Explicitly clean up singletons and other objects created by TAO
- // before unloading this module.
- if (TAO_Singleton_Manager::instance ()->fini () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Test_Client_Module::fini -- ORB pre-termination "
- "failed."),
- -1);
-
- return 0;
-}
-
-int
-Test_Client_Module::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Invoke an operation on the Test object.
- this->test_->invoke_me (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /// Shutdown the remote ORB.
- this->test_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Make sure the ORB is destroyed here - before the thread
- // exits, because it may be holding global resources, owned by
- // the Object Manager (thru its core, which is in turn owned by
- // the ORB table; which is owned by the Object Manager).
- // Otherwise the Object Manager will have clobbered them by the
- // time it gets to destroy the ORB Table, which calls our
- // fini(). Had we destroyed the ORB in our fini(), its core
- // fininalization would have required access to those already
- // deleted resources.
- if (!CORBA::is_nil (this->orb_.in ()))
- {
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // This is a bit of a hack. The ORB Core's lifetime is tied to the
- // lifetime of an object reference. We need to wipe out all object
- // references before we call fini() on the TAO_Singleton_Manager.
- //
- // Note that this is only necessary if the default resource factory
- // is used, i.e. one isn't explicitly loaded prior to initializing
- // the ORB.
- (void) this->test_.out ();
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- ACE_TEXT ("Test_Client_Module::svc"));
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-ACE_STATIC_SVC_DEFINE (Test_Client_Module,
- ACE_TEXT ("Client_Module"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Test_Client_Module),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-ACE_FACTORY_DEFINE (Test_Client_Module, Test_Client_Module)
diff --git a/TAO/tests/DLL_ORB/Test_Client_Module.h b/TAO/tests/DLL_ORB/Test_Client_Module.h
deleted file mode 100644
index bd649692068..00000000000
--- a/TAO/tests/DLL_ORB/Test_Client_Module.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Test_Client_Module.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TEST_MODULE_H
-#define TEST_MODULE_H
-
-#include /**/ "ace/pre.h"
-
-#include "Test_Client_Module_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.h"
-#include "ace/Service_Config.h"
-
-#include "TestC.h"
-
-/**
- * @class Test_Client_Module
- *
- * @brief The shared object that is instantiated when the client-side
- * test module/library is dynamically loaded.
- *
- * This class invokes an operation on a "remote" CORBA object.
- */
-
-class Test_Client_Module_Export Test_Client_Module : public ACE_Task_Base
-{
-public:
-
- /// Initializes object when dynamic linking occurs.
- virtual int init (int argc, ACE_TCHAR *argv[]);
-
- /// Terminates object when dynamic unlinking occurs.
- virtual int fini (void);
-
- /// Run by a daemon thread to handle deferred processing.
- virtual int svc (void);
-
-private:
-
- /// Reference to the ORB.
- CORBA::ORB_var orb_;
-
- /// Reference to the test object.
- Test_var test_;
-
-};
-
-ACE_FACTORY_DECLARE (Test_Client_Module, Test_Client_Module)
-
-#include /**/ "ace/post.h"
-
-#endif /* TEST_MODULE_H */
diff --git a/TAO/tests/DLL_ORB/Test_Client_Module_Export.h b/TAO/tests/DLL_ORB/Test_Client_Module_Export.h
deleted file mode 100644
index 5e53f353d4e..00000000000
--- a/TAO/tests/DLL_ORB/Test_Client_Module_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 TEST_CLIENT_MODULE_EXPORT_H
-#define TEST_CLIENT_MODULE_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (TEST_CLIENT_MODULE_HAS_DLL)
-# define TEST_CLIENT_MODULE_HAS_DLL 0
-# endif /* ! TEST_CLIENT_MODULE_HAS_DLL */
-#else
-# if !defined (TEST_CLIENT_MODULE_HAS_DLL)
-# define TEST_CLIENT_MODULE_HAS_DLL 1
-# endif /* ! TEST_CLIENT_MODULE_HAS_DLL */
-#endif
-
-#if defined (TEST_CLIENT_MODULE_HAS_DLL) && (TEST_CLIENT_MODULE_HAS_DLL == 1)
-# if defined (TEST_CLIENT_MODULE_BUILD_DLL)
-# define Test_Client_Module_Export ACE_Proper_Export_Flag
-# define TEST_CLIENT_MODULE_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TEST_CLIENT_MODULE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TEST_CLIENT_MODULE_BUILD_DLL */
-# define Test_Client_Module_Export ACE_Proper_Import_Flag
-# define TEST_CLIENT_MODULE_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TEST_CLIENT_MODULE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TEST_CLIENT_MODULE_BUILD_DLL */
-#else /* TEST_CLIENT_MODULE_HAS_DLL == 1 */
-# define Test_Client_Module_Export
-# define TEST_CLIENT_MODULE_SINGLETON_DECLARATION(T)
-# define TEST_CLIENT_MODULE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TEST_CLIENT_MODULE_HAS_DLL == 1 */
-
-#endif /* TEST_CLIENT_MODULE_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/DLL_ORB/Test_Server_Module.cpp b/TAO/tests/DLL_ORB/Test_Server_Module.cpp
deleted file mode 100644
index 2bb64be76df..00000000000
--- a/TAO/tests/DLL_ORB/Test_Server_Module.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-// -*- C++ -*-
-
-#include "Test_Server_Module.h"
-#include "tao/TAO_Singleton_Manager.h"
-#include "tao/StringSeqC.h"
-
-#include "ace/Service_Config.h"
-
-ACE_RCSID (DLL_ORB,
- Test_Server_Module,
- "$Id$")
-
-#include "ace/Get_Opt.h"
-
-
-const char *ior_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
-
- ior_file = get_opts.opt_arg ();
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: -o IOR\n"),
- -1);
- }
-
- return 0;
-}
-
-int
-Test_Server_Module::init (int argc, ACE_TCHAR *argv[])
-{
- // -----------------------------------------------------------------
- // Pre-ORB initialization steps necessary for proper DLL ORB
- // support.
- // -----------------------------------------------------------------
- // Make sure TAO's singleton manager is initialized, and set to not
- // register itself with the ACE_Object_Manager since it is under the
- // control of the Service Configurator. If we register with the
- // ACE_Object_Manager, then the ACE_Object_Manager will still hold
- // (dangling) references to instances of objects created by this
- // module and destroyed by this object when it is dynamically
- // unloaded.
- int register_with_object_manager = 0;
-
- if (TAO_Singleton_Manager::instance ()->init (
- register_with_object_manager) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Test_Server_Module::init -- ORB pre-initialization "
- "failed."),
- -1); // No CORBA exceptions available yet, so
- // return an error status.
-
-
- // -----------------------------------------------------------------
- // Boilerplate CORBA/TAO server-side ORB initialization code.
- // -----------------------------------------------------------------
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Add one to the new argc since "dummy" is being added to the
- // argv vector.
- int new_argc = argc + 1;
-
- CORBA::StringSeq new_argv (new_argc);
- new_argv.length (new_argc);
-
- // Prevent the ORB from opening the Service Configurator file
- // again since the Service Configurator file is already in the
- // process of being opened.
- new_argv[0] = CORBA::string_dup ("dummy");
-
- // Copy the remaining arguments into the new argument vector.
- for (int i = new_argc - argc, j = 0;
- j < argc;
- ++i, ++j)
- new_argv[i] = CORBA::string_dup (argv[j]);
-
- // Initialize the ORB.
- this->orb_ = CORBA::ORB_init (new_argc,
- new_argv.get_buffer (),
- "SERVER"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (this->orb_.in ()))
- return -1;
-
- CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- this->poa_ =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->poa_manager_ = this->poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (::parse_args (new_argc, new_argv.get_buffer ()) != 0)
- return -1;
-
- CORBA::Object_var obj = this->servant_._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Servant:\n<%s>\n",
- ior.in ()));
-
- // Write IOR to a file.
- FILE *output_file= ACE_OS::fopen (ior_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- this->servant_.orb (this->orb_.in ());
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- ACE_TEXT ("Test_Server_Module::init"));
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
-#if defined (ACE_HAS_THREADS)
-
- // Become an Active Object so that the ORB will execute in a
- // separate thread.
- return this->activate ();
-
-#else
-
- return 0;
-
-#endif /* ACE_HAS_THREADS */
-}
-
-int
-Test_Server_Module::fini (void)
-{
- ACE_DEBUG ((LM_INFO,
- "Server is being finalized.\n"));
-
- // ------------------------------------------------------------
- // Pre-Test_Server_Module termination steps.
- // ------------------------------------------------------------
- // Explicitly clean up singletons created by TAO before
- // unloading this module.
- if (TAO_Singleton_Manager::instance ()->fini () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Test_Server_Module::fini -- ORB pre-termination "
- "failed."),
- -1);
-
- return 0;
-}
-
-int
-Test_Server_Module::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Run the ORB event loop in its own thread.
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "Server is being destroyed.\n"));
-
- // Make sure the ORB is destroyed here - before the thread
- // exits, because it may be holding global resources, owned by
- // the Object Manager (thru its core, which is in turn owned by
- // the ORB table; which is owned by the Object Manager).
- // Otherwise the Object Manager will have clobbered them by the
- // time it gets to destroy the ORB Table, which calls our
- // fini(). Had we destroyed the ORB in our fini(), its core
- // fininalization would have required access to those already
- // deleted resources.
- if (!CORBA::is_nil (this->orb_.in ()))
- {
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- ACE_TEXT ("Test_Server_Module::svc"));
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-ACE_STATIC_SVC_DEFINE (Test_Server_Module,
- ACE_TEXT ("Test_Server_Module"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Test_Server_Module),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-ACE_FACTORY_DEFINE (Test_Server_Module, Test_Server_Module)
diff --git a/TAO/tests/DLL_ORB/Test_Server_Module.h b/TAO/tests/DLL_ORB/Test_Server_Module.h
deleted file mode 100644
index f525f46716b..00000000000
--- a/TAO/tests/DLL_ORB/Test_Server_Module.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Test_Server_Module.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TEST_SERVER_MODULE_H
-#define TEST_SERVER_MODULE_H
-
-#include /**/ "ace/pre.h"
-
-#include "Test_Server_Module_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.h"
-#include "Test_i.h"
-
-
-/**
- * @class Test_Server_Module
- *
- * @brief The shared object that is instantiated when the server-side
- * test module/library is dynamically loaded.
- *
- * This class handles all of the server-side ORB tasks, such as
- * activating the test CORBA object, and running the ORB.
- */
-
-class Test_Server_Module_Export Test_Server_Module : public ACE_Task_Base
-{
-public:
-
- /// Initializes object when dynamic linking occurs.
- virtual int init (int argc, ACE_TCHAR *argv[]);
-
- /// Terminates object when dynamic unlinking occurs.
- virtual int fini (void);
-
- /// Run by a daemon thread to handle deferred processing.
- virtual int svc (void);
-
-private:
-
- /// Reference to the ORB.
- CORBA::ORB_var orb_;
-
- /// Reference to the POA.
- PortableServer::POA_var poa_;
-
- /// Reference to the POA Manager.
- PortableServer::POAManager_var poa_manager_;
-
- /// The servant that implements the "Test" object.
- Test_i servant_;
-
-};
-
-ACE_FACTORY_DECLARE (Test_Server_Module, Test_Server_Module)
-
-#include /**/ "ace/post.h"
-
-#endif /* TEST_SERVER_MODULE_H */
diff --git a/TAO/tests/DLL_ORB/Test_Server_Module_Export.h b/TAO/tests/DLL_ORB/Test_Server_Module_Export.h
deleted file mode 100644
index 1b3a24f667e..00000000000
--- a/TAO/tests/DLL_ORB/Test_Server_Module_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 TEST_SERVER_MODULE_EXPORT_H
-#define TEST_SERVER_MODULE_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (TEST_SERVER_MODULE_HAS_DLL)
-# define TEST_SERVER_MODULE_HAS_DLL 0
-# endif /* ! TEST_SERVER_MODULE_HAS_DLL */
-#else
-# if !defined (TEST_SERVER_MODULE_HAS_DLL)
-# define TEST_SERVER_MODULE_HAS_DLL 1
-# endif /* ! TEST_SERVER_MODULE_HAS_DLL */
-#endif
-
-#if defined (TEST_SERVER_MODULE_HAS_DLL) && (TEST_SERVER_MODULE_HAS_DLL == 1)
-# if defined (TEST_SERVER_MODULE_BUILD_DLL)
-# define Test_Server_Module_Export ACE_Proper_Export_Flag
-# define TEST_SERVER_MODULE_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TEST_SERVER_MODULE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TEST_SERVER_MODULE_BUILD_DLL */
-# define Test_Server_Module_Export ACE_Proper_Import_Flag
-# define TEST_SERVER_MODULE_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TEST_SERVER_MODULE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TEST_SERVER_MODULE_BUILD_DLL */
-#else /* TEST_SERVER_MODULE_HAS_DLL == 1 */
-# define Test_Server_Module_Export
-# define TEST_SERVER_MODULE_SINGLETON_DECLARATION(T)
-# define TEST_SERVER_MODULE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TEST_SERVER_MODULE_HAS_DLL == 1 */
-
-#endif /* TEST_SERVER_MODULE_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/DLL_ORB/Test_i.cpp b/TAO/tests/DLL_ORB/Test_i.cpp
deleted file mode 100644
index aa8d19ec17b..00000000000
--- a/TAO/tests/DLL_ORB/Test_i.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// -*- C++ -*-
-
-#include "Test_i.h"
-
-ACE_RCSID (DLL_ORB,
- Test_i,
- "$Id$")
-
-Test_i::Test_i (void)
- : orb_ ()
-{
-}
-
-void
-Test_i::invoke_me (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) Test method invoked.\n"));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_INFO,
- "Server is shutting down.\n"));
-
- if (!CORBA::is_nil (this->orb_.in ()))
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Test_i::orb (CORBA::ORB_ptr orb)
-{
- this->orb_ = CORBA::ORB::_duplicate (orb);
-}
diff --git a/TAO/tests/DLL_ORB/Test_i.h b/TAO/tests/DLL_ORB/Test_i.h
deleted file mode 100644
index 9452bce731f..00000000000
--- a/TAO/tests/DLL_ORB/Test_i.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Test_i.h
- *
- * $Id$
- *
- * Implementation header for the "Test" IDL interface for the DLL ORB
- * test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TEST_I_H
-#define TEST_I_H
-
-#include "TestS.h"
-
-/**
- * @class Test_i
- *
- * @brief Simple test class.
- *
- * This class implements the "Test" interface used in this test.
- */
-class Test_i : public virtual POA_Test
-{
-public:
-
- /// Constructor.
- Test_i (void);
-
- /// Simple two-way operation used to excercise the ORB transport
- /// internals.
- virtual void invoke_me (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Shutdown the ORB.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the ORB to be shutdown by the shutdown() method in this
- /// class.
- void orb (CORBA::ORB_ptr orb);
-
-private:
-
- /// Pseudo-reference to the ORB.
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TEST_I_H */
diff --git a/TAO/tests/DLL_ORB/client.cpp b/TAO/tests/DLL_ORB/client.cpp
deleted file mode 100644
index 3ba5a6ded57..00000000000
--- a/TAO/tests/DLL_ORB/client.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file client.cpp
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#include "ace/Service_Config.h"
-#include "ace/Thread_Manager.h"
-
-int
-main (int, char *[])
-{
- // Process a Service Configurator directive that will cause the test
- // client module to be dynamically loaded.
- //
- // This is done to prevent the client binary from being forced to
- // explicitly link to the test client module library. Hence, the
- // client binary is completely decoupled from the test client
- // module (and the ORB!).
- //
- // In the process of doing this, the Test method provided by target
- // CORBA object will be invoked.
- if (ACE_Service_Config::process_directive (
- ACE_DYNAMIC_SERVICE_DIRECTIVE(
- "Client_Module",
- "Test_Client_Module",
- "_make_Test_Client_Module",
- "-k file://test.ior")) != 0)
- {
-
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ERROR: Client unable to process the "
- "Service Configurator directive"),
- -1);
- }
-
- ACE_DEBUG ((LM_INFO,
- "CLIENT: CORBA-portion of the test dynamically loaded.\n"));
-
- // Wait for all threads to complete.
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_INFO,
- "CLIENT: Terminated successfully.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/DLL_ORB/run_test.pl b/TAO/tests/DLL_ORB/run_test.pl
deleted file mode 100755
index e3b6539985a..00000000000
--- a/TAO/tests/DLL_ORB/run_test.pl
+++ /dev/null
@@ -1,46 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-#
-# $Id$
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-$SV = new PerlACE::Process ("server", "");
-$CL = new PerlACE::Process ("client", "");
-
-print STDERR "\n\n==== Running DLL ORB test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/DLL_ORB/server.cpp b/TAO/tests/DLL_ORB/server.cpp
deleted file mode 100644
index c54ec7f983a..00000000000
--- a/TAO/tests/DLL_ORB/server.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file server.cpp
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#include "ace/Service_Config.h"
-#include "ace/Thread_Manager.h"
-
-int
-main (int, char *[])
-{
- // Process a Service Configurator directive that will cause the test
- // server module to be dynamically loaded.
- //
- // This is done to prevent the server binary from being forced to
- // explicitly link to the test server module library. Hence, the
- // server binary is completely decoupled from the test server
- // module (and the ORB!).
- //
- // In the process of doing this, the Test CORBA object will be
- // activated, and the ORB will be run.
- if (ACE_Service_Config::process_directive (
- ACE_DYNAMIC_SERVICE_DIRECTIVE("Server_Module",
- "Test_Server_Module", "_make_Test_Server_Module", "")) != 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ERROR: Server unable to process the "
- "Service Configurator directive"),
- -1);
- }
-
- ACE_DEBUG ((LM_INFO,
- "SERVER: CORBA-portion of the test dynamically loaded.\n"));
-
- // Wait for all threads to complete.
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_INFO,
- "SERVER: Terminated successfully.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/DSI_Gateway/.cvsignore b/TAO/tests/DSI_Gateway/.cvsignore
deleted file mode 100644
index 173dd5296f5..00000000000
--- a/TAO/tests/DSI_Gateway/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-client
-gateway
-server
diff --git a/TAO/tests/DSI_Gateway/DSI_Gateway.mpc b/TAO/tests/DSI_Gateway/DSI_Gateway.mpc
deleted file mode 100644
index c5deacad25b..00000000000
--- a/TAO/tests/DSI_Gateway/DSI_Gateway.mpc
+++ /dev/null
@@ -1,25 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging, minimum_corba, dynamicinterface {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging, minimum_corba, dynamicinterface {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
-project(*Gateway): taoexe, portableserver, messaging, minimum_corba, dynamicinterface {
- after += *Client
- Source_Files {
- test_dsi.cpp
- gateway.cpp
- }
-}
diff --git a/TAO/tests/DSI_Gateway/README b/TAO/tests/DSI_Gateway/README
deleted file mode 100644
index aad5b8f69e1..00000000000
--- a/TAO/tests/DSI_Gateway/README
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Id$
-
- A simple test for the DSI/DII gateway support. TAO can
-optimize some demarshaling/marshaling and data copying in the
-implementation of DSI/DII based gateways. The DSI/DII gateway can
-also pass requests and replies that are not in native (the
-gateway's) byte order. NOTE - For this last feature to work, you
-must compile ACE with ACE_ENABLE_SWAP_ON_WRITE defined.
-
- This is a smoke test and simple example for those
-features. Use
-
- $ server -o server.ior
- $ gateway -k file://server.ior -o gw.ior
- $ client -k file://gw.ior -i 100 -x
-
-or run the run_test.pl script.
-
- A second perl script, run_exception_test.pl,
-tests the exception handling of the gateway. The script
-runs the client twice, first calling a method that raises
-a user exception (containing several fields of information),
-then calling a method that raises a CORBA system exception.
-
- To run these tests by hand, start the server and gateway
-as shown above, then use
-
- $ client -k file://gw.ior -u
-
-for the user exception test and
-
- $ client -k file://gw.ior -s
-
-for the system exception test. For these tests, the -x
-option (server shutdown) and -i option (# of calls)
-are inoperative. \ No newline at end of file
diff --git a/TAO/tests/DSI_Gateway/client.cpp b/TAO/tests/DSI_Gateway/client.cpp
deleted file mode 100644
index 4919809f944..00000000000
--- a/TAO/tests/DSI_Gateway/client.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(DSI_Gateway, client, "$Id$")
-
-const char *ior = "file://gateway.ior";
-int niterations = 5;
-int do_shutdown = 0;
-int test_user_exception = 0;
-int test_system_exception = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xusk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'u':
- test_user_exception = 1;
- break;
-
- case 's':
- test_system_exception = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-x "
- "-u "
- "-s "
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Structure the_in_structure;
- the_in_structure.seq.length (10);
-
- if (test_user_exception == 1)
- {
- server->raise_user_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (test_system_exception == 1)
- {
- server->raise_system_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- for (int i = 0; i != niterations; ++i)
- {
- the_in_structure.i = i;
- CORBA::String_var name = CORBA::string_dup ("the name");
-
- Structure_var the_out_structure;
-
- CORBA::Long r =
- server->test_method (i,
- the_in_structure,
- the_out_structure.out (),
- name.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "DSI_Simpler_Server ====\n"
- " x = %d\n"
- " i = %d\n"
- " length = %d\n"
- " name = <%s>\n",
- r,
- the_out_structure->i,
- the_out_structure->seq.length (),
- name.in ()));
- }
-
- if (r != i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d for %d",
- r, i));
- }
- }
- }
-
- if (do_shutdown)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (test_exception, ex)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client: exception caught - ");
-
- ACE_DEBUG ((LM_DEBUG,
- "error code: %d\n"
- "error info: %s\n"
- "status: %s\n",
- ex.error_code,
- ex.error_message.in (),
- ex.status_message.in ()));
-
- return 0;
- }
- ACE_CATCH (CORBA::NO_PERMISSION, ex)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client: exception caught - ");
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client: exception caught - ");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/DSI_Gateway/gateway.cpp b/TAO/tests/DSI_Gateway/gateway.cpp
deleted file mode 100644
index 4aade2c1f03..00000000000
--- a/TAO/tests/DSI_Gateway/gateway.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-#include "test_dsi.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(DSI_Gateway, server, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 5;
-int do_shutdown = 0;
-const char *ior_output_file = "gateway.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-x "
- "-k <ior> "
- "-i <niterations> "
- "-o <iorfile> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
- }
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DSI_Simple_Server server_impl (orb.in (),
- object.in (),
- root_poa.in ());
- PortableServer::ObjectId_var oid =
- root_poa->activate_object (&server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server =
- root_poa->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Gateway: exception caught - ");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/DSI_Gateway/run_exception_test.pl b/TAO/tests/DSI_Gateway/run_exception_test.pl
deleted file mode 100755
index 7ebeb4048f2..00000000000
--- a/TAO/tests/DSI_Gateway/run_exception_test.pl
+++ /dev/null
@@ -1,73 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$svfile = PerlACE::LocalFile ("server.ior");
-$gwfile = PerlACE::LocalFile ("gateway.ior");
-
-unlink $svfile;
-unlink $gwfile;
-
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $svfile");
-$GW = new PerlACE::Process ("gateway", "-k file://$svfile -o $gwfile");
-$CL = new PerlACE::Process ("client", "-k file://$gwfile -u");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($svfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$svfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$GW->Spawn ();
-
-if (PerlACE::waitforfile_timed ($gwfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$gwfile>\n";
- $SV->Kill ();
- $GW->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$CL = new PerlACE::Process ("client", "-k file://$gwfile -s");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->Kill ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$gateway = $GW->Kill ();
-
-if ($gateway != 0) {
- print STDERR "ERROR: gateway returned $gateway\n";
- $status = 1;
-}
-
-unlink $svfile;
-unlink $gwfile;
-
-exit $status;
diff --git a/TAO/tests/DSI_Gateway/run_test.pl b/TAO/tests/DSI_Gateway/run_test.pl
deleted file mode 100755
index 46ca8588693..00000000000
--- a/TAO/tests/DSI_Gateway/run_test.pl
+++ /dev/null
@@ -1,69 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$svfile = PerlACE::LocalFile ("server.ior");
-$gwfile = PerlACE::LocalFile ("gateway.ior");
-
-unlink $svfile;
-unlink $gwfile;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $svfile");
-}
-$GW = new PerlACE::Process ("gateway", "-k file://$svfile -o $gwfile");
-$CL = new PerlACE::Process ("client", "-k file://$gwfile -x -i 100");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($svfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$svfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$GW->Spawn ();
-
-if (PerlACE::waitforfile_timed ($gwfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$gwfile>\n";
- $SV->Kill ();
- $GW->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$gateway = $GW->WaitKill (5);
-
-if ($gateway != 0) {
- print STDERR "ERROR: gateway returned $gateway\n";
- $status = 1;
-}
-
-unlink $svfile;
-unlink $gwfile;
-
-exit $status;
diff --git a/TAO/tests/DSI_Gateway/server.cpp b/TAO/tests/DSI_Gateway/server.cpp
deleted file mode 100644
index dfe1919fe78..00000000000
--- a/TAO/tests/DSI_Gateway/server.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(DSI_Gateway, server, "$Id$")
-
-const char *ior_output_file = "server.ior";
-
-int nthreads = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
- }
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Server: exception caught - ");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/DSI_Gateway/test.idl b/TAO/tests/DSI_Gateway/test.idl
deleted file mode 100644
index d35c073b70d..00000000000
--- a/TAO/tests/DSI_Gateway/test.idl
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// $Id$
-//
-
-typedef sequence<long> DSI_LongSeq;
-
-struct Structure
-{
- short i;
- sequence<long> seq;
-};
-
-exception test_exception
-{
- short error_code;
- string error_message;
- string status_message;
-};
-
-interface Simple_Server
-{
- long test_method (in long x,
- in Structure the_in_structure,
- out Structure the_out_structure,
- inout string name);
-
- void raise_user_exception () raises (test_exception);
-
- void raise_system_exception ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/DSI_Gateway/test_dsi.cpp b/TAO/tests/DSI_Gateway/test_dsi.cpp
deleted file mode 100644
index 4a7c7f2557e..00000000000
--- a/TAO/tests/DSI_Gateway/test_dsi.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-#include "test_dsi.h"
-#include "tao/DynamicInterface/Request.h"
-#include "tao/DynamicInterface/Unknown_User_Exception.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_dsi.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(DSI_Gateway, test_dsi, "$Id$")
-
-void
-DSI_Simple_Server::invoke (CORBA::ServerRequest_ptr request
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::NVList_ptr list;
- this->orb_->create_list (0, list ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- request->arguments (list ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Request_var target_request;
-
- this->target_->_create_request (0, // ctx
- request->operation (),
- list,
- 0, // result
- 0, // exception_list,
- 0, // context_list,
- target_request.inout (),
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- target_request->_tao_lazy_evaluation (1);
-
- // Outgoing request must have the same byte order as the incoming one.
- target_request->_tao_byte_order (request->_tao_incoming_byte_order ());
-
- ACE_TRY
- {
- // Updates the byte order state, if necessary.
- target_request->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::UNKNOWN, ex)
- {
- ACE_UNUSED_ARG (ex);
-
- // Outgoing reply must have the same byte order as the incoming one.
- request->_tao_reply_byte_order (target_request->_tao_byte_order ());
-
- request->gateway_exception_reply (target_request->raw_user_exception ());
-
- return;
- }
- ACE_ENDTRY;
-
- // Outgoing reply must have the same byte order as the incoming one.
- request->_tao_reply_byte_order (target_request->_tao_byte_order ());
-
- if (ACE_OS::strcmp ("shutdown", request->operation ()) == 0)
- {
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-CORBA::RepositoryId
-DSI_Simple_Server::_primary_interface (const PortableServer::ObjectId &,
- PortableServer::POA_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC (())
-{
- return CORBA::string_dup ("IDL:Simple_Server:1.0");
-}
-
-PortableServer::POA_ptr
-DSI_Simple_Server::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
diff --git a/TAO/tests/DSI_Gateway/test_dsi.h b/TAO/tests/DSI_Gateway/test_dsi.h
deleted file mode 100644
index 05a1f7abb61..00000000000
--- a/TAO/tests/DSI_Gateway/test_dsi.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/DSI_Gateway
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_DSI_GATEWAY_TEST_DSI_H
-#define TAO_DSI_GATEWAY_TEST_DSI_H
-
-#include "tao/DynamicInterface/Server_Request.h"
-#include "tao/DynamicInterface/Dynamic_Implementation.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/ORB.h"
-
-class DSI_Simple_Server : public TAO_DynamicImplementation
-{
- // = TITLE
- // DSI Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the DSI/DII gateway.
- //
-public:
- DSI_Simple_Server (CORBA::ORB_ptr orb,
- CORBA::Object_ptr target,
- PortableServer::POA_ptr poa);
- // ctor
-
- // = The DynamicImplementation methods.
- virtual void invoke (CORBA::ServerRequest_ptr request
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::RepositoryId _primary_interface (
- const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC (());
-
- virtual PortableServer::POA_ptr _default_POA (
- ACE_ENV_SINGLE_ARG_DECL
- );
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- CORBA::Object_var target_;
- // Target object, forward requests to it...
-
- PortableServer::POA_var poa_;
- // The POA
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_dsi.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_DSI_GATEWAY_TEST_I_H */
diff --git a/TAO/tests/DSI_Gateway/test_dsi.i b/TAO/tests/DSI_Gateway/test_dsi.i
deleted file mode 100644
index dab987ec71e..00000000000
--- a/TAO/tests/DSI_Gateway/test_dsi.i
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-ACE_INLINE
-DSI_Simple_Server::DSI_Simple_Server (CORBA::ORB_ptr orb,
- CORBA::Object_ptr target,//Simple_Server_ptr target,
- PortableServer::POA_ptr poa)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- target_ (CORBA::Object::_duplicate (target)),//Simple_Server::_duplicate (target)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
diff --git a/TAO/tests/DSI_Gateway/test_i.cpp b/TAO/tests/DSI_Gateway/test_i.cpp
deleted file mode 100644
index c68a1d5c7f8..00000000000
--- a/TAO/tests/DSI_Gateway/test_i.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/debug.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(DSI_Gateway, test_i, "$Id$")
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Long x,
- const Structure& the_in_structure,
- Structure_out the_out_structure,
- char *&name
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Structure *tmp = 0;
- ACE_NEW_RETURN (tmp, Structure (the_in_structure), -1);
- the_out_structure = tmp;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Simpler_Server_i ====\n"
- " x = %d\n"
- " i = %d\n"
- " length = %d\n"
- " name = <%s>\n",
- x,
- the_in_structure.i,
- the_in_structure.seq.length (),
- name));
- }
-
- return x;
-}
-
-void
-Simple_Server_i::raise_user_exception (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- test_exception))
-{
- ACE_THROW (test_exception (33,
- "reactor meltdown",
- "kaput"));
-}
-
-void
-Simple_Server_i::raise_system_exception (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_THROW (CORBA::NO_PERMISSION ());
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/DSI_Gateway/test_i.h b/TAO/tests/DSI_Gateway/test_i.h
deleted file mode 100644
index 13d0e484c55..00000000000
--- a/TAO/tests/DSI_Gateway/test_i.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/DSI_Gateway
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_DSI_GATEWAY_TEST_I_H
-#define TAO_DSI_GATEWAY_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Long x,
- const Structure& the_in_structure,
- Structure_out the_out_structure,
- char *&name
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void raise_user_exception (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- test_exception));
-
- void raise_system_exception (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_DSI_GATEWAY_TEST_I_H */
diff --git a/TAO/tests/DSI_Gateway/test_i.i b/TAO/tests/DSI_Gateway/test_i.i
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/DSI_Gateway/test_i.i
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/DynAny_Test/.cvsignore b/TAO/tests/DynAny_Test/.cvsignore
deleted file mode 100644
index bc7530a9314..00000000000
--- a/TAO/tests/DynAny_Test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-basic_test
diff --git a/TAO/tests/DynAny_Test/DynAny_Test.mpc b/TAO/tests/DynAny_Test/DynAny_Test.mpc
deleted file mode 100644
index 8b40435f308..00000000000
--- a/TAO/tests/DynAny_Test/DynAny_Test.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Basic): taoserver, dynamicany {
- exename = basic_test
-
- Source_Files {
- data.cpp
- driver.cpp
- analyzer.cpp
- test_dynany.cpp
- test_dynarray.cpp
- test_dynenum.cpp
- test_dynsequence.cpp
- test_dynstruct.cpp
- test_dynunion.cpp
- test_wrapper.cpp
- }
-}
diff --git a/TAO/tests/DynAny_Test/README b/TAO/tests/DynAny_Test/README
deleted file mode 100644
index 8b15dafb23c..00000000000
--- a/TAO/tests/DynAny_Test/README
+++ /dev/null
@@ -1,27 +0,0 @@
-//=============================================================================
-/**
- * @file README
- *
- * $Id$
- *
- * DynAny_Test
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-This is a semi-complete run-through of DynAny functionality.
-To run a test, type
-
-basic_test -t <dynany|dynarray|dynenum|dynsequence|dynstruct|dynunion> -d
-
-To save on output, several things are tested in one pass. For each
-pass, a message is displayed, for example:
-
-"testing: constructor from any/insert/get" or
-"testing: constructor from typecode/from_any/to_any"
-
-and finally an error count for the entire test.
-
-Each DynAny is analyzed to make sure its contents is ok. With the option -d
-this analys is also dumped to the output
diff --git a/TAO/tests/DynAny_Test/analyzer.cpp b/TAO/tests/DynAny_Test/analyzer.cpp
deleted file mode 100644
index 08c1c9e4fd3..00000000000
--- a/TAO/tests/DynAny_Test/analyzer.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file analyzer.cpp
- *
- * $Id$
- *
- * This file contains a DynAny analyzer that dumps the contents of a DynAny
- * to the logging.
- *
- * @author Johnny Willemsen (jwillemsen@remedy.nl)
- */
-//=============================================================================
-
-#include "analyzer.h"
-
-#define CASEE(type,CT,str) case CORBA::tk_##type: {\
- CORBA::CT b = da->get_##type() ; \
- tab(level_);\
- if (debug_) \
- ACE_DEBUG ((LM_DEBUG, str , b)); \
- } break;
-
-DynAnyAnalyzer::DynAnyAnalyzer (CORBA::ORB_ptr orb,
- DynamicAny::DynAnyFactory_ptr dynany_factory,
- int debug)
- : orb_ (CORBA::ORB::_duplicate(orb)),
- dynany_factory_ (DynamicAny::DynAnyFactory::_duplicate(dynany_factory)),
- level_ (0),
- debug_ (debug)
-{
-}
-
-void DynAnyAnalyzer::tab (int t)
-{
- if (debug_)
- {
- for( int i = 0 ; i < t ; i++ )
- ACE_DEBUG ((LM_DEBUG,
- "\t"));
- }
-}
-
-DynAnyAnalyzer::~DynAnyAnalyzer()
-{
-}
-
-void DynAnyAnalyzer::resetTab()
-{
- level_ = 0;
-}
-
-void DynAnyAnalyzer::analyze (DynamicAny::DynAny_ptr da ACE_ENV_ARG_DECL)
-{
- CORBA::TypeCode_var tc = da->type();
-
- CORBA::TCKind kind = tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // strip aliases
- while (kind == CORBA::tk_alias)
- {
- tc = tc->content_type (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- kind = tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- switch (kind)
- {
- case CORBA::tk_struct:
- {
- DynamicAny::DynStruct_var ds
- = DynamicAny::DynStruct::_narrow(da ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- tab(level_);
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- "STRUCT\n"));
-
- if( da->seek(0) )
- {
- level_++;
- do
- {
- DynamicAny::DynAny_var cc = ds->current_component(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- DynamicAny::FieldName_var fn = ds->current_member_name(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- tab(level_);
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- "Member = %s\n", fn.in()));
-
- if (!CORBA::is_nil (cc.in ()))
- {
- this->analyze (cc.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- } while( da->next() );
- level_--;
- }
- }
- break; // end tk_struct
-
- case CORBA::tk_sequence:
- {
- DynamicAny::DynSequence_var ds
- = DynamicAny::DynSequence::_narrow(da ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- int i = 0;
-
- tab(level_);
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- "SEQUENCE\n"));
-
- if( ds->seek(0) )
- {
- level_++;
- do
- {
- tab(level_);
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- "[%d]\n", i));
-
- DynamicAny::DynAny_var cc( ds->current_component() );
- ACE_CHECK;
-
- if (!CORBA::is_nil (cc.in ()))
- {
- analyze(cc.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- i++;
- } while( da->next() );
- level_--;
- }
- }
- break; // end tk_sequence
-
- case CORBA::tk_array:
- {
- tab(level_);
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- "ARRAY\n"));
-
- level_++;
-
- CORBA::ULong const len =
- tc->length (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- for( unsigned int i = 0 ; i < len; ++i)
- {
- tab(level_);
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- "[%d]\n", i));
-
- DynamicAny::DynAny_var cc = da->current_component();
-
- if (!CORBA::is_nil (cc.in ()))
- {
- analyze(cc.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- da->next();
- }
- level_--;
- }
- break;
-
- case CORBA::tk_union:
- {
- DynamicAny::DynUnion_var value
- = DynamicAny::DynUnion::_narrow(da ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if( !value->has_no_active_member() )
- {
- DynamicAny::DynAny_var disc = value->member();
-
- if (!CORBA::is_nil (disc.in ()))
- {
- this->analyze(disc.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
- }
- break;
-
- case CORBA::tk_any:
- {
- DynamicAny::DynAny_var dynany;
- CORBA::Any_var any = da->get_any();
-
- dynany = dynany_factory_->create_dyn_any(any.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!CORBA::is_nil (dynany.in ()))
- {
- this->analyze(dynany.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- dynany->destroy();
- }
- break;
-
- case CORBA::tk_enum:
- {
- DynamicAny::DynEnum_var value
- = DynamicAny::DynEnum::_narrow(da ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var s = value->get_as_string();
- tab(level_);
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- " Value (enum) = %s\n", s.in()));
- }
- break;
-
- CASEE(boolean,Boolean," Value (bool) = %d\n");
- CASEE(short,Short," Value (short) = %d\n");
- CASEE(ushort,UShort," Value (ushort) = %u\n");
- CASEE(long,Long," Value (long) = %d\n");
- CASEE(ulong,ULong," Value (ulong) = %u\n");
- CASEE(longlong,LongLong," Value (longlong) %Ld\n");
- CASEE(ulonglong,ULongLong," Value (ulonglong) %Lu\n");
- CASEE(char,Char," Value (char) = %c\n");
- CASEE(float,Float," Value (float) = %f\n");
- CASEE(double,Double," Value (double) = %f\n");
- CASEE(octet,Octet," Value (octet) = %c\n");
-
- case CORBA::tk_string:
- {
- CORBA::String_var b( da->get_string() );
-
- tab(level_);
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- " Value (string) = %s\n", b.in()));
- }
- break;
-
- case CORBA::tk_TypeCode:
- {
- tab(level_);
- if (debug_)
- {
- CORBA::TCKind const kind =
- da->get_typecode ()->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- " Value (TypeCode) = %d\n",
- static_cast<int> (kind)));
- }
- }
- break;
-
- default:
- {
- tab(level_);
- if (debug_)
- {
- CORBA::TCKind const kind =
- tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- " unhandled typecode = %d\n",
- static_cast<int> (kind)));
- }
- }
- break;
- }
-
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-}
diff --git a/TAO/tests/DynAny_Test/analyzer.h b/TAO/tests/DynAny_Test/analyzer.h
deleted file mode 100644
index da1d08b1476..00000000000
--- a/TAO/tests/DynAny_Test/analyzer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file analyzer.h
- *
- * $Id$
- *
- * This file contains a DynAny analyzer that dumps the contents of a DynAny
- * to the ace logging using ACE_DEBUG.
- *
- * @author Johnny Willemsen (jwillemsen@remedy.nl)
- */
-//=============================================================================
-
-#ifndef ANALYZER_H
-#define ANALYZER_H
-
-#include "tao/AnyTypeCode/AnyTypeCode_methods.h"
-#include "tao/DynamicAny/DynamicAny.h"
-#include "tao/ORB.h"
-
-class DynAnyAnalyzer
-{
-public:
- DynAnyAnalyzer(CORBA::ORB_ptr orb, DynamicAny::DynAnyFactory_ptr dynany_factory, int debug);
-
- void tab(int t);
-
- ~DynAnyAnalyzer();
-
- void resetTab();
-
- void analyze(DynamicAny::DynAny_ptr da ACE_ENV_ARG_DECL);
-
-private:
- CORBA::ORB_var orb_;
- DynamicAny::DynAnyFactory_var dynany_factory_;
- int level_;
- int debug_;
-};
-
-
-#endif // ANALYZER_H
diff --git a/TAO/tests/DynAny_Test/da_tests.idl b/TAO/tests/DynAny_Test/da_tests.idl
deleted file mode 100644
index 4d0e5d4747f..00000000000
--- a/TAO/tests/DynAny_Test/da_tests.idl
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-
-#include <orb.idl>
-
-module DynAnyTests
-{
- struct enclosed_struct
- {
- float f;
- short s;
- };
-
- struct test_struct
- {
- char c;
- long l;
- enclosed_struct es;
- };
-
- typedef sequence<string<8> > test_seq;
- typedef sequence<short> SeqShort;
-
- const unsigned long DIM = 2;
- typedef long test_array [DIM];
-
- enum test_enum
- {
- TE_ZEROTH,
- TE_FIRST,
- TE_SECOND,
- TE_THIRD,
- TE_FOURTH
- };
-
- union test_union switch (test_enum)
- {
- case TE_SECOND: CORBA::TypeCode tc;
- case TE_FOURTH: test_enum te;
- default: short s;
- case TE_THIRD: string str;
- case TE_ZEROTH: octet o;
- };
-
- typedef test_struct test_struct_alias;
- typedef test_union test_union_alias;
-
- union test_implicit_def switch (boolean) {
- case TRUE :
- test_enum tenum;
- } ;
-};
diff --git a/TAO/tests/DynAny_Test/data.cpp b/TAO/tests/DynAny_Test/data.cpp
deleted file mode 100644
index f58e6d39d77..00000000000
--- a/TAO/tests/DynAny_Test/data.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//=============================================================================
-/**
- * @file data.cpp
- *
- * $Id$
- *
- * Implementation file for the class containing test constants.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#include "data.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "ace/Log_Msg.h"
-
-Data::Data (CORBA::ORB_var orb)
- : m_bool1 (1), m_bool2 (0),
- m_octet1 (8), m_octet2 (0),
- m_char1 ('z'), m_char2 (0),
- m_short1 (-5), m_short2 (0),
- m_long1 (-123456), m_long2 (0),
- m_ushort1 (5), m_ushort2 (0),
- m_ulong1 (123456), m_ulong2 (0),
- m_float1 (0.142857f), m_float2 (0.0f),
- m_double1 (3.14159), m_double2 (0.0),
- m_ulonglong1 (654321), m_ulonglong2 (0),
- m_string1 (CORBA::string_dup ("upchuck")), m_string2 (0),
-
- m_typecode1 (CORBA::TypeCode::_duplicate (CORBA::_tc_long)),
- m_typecode2 (CORBA::TypeCode::_duplicate (CORBA::_tc_null)),
-
- m_wchar1 (666), m_wchar2 (0),
- orb_ (orb)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- labels[0] = "type boolean";
- labels[1] = "type octet";
- labels[2] = "type char";
- labels[3] = "type short";
- labels[4] = "type long",
- labels[5] = "type ushort";
- labels[6] = "type ulong";
- labels[7] = "type float";
- labels[8] = "type double";
- labels[9] = "type longlong";
- labels[10] = "type ulonglong";
- labels[11] = "type string";
- labels[12] = "type typecode";
- labels[13] = "type wchar";
- labels[14] = "type any";
- labels[15] = "type objref";
-
- // Getting the RootPOA so we can generate object references.
- CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (obj.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Unable to get root poa reference.\n"));
- }
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- // Generate values for the member variables.
- this->m_objref1 =
- root_poa->create_reference ("foo"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- this->m_objref2 =
- root_poa->create_reference ("foo"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- // Clean up after the POA
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in ORB/POA init\n");
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-Data::~Data (void)
-{
- CORBA::string_free (m_string1);
- CORBA::string_free (m_string2);
- CORBA::release (m_typecode1);
- CORBA::release (m_typecode2);
-}
diff --git a/TAO/tests/DynAny_Test/data.h b/TAO/tests/DynAny_Test/data.h
deleted file mode 100644
index 4cd12f257e3..00000000000
--- a/TAO/tests/DynAny_Test/data.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//=============================================================================
-/**
- * @file data.h
- *
- * $Id$
- *
- * Header file for the class containing test constants.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#include "tao/AnyTypeCode/TypeCode_Constants.h"
-#include "tao/ORB.h"
-#include "tao/Object.h"
-
-class Data
-{
-public:
- Data (CORBA::ORB_var orb);
- ~Data (void);
-
- CORBA::Boolean m_bool1, m_bool2;
- CORBA::Octet m_octet1, m_octet2;
- CORBA::Char m_char1, m_char2;
- CORBA::Short m_short1, m_short2;
- CORBA::Long m_long1, m_long2;
- CORBA::UShort m_ushort1, m_ushort2;
- CORBA::ULong m_ulong1, m_ulong2;
- CORBA::Float m_float1, m_float2;
- CORBA::Double m_double1, m_double2;
- CORBA::ULongLong m_ulonglong1, m_ulonglong2;
- char * m_string1;
- char * m_string2;
- CORBA::TypeCode_ptr m_typecode1, m_typecode2;
- CORBA::WChar m_wchar1, m_wchar2;
- CORBA::Object_var m_objref1, m_objref2;
-
-const char* labels[16];
-
-private:
- CORBA::ORB_var orb_;
-};
diff --git a/TAO/tests/DynAny_Test/driver.cpp b/TAO/tests/DynAny_Test/driver.cpp
deleted file mode 100644
index 5eae425f78a..00000000000
--- a/TAO/tests/DynAny_Test/driver.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-
-//=============================================================================
-/**
- * @file driver.cpp
- *
- * $Id$
- *
- * Implementation file for the driver program.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#include "driver.h"
-#include "test_dynany.h"
-#include "test_dynarray.h"
-#include "test_dynenum.h"
-#include "test_dynsequence.h"
-#include "test_dynstruct.h"
-#include "test_dynunion.h"
-#include "test_wrapper.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-
-int main (int argc, char* argv[])
-{
- 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);
-
- // run the tests
- if (driver.run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) driver.cpp - "
- "tests failed\n"),
- -1);
- return 0;
-}
-
-// constructor
-Driver::Driver (void)
- : test_type_ (NO_TEST),
- debug_ (0)
-{
-}
-
-// destructor
-Driver::~Driver (void)
-{
- if (this->orb_.in () != 0)
- {
- this->orb_->shutdown ();
- this->orb_->destroy ();
- }
-}
-
-// initialize the driver
-int
-Driver::init (int argc, char* argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Retrieve the underlying ORB
- this->orb_ = CORBA::ORB_init (argc,
- argv,
- "local"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- // Parse command line and verify parameters.
- if (this->parse_args (argc, argv) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) driver.cpp - "
- "parse_args failed\n"),
- -1);
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Driver::init");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-Driver::parse_args (int argc, char* argv[])
-{
- if (argc == 1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " -t [dynany|dynarray|dynenum|dynsequence|dynstruct|dynunion]"
- "\n",
- argv [0]),
- -1);
-
- ACE_Get_Opt get_opts (argc, argv, "t:d");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 't':
- if (!ACE_OS::strcmp (get_opts.opt_arg (), "dynany"))
- this->test_type_ = TEST_DYNANY;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "dynarray"))
- this->test_type_ = TEST_DYNARRAY;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "dynenum"))
- this->test_type_ = TEST_DYNENUM;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "dynsequence"))
- this->test_type_ = TEST_DYNSEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "dynstruct"))
- this->test_type_ = TEST_DYNSTRUCT;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "dynunion"))
- this->test_type_ = TEST_DYNUNION;
- break;
-
- case 'd':
- this->debug_ = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " -t [dynany|dynarray|dynenum|dynsequence|dynstruct|dynunion]"
- " -d for debug"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-Driver::run (void)
-{
- int retstatus = 0;
-
- switch (this->test_type_)
- {
- case TEST_DYNANY:
- {
- Test_Wrapper<Test_DynAny>* wrapper =
- new Test_Wrapper<Test_DynAny> (new Test_DynAny (this->orb_, debug_));
- retstatus = wrapper->run_test ();
- delete wrapper;
- }
- break;
- case TEST_DYNARRAY:
- {
- Test_Wrapper<Test_DynArray>* wrapper =
- new Test_Wrapper<Test_DynArray> (new Test_DynArray (this->orb_, debug_));
- retstatus = wrapper->run_test ();
- delete wrapper;
- }
- break;
- case TEST_DYNENUM:
- {
- Test_Wrapper<Test_DynEnum>* wrapper =
- new Test_Wrapper<Test_DynEnum> (new Test_DynEnum (this->orb_, debug_));
- retstatus = wrapper->run_test ();
- delete wrapper;
- }
- break;
- case TEST_DYNSEQUENCE:
- {
- Test_Wrapper<Test_DynSequence>* wrapper =
- new Test_Wrapper<Test_DynSequence> (new Test_DynSequence (this->orb_, debug_));
- retstatus = wrapper->run_test ();
- delete wrapper;
- }
- break;
- case TEST_DYNSTRUCT:
- {
- Test_Wrapper<Test_DynStruct>* wrapper =
- new Test_Wrapper<Test_DynStruct> (new Test_DynStruct (this->orb_, debug_));
- retstatus = wrapper->run_test ();
- delete wrapper;
- }
- break;
- case TEST_DYNUNION:
- {
- Test_Wrapper<Test_DynUnion>* wrapper =
- new Test_Wrapper<Test_DynUnion> (new Test_DynUnion (this->orb_, debug_));
- retstatus = wrapper->run_test ();
- delete wrapper;
- }
- break;
- default:
- break;
- }
-
- return retstatus;
-}
diff --git a/TAO/tests/DynAny_Test/driver.h b/TAO/tests/DynAny_Test/driver.h
deleted file mode 100644
index d3f308129e1..00000000000
--- a/TAO/tests/DynAny_Test/driver.h
+++ /dev/null
@@ -1,57 +0,0 @@
-
-//=============================================================================
-/**
- * @file driver.h
- *
- * $Id$
- *
- * Header file for the driver program.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (DRIVER_H)
-#define DRIVER_H
-
-#include "tao/ORB.h"
-
-class Driver
-{
-public:
- // = Constructor and destructor.
- Driver (void);
- ~Driver (void);
-
-enum TEST_TYPE
- {
- NO_TEST,
- TEST_DYNANY,
- TEST_DYNARRAY,
- TEST_DYNENUM,
- TEST_DYNSEQUENCE,
- TEST_DYNSTRUCT,
- TEST_DYNUNION
- };
-
- /// Initialize the driver object.
- int init (int argc, char* argv[]);
-
- /// Parse command line arguments.
- int parse_args (int argc, char* argv[]);
-
- /// Execute test code.
- int run (void);
-
-private:
- /// underlying ORB (we do not own it)
- CORBA::ORB_var orb_;
-
- TEST_TYPE test_type_;
-
- int debug_;
-};
-
-#endif /* DRIVER_H */
diff --git a/TAO/tests/DynAny_Test/run_test.pl b/TAO/tests/DynAny_Test/run_test.pl
deleted file mode 100755
index 6e894398de5..00000000000
--- a/TAO/tests/DynAny_Test/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$status = 0;
-$type = "";
-
-sub run_test
-{
- my $type = shift(@_);
-
- if (PerlACE::is_vxworks_test()) {
- $BT = new PerlACE::ProcessVX ("basic_test", "-t $type");
- }
- else {
- $BT = new PerlACE::Process ("basic_test", "-t $type");
- }
- my $basictest = $BT->SpawnWaitKill (10);
-
- if ($basictest != 0) {
- print STDERR "ERROR: basic test for ($type) returned $basictest\n";
- $status = 1;
- }
-}
-
-for ($i = 0; $i <= $#ARGV; $i++) {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
- print "Run_Test Perl script for TAO DynAny Test\n\n";
- print "run_test [-chorus <target>] [-t type]\n";
- print "\n";
- print "-t type -- runs only one type of dynany test\n";
- exit;
- }
- elsif ($ARGV[$i] eq "-t") {
- $type = $ARGV[$i + 1];
- $i++;
- }
-}
-
-@types = ("dynany", "dynarray", "dynenum", "dynsequence", "dynstruct",
- "dynunion");
-
-
-if ($type ne "") {
- run_test ($type);
-}
-else {
- foreach $type (@types) {
- run_test ($type);
- }
-}
-
-exit $status;
-
diff --git a/TAO/tests/DynAny_Test/test_dynany.cpp b/TAO/tests/DynAny_Test/test_dynany.cpp
deleted file mode 100644
index 43796025447..00000000000
--- a/TAO/tests/DynAny_Test/test_dynany.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynany.cpp
- *
- * $Id$
- *
- * Implementation of the basic test for simple DynAnys
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-#include "tao/AnyTypeCode/AnyTypeCode_methods.h"
-#include "tao/DynamicAny/DynamicAny.h"
-
-#include "test_dynany.h"
-#include "data.h"
-#include "analyzer.h"
-
-Test_DynAny::Test_DynAny (CORBA::ORB_var orb, int debug)
- : orb_ (orb),
- test_name_ (CORBA::string_dup ("test_dynany")),
- error_count_ (0),
- debug_ (debug)
-{
-}
-
-Test_DynAny::~Test_DynAny (void)
-{
- CORBA::string_free (this->test_name_);
- this->test_name_ = 0;
-}
-
-const char*
-Test_DynAny::test_name (void) const
-{
- return this->test_name_;
-}
-
-int
-Test_DynAny::run_test (void)
-{
- Data data (this->orb_);
-
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG ((LM_DEBUG,
- "\t*=*=*=*= %s =*=*=*=*\n",
- data.labels[8]));
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/insert/get\n"));
-
- CORBA::Object_var factory_obj =
- this->orb_->resolve_initial_references ("DynAnyFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnyFactory_var dynany_factory =
- DynamicAny::DynAnyFactory::_narrow (factory_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (dynany_factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil dynamic any factory after narrow\n"),
- -1);
- }
-
- DynAnyAnalyzer analyzer(this->orb_.in(), dynany_factory.in(), debug_);
-
- CORBA::Any in1;
- in1 <<= data.m_double2;
- DynamicAny::DynAny_var fa1 =
- dynany_factory->create_dyn_any (in1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- fa1->insert_double (data.m_double1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Double d_out = fa1->get_double (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (d_out == data.m_double1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode)/from_any/to_any\n"));
-
- d_out = data.m_double2;
- DynamicAny::DynAny_var ftc1 =
- dynany_factory->create_dyn_any_from_type_code (CORBA::_tc_double
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any in_any1;
- in_any1 <<= data.m_double1;
- ftc1->from_any (in_any1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- analyzer.analyze(ftc1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any_var out_any1 = ftc1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- out_any1 >>= d_out;
-
- if (d_out == data.m_double1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- fa1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\t*=*=*=*= %s =*=*=*=*\n",
- data.labels[12]));
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/insert/get\n"));
-
- CORBA::Any in;
- in <<= data.m_typecode2;
- DynamicAny::DynAny_var fa2 =
- dynany_factory->create_dyn_any (in
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa2->insert_typecode (data.m_typecode1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::TypeCode_var tc_out = fa2->get_typecode (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (tc_out->equal (data.m_typecode1
- ACE_ENV_ARG_PARAMETER))
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode)/from_any/to_any\n"));
-
- DynamicAny::DynAny_var ftc2 =
- dynany_factory->create_dyn_any_from_type_code (CORBA::_tc_TypeCode
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any in_any2;
- in_any2 <<= data.m_typecode1;
- ftc2->from_any (in_any2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- analyzer.analyze(ftc2.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any_var out_any2 = ftc2->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::TypeCode_ptr out_tc;
- out_any2 >>= out_tc;
-
- CORBA::Boolean equal = out_tc->equal (data.m_typecode1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (equal)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_TRY_CHECK;
-
- fa2->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc2->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_dynany::run_test");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%d errors\n",
- this->error_count_));
-
- return 0;
-}
diff --git a/TAO/tests/DynAny_Test/test_dynany.h b/TAO/tests/DynAny_Test/test_dynany.h
deleted file mode 100644
index b8104ef2d04..00000000000
--- a/TAO/tests/DynAny_Test/test_dynany.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynany.h
- *
- * $Id$
- *
- * Header file for class to test the simple dynany.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_DYNANY_H)
-#define TEST_DYNANY_H
-
-#include "tao/ORB.h"
-#include "tao/AnyTypeCode/AnyTypeCode_methods.h"
-
-class Test_DynAny
-{
-public:
- Test_DynAny (CORBA::ORB_var orb, int debug);
- ~Test_DynAny (void);
-
- const char* test_name (void) const;
-
- int run_test (void);
-
-private:
- CORBA::ORB_var orb_;
- char* test_name_;
- CORBA::ULong error_count_;
- int debug_;
-};
-
-#endif /* TEST_DYNANY_H */
-
diff --git a/TAO/tests/DynAny_Test/test_dynarray.cpp b/TAO/tests/DynAny_Test/test_dynarray.cpp
deleted file mode 100644
index 805a78e61f1..00000000000
--- a/TAO/tests/DynAny_Test/test_dynarray.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynarray.cpp
- *
- * $Id$
- *
- * Implementation of the DynArray test
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#include "test_dynarray.h"
-#include "da_testsC.h"
-#include "data.h"
-#include "tao/DynamicAny/DynamicAny.h"
-#include "analyzer.h"
-
-Test_DynArray::Test_DynArray (CORBA::ORB_var orb, int debug)
- : orb_ (orb),
- test_name_ (CORBA::string_dup ("test_dynarray")),
- error_count_ (0),
- debug_ (debug)
-{
-}
-
-Test_DynArray::~Test_DynArray (void)
-{
- CORBA::string_free (this->test_name_);
- this->test_name_ = 0;
-}
-
-const char*
-Test_DynArray::test_name (void) const
-{
- return this->test_name_;
-}
-
-int
-Test_DynArray::run_test (void)
-{
- Data data (this->orb_);
-
- DynAnyTests::test_array ta = {0};
-
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG ((LM_DEBUG,
- "\t*=*=*=*= %s =*=*=*=*\n",
- data.labels[4]));
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/insert/get/seek/rewind/current_component\n"));
-
- CORBA::Object_var factory_obj =
- this->orb_->resolve_initial_references ("DynAnyFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnyFactory_var dynany_factory =
- DynamicAny::DynAnyFactory::_narrow (factory_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (dynany_factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil dynamic any factory after narrow\n"),
- -1);
- }
-
- DynAnyAnalyzer analyzer(this->orb_.in(), dynany_factory.in(), debug_);
-
- CORBA::Any in_any1;
- in_any1 <<= DynAnyTests::test_array_forany (ta);
- DynamicAny::DynAny_var dp1 =
- dynany_factory->create_dyn_any (in_any1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynArray_var fa1 = DynamicAny::DynArray::_narrow (dp1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->insert_long (data.m_long1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->rewind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Long l_out1 = data.m_long2;
- fa1->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- l_out1 = fa1->get_long (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (l_out1 == data.m_long1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode)/from_any/to_any\n"));
-
- DynamicAny::DynAny_var ftc1_base =
- dynany_factory->create_dyn_any_from_type_code (DynAnyTests::_tc_test_array
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynArray_var ftc1 =
- DynamicAny::DynArray::_narrow (ftc1_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ftc1.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynArray::_narrow() returned nil\n"),
- -1);
- }
-
- ta[1U] = data.m_long1;
- CORBA::Any in_any2;
- in_any2 <<= DynAnyTests::test_array_forany (ta);
-
- ftc1->from_any (in_any2
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- analyzer.analyze(ftc1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any1 = ftc1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynAnyTests::test_array_forany ta_out;
- out_any1.in () >>= ta_out;
-
- if (ta_out[1U] == data.m_long1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: set_elements/get_elements\n"));
-
- DynamicAny::AnySeq as_in (2);
- as_in.length (2);
- CORBA::Any in_any3;
- in_any3 <<= data.m_long1;
- as_in[0] = in_any3;
- as_in[1] = in_any3;
- ftc1->set_elements (as_in
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::AnySeq_var as_out = ftc1->get_elements (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any out_any2 = as_out[1U];
- CORBA::Long l_out2;
- out_any2 >>= l_out2;
-
- if (l_out2 == data.m_long1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- fa1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_dynarray::run_test");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%d errors\n",
- this->error_count_));
-
- return 0;
-}
diff --git a/TAO/tests/DynAny_Test/test_dynarray.h b/TAO/tests/DynAny_Test/test_dynarray.h
deleted file mode 100644
index 4604baafccb..00000000000
--- a/TAO/tests/DynAny_Test/test_dynarray.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynarray.h
- *
- * $Id$
- *
- * Header file for class to test DynArray.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_DYNARRAY_H)
-#define TEST_DYNARRAY_H
-
-#include "tao/ORB.h"
-
-class Test_DynArray
-{
-public:
- Test_DynArray (CORBA::ORB_var orb, int debug);
- ~Test_DynArray (void);
-
- const char* test_name (void) const;
-
- int run_test (void);
-
-private:
- CORBA::ORB_var orb_;
- char* test_name_;
- CORBA::ULong error_count_;
- int debug_;
-};
-
-#endif /* TEST_DYNARRAY_H */
diff --git a/TAO/tests/DynAny_Test/test_dynenum.cpp b/TAO/tests/DynAny_Test/test_dynenum.cpp
deleted file mode 100644
index ddef182f80c..00000000000
--- a/TAO/tests/DynAny_Test/test_dynenum.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynenum.cpp
- *
- * $Id$
- *
- * Implementation of the simple DynEnum test
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#include "test_dynenum.h"
-#include "da_testsC.h"
-#include "data.h"
-#include "tao/DynamicAny/DynamicAny.h"
-#include "analyzer.h"
-#include "ace/OS_NS_string.h"
-
-Test_DynEnum::Test_DynEnum (CORBA::ORB_var orb, int debug)
- : orb_ (orb),
- test_name_ (CORBA::string_dup ("test_dynenum")),
- error_count_ (0),
- debug_ (debug)
-{
-}
-
-Test_DynEnum::~Test_DynEnum (void)
-{
- CORBA::string_free (this->test_name_);
- this->test_name_ = 0;
-}
-
-const char*
-Test_DynEnum::test_name (void) const
-{
- return this->test_name_;
-}
-
-int
-Test_DynEnum::run_test (void)
-{
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/set_as_string/get_as_ulong\n"));
-
- CORBA::Object_var factory_obj =
- this->orb_->resolve_initial_references ("DynAnyFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnyFactory_var dynany_factory =
- DynamicAny::DynAnyFactory::_narrow (factory_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (dynany_factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil dynamic any factory after narrow\n"),
- -1);
- }
-
- DynAnyAnalyzer analyzer(this->orb_.in(), dynany_factory.in(), debug_);
-
- DynAnyTests::test_enum te = DynAnyTests::TE_ZEROTH;
- CORBA::Any in_any1;
- in_any1 <<= te;
- DynamicAny::DynAny_var dp1 =
- dynany_factory->create_dyn_any (in_any1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynEnum_var de1 =
- DynamicAny::DynEnum::_narrow (dp1.in ()
- ACE_ENV_ARG_PARAMETER);
-
- analyzer.analyze(dp1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_TRY_CHECK;
- de1->set_as_string ("TE_FIRST"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong ul_out1 = de1->get_as_ulong (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- analyzer.analyze(de1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any2 = de1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ul_out1 == 1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: set_as_ulong/get_as_string\n"));
-
- de1->set_as_ulong (3
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::String_var s = de1->get_as_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (s.in (), "TE_THIRD") == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode)/from_any/to_any\n"));
-
- DynamicAny::DynAny_var de2_base =
- dynany_factory->create_dyn_any_from_type_code (DynAnyTests::_tc_test_enum
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynEnum_var de2 =
- DynamicAny::DynEnum::_narrow (de2_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (de2.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynEnum::_narrow() returned nil\n"),
- -1);
- }
-
- CORBA::Any in_any2;
- in_any2 <<= DynAnyTests::TE_THIRD;
- de2->from_any (in_any2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- analyzer.analyze(de2.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any1 = de2->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- out_any1.in () >>= te;
-
- if (te == DynAnyTests::TE_THIRD)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: equal\n"));
-
- CORBA::Boolean equal =
- de1->equal (de2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (equal)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- de1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- de2->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_dynenum::run_test");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%d errors\n",
- this->error_count_));
-
- return 0;
-}
diff --git a/TAO/tests/DynAny_Test/test_dynenum.h b/TAO/tests/DynAny_Test/test_dynenum.h
deleted file mode 100644
index d59eae8e754..00000000000
--- a/TAO/tests/DynAny_Test/test_dynenum.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynenum.h
- *
- * $Id$
- *
- * Header file for class to test DynEnum.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_DYNENUM_H)
-#define TEST_DYNENUM_H
-
-#include "tao/ORB.h"
-
-class Test_DynEnum
-{
-public:
- Test_DynEnum (CORBA::ORB_var orb, int debug);
- ~Test_DynEnum (void);
-
- const char* test_name (void) const;
-
- int run_test (void);
-
-private:
- CORBA::ORB_var orb_;
- char* test_name_;
- CORBA::ULong error_count_;
- int debug_;
-};
-
-#endif /* TEST_DYNENUM_H */
-
diff --git a/TAO/tests/DynAny_Test/test_dynsequence.cpp b/TAO/tests/DynAny_Test/test_dynsequence.cpp
deleted file mode 100644
index ce68f01c925..00000000000
--- a/TAO/tests/DynAny_Test/test_dynsequence.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynsequence.cpp
- *
- * $Id$
- *
- * Implementation of the simple DynSequence test
- *
- *
- * @author Jeff Parsons <jp4@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#include "test_dynsequence.h"
-#include "da_testsC.h"
-#include "data.h"
-#include "tao/DynamicAny/DynamicAny.h"
-#include "analyzer.h"
-#include "ace/OS_NS_string.h"
-
-Test_DynSequence::Test_DynSequence (CORBA::ORB_var orb, int debug)
- : orb_ (orb),
- test_name_ (CORBA::string_dup ("test_dynsequence")),
- error_count_ (0),
- debug_ (debug)
-{
-}
-
-Test_DynSequence::~Test_DynSequence (void)
-{
- CORBA::string_free (this->test_name_);
- this->test_name_ = 0;
-}
-
-const char*
-Test_DynSequence::test_name (void) const
-{
- return this->test_name_;
-}
-
-int
-Test_DynSequence::run_test (void)
-{
- Data data (this->orb_);
- DynAnyTests::test_seq ts (2);
- ts.length (2);
-
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG ((LM_DEBUG,
- "\t*=*=*=*= %s =*=*=*=*\n",
- data.labels[11]));
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/insert/get/seek/"
- "rewind/current_component\n"));
-
- CORBA::Object_var factory_obj =
- this->orb_->resolve_initial_references ("DynAnyFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnyFactory_var dynany_factory =
- DynamicAny::DynAnyFactory::_narrow (factory_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (dynany_factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil dynamic any factory after narrow\n"),
- -1);
- }
-
- DynAnyAnalyzer analyzer (this->orb_.in (),
- dynany_factory.in (),
- debug_);
-
- DynAnyTests::SeqShort shortseq1;
-
- shortseq1.length (2);
- shortseq1[0] = 2;
- shortseq1[1] = -2;
-
- CORBA::Any any;
- any <<= shortseq1;
-
- DynamicAny::DynAny_var shortdany =
- dynany_factory->create_dyn_any (any ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- analyzer.analyze(shortdany.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var any3;
- any3 = shortdany->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ts[0] = data.m_string2;
- ts[1] = data.m_string2;
- CORBA::Any in_any1;
- in_any1 <<= ts;
- DynamicAny::DynAny_var dp1 =
- dynany_factory->create_dyn_any (in_any1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynSequence_var fa1 =
- DynamicAny::DynSequence::_narrow (dp1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->insert_string (data.m_string1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->rewind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::String_var out_str1 =
- fa1->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!ACE_OS::strcmp (out_str1.in (), data.m_string1))
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((
- LM_DEBUG,
- "testing: set_elements_as_dyn_any/get_elements_as_dyn_any/equal\n"
- ));
-
- static const char *values[] =
- {
- "zero",
- "one",
- "two"
- };
-
- CORBA::ULong length = 3;
- DynamicAny::DynAnySeq *elem_ptr = 0;
- ACE_NEW_RETURN (elem_ptr,
- DynamicAny::DynAnySeq (length),
- -1);
- elem_ptr->length (length);
- DynamicAny::DynAnySeq_var elements (elem_ptr);
- CORBA::Any elem_any;
- CORBA::ULong i;
-
- for (i = 0; i < length; ++i)
- {
- elem_any <<= CORBA::Any::from_string (values[i],
- 8);
- elements[i] = dynany_factory->create_dyn_any (elem_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- fa1->set_elements_as_dyn_any (elements.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnySeq_var out_elems =
- fa1->get_elements_as_dyn_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (out_elems->length () != 3)
- {
- ++this->error_count_;
- return -1;
- }
-
- analyzer.analyze(fa1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var out_str;
-
- for (i = 0; i < length; ++i)
- {
- out_str = out_elems[i]->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean equal =
- out_elems[i]->equal (elements[i]
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!equal)
- {
- ++this->error_count_;
- }
-
- // To show that calling destroy() on a component does
- // nothing, as required by the spec.
- out_elems[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (this->error_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode)/from_any/to_any\n"));
-
- DynamicAny::DynAny_var ftc1_base =
- dynany_factory->create_dyn_any_from_type_code (
- DynAnyTests::_tc_test_seq
- ACE_ENV_ARG_PARAMETER
- );
- ACE_TRY_CHECK;
-
- DynamicAny::DynSequence_var ftc1 =
- DynamicAny::DynSequence::_narrow (ftc1_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ftc1.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynSequence::_narrow() returned nil\n"),
- -1);
- }
-
- ts[0] = CORBA::string_dup (data.m_string1);
- CORBA::Any in_any2;
- in_any2 <<= ts;
- ftc1->from_any (in_any2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- analyzer.analyze(ftc1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any1 = ftc1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynAnyTests::test_seq *ts_out;
- out_any1.in () >>= ts_out;
-
- if (!ACE_OS::strcmp ((*ts_out)[0U], data.m_string1))
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: length/set_elements/get_elements\n"));
-
- length = ftc1->get_length (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (length != 2)
- {
- ++this->error_count_;
- }
-
- ftc1->set_length (3
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::AnySeq as_in (3);
- as_in.length (3);
- CORBA::Any in_any3;
- in_any3 <<= CORBA::Any::from_string (data.m_string2, 8);
- as_in[0] = in_any3;
- as_in[1] = in_any3;
- in_any3 <<= CORBA::Any::from_string (data.m_string1, 8);
- as_in[2] = in_any3;
- ftc1->set_elements (as_in
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::AnySeq_var as_out = ftc1->get_elements (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::ULong index = 2;
- CORBA::Any out_any2 = as_out[index];
- char* out_str2;
- out_any2 >>= CORBA::Any::to_string (out_str2, 8);
-
- if (ACE_OS::strcmp (out_str2, data.m_string1))
- {
- ++this->error_count_;
- }
-
- if (this->error_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
-
- fa1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_dynsequence::run_test");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%d errors\n",
- this->error_count_));
-
-
- return 0;
-}
diff --git a/TAO/tests/DynAny_Test/test_dynsequence.h b/TAO/tests/DynAny_Test/test_dynsequence.h
deleted file mode 100644
index 2b74a8ce22d..00000000000
--- a/TAO/tests/DynAny_Test/test_dynsequence.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynsequence.h
- *
- * $Id$
- *
- * Header file for class to test DynSequence.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_DYNSEQUENCE_H)
-#define TEST_DYNSEQUENCE_H
-
-#include "tao/ORB.h"
-
-class Test_DynSequence
-{
-public:
- Test_DynSequence (CORBA::ORB_var orb, int debug);
- ~Test_DynSequence (void);
-
- const char* test_name (void) const;
-
- int run_test (void);
-
-private:
- CORBA::ORB_var orb_;
- char* test_name_;
- CORBA::ULong error_count_;
- int debug_;
-};
-
-#endif /* TEST_DYNSEQUENCE_H */
-
diff --git a/TAO/tests/DynAny_Test/test_dynstruct.cpp b/TAO/tests/DynAny_Test/test_dynstruct.cpp
deleted file mode 100644
index c5d5d9780e8..00000000000
--- a/TAO/tests/DynAny_Test/test_dynstruct.cpp
+++ /dev/null
@@ -1,405 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynstruct.cpp
- *
- * $Id$
- *
- * Implementation of the DynStruct basic test
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#include "test_dynstruct.h"
-#include "da_testsC.h"
-#include "data.h"
-#include "tao/DynamicAny/DynamicAny.h"
-#include "analyzer.h"
-#include "ace/OS_NS_string.h"
-
-Test_DynStruct::Test_DynStruct (CORBA::ORB_var orb, int debug)
- : orb_ (orb),
- test_name_ (CORBA::string_dup ("test_dynstruct")),
- error_count_ (0),
- debug_ (debug)
-{
-}
-
-Test_DynStruct::~Test_DynStruct (void)
-{
- CORBA::string_free (this->test_name_);
- this->test_name_ = 0;
-}
-
-const char*
-Test_DynStruct::test_name (void) const
-{
- return this->test_name_;
-}
-
-int
-Test_DynStruct::run_test (void)
-{
- Data data (this->orb_);
-
- DynAnyTests::test_struct ts;
- ts.c = data.m_char2;
- ts.l = data.m_long2;
- ts.es.f = data.m_float2;
- ts.es.s = data.m_short2;
-
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/insert/get/next/seek/"
- "rewind/current_component\n"));
-
- CORBA::Object_var factory_obj =
- this->orb_->resolve_initial_references ("DynAnyFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnyFactory_var dynany_factory =
- DynamicAny::DynAnyFactory::_narrow (factory_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (dynany_factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil dynamic any factory after narrow\n"),
- -1);
- }
-
- DynAnyAnalyzer analyzer(this->orb_.in(), dynany_factory.in(), debug_);
-
- CORBA::Any in_any1;
- in_any1 <<= ts;
- DynamicAny::DynAny_var dp1 =
- dynany_factory->create_dyn_any (in_any1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynStruct_var fa1 =
- DynamicAny::DynStruct::_narrow (dp1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->insert_char (data.m_char1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->next (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->insert_long (data.m_long1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->next (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var cc =
- fa1->current_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cc->insert_float (data.m_float1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cc->next (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cc->insert_short (data.m_short1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cc->rewind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // To show that calling destroy() on a component does
- // nothing, as required by the spec.
- cc->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- fa1->rewind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Char c = fa1->get_char (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (c != data.m_char1)
- {
- ++this->error_count_;
- }
-
- fa1->next (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Long l = fa1->get_long (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (l != data.m_long1)
- {
- ++this->error_count_;
- }
-
- fa1->next (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- cc = fa1->current_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- cc->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Short s = cc->get_short (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (s != data.m_short1)
- {
- ++this->error_count_;
- }
-
- if (this->error_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode)/from_any/to_any\n"));
-
- DynamicAny::DynAny_var ftc1_base =
- dynany_factory->create_dyn_any_from_type_code (
- DynAnyTests::_tc_test_struct
- ACE_ENV_ARG_PARAMETER
- );
- ACE_TRY_CHECK;
-
- DynamicAny::DynStruct_var ftc1 =
- DynamicAny::DynStruct::_narrow (ftc1_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ftc1.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynStruct::_narrow() returned nil\n"),
- -1);
- }
-
- ts.c = data.m_char1;
- ts.l = data.m_long1;
- ts.es.f = data.m_float1;
- ts.es.s = data.m_short1;
- CORBA::Any in_any2;
- in_any2 <<= ts;
- ftc1->from_any (in_any2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- analyzer.analyze(ftc1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any1 = ftc1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynAnyTests::test_struct* ts_out;
- out_any1.in () >>= ts_out;
-
- if (ts_out->es.s == data.m_short1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode alias)/from_any/to_any\n"));
-
-
- const DynAnyTests::test_struct *ts_out2 = 0;
- CORBA::Any_var out_any2 ;
- DynamicAny::DynStruct_var ftc2;
-
- ACE_TRY_EX (bad_kind)
- {
- DynamicAny::DynAny_var ftc2_base =
- dynany_factory->create_dyn_any_from_type_code (
- DynAnyTests::_tc_test_struct_alias
- ACE_ENV_ARG_PARAMETER
- );
- ACE_TRY_CHECK_EX (bad_kind);
-
- ftc2 = DynamicAny::DynStruct::_narrow (ftc2_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
-
- if (CORBA::is_nil (ftc2.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynStruct::_narrow() returned nil\n"),
- -1);
- }
-
- ts.c = data.m_char1;
- ts.l = data.m_long1;
- ts.es.f = data.m_float1;
- ts.es.s = data.m_short1;
- CORBA::Any in_any3;
- in_any3 <<= ts;
- ftc2->from_any (in_any3
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
-
-// char c = ftc2->get_char ();
-// CORBA::Boolean status = ftc2->next ();
-// CORBA::Long lo = ftc2->get_long ();
- analyzer.analyze(ftc2.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- out_any2 = ftc2->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
-
- if ((out_any2.in () >>= ts_out2) != 1) // problem
- {
- ts_out2 = 0;
- }
- }
- ACE_CATCH (CORBA::TypeCode::BadKind, ex)
- {
- }
- ACE_ENDTRY;
- ACE_TRY_CHECK;
-
- if (ts_out2 != 0 && ts_out2->es.s == data.m_short1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: current_member_name/current_member_kind\n"));
-
- ftc1->seek (2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::FieldName_var fn =
- ftc1->current_member_name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (fn.in (), "es"))
- {
- ++this->error_count_;
- }
-
- CORBA::TCKind tk =
- ftc1->current_member_kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (tk != CORBA::tk_struct)
- {
- ++this->error_count_;
- }
-
- if (this->error_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: current_member_name/current_member_kind "
- "with alias\n"));
- ftc2->seek (2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::FieldName_var fn2 =
- ftc2->current_member_name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (fn2.in (), "es"))
- {
- ++this->error_count_;
- }
-
- CORBA::TCKind tk2 =
- ftc2->current_member_kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (tk2 != CORBA::tk_struct)
- {
- ++this->error_count_;
- }
-
- if (this->error_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: get_members/set_members\n"));
-
- DynamicAny::NameValuePairSeq_var nvps =
- fa1->get_members (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var sm_base =
- dynany_factory->create_dyn_any_from_type_code (
- DynAnyTests::_tc_test_struct
- ACE_ENV_ARG_PARAMETER
- );
- ACE_TRY_CHECK;
-
- DynamicAny::DynStruct_var sm =
- DynamicAny::DynStruct::_narrow (sm_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (sm.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynStruct::_narrow()[2] returned nil\n"),
- -1);
- }
-
- sm->set_members (nvps.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::NameValuePairSeq_var gm =
- sm->get_members (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong index = 2;
-
- if (ACE_OS::strcmp (gm[index].id, "es"))
- {
- ++this->error_count_;
- }
-
- fa1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ftc1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- sm->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_dynstruct::run_test");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%d errors\n",
- this->error_count_));
-
- return 0;
-}
diff --git a/TAO/tests/DynAny_Test/test_dynstruct.h b/TAO/tests/DynAny_Test/test_dynstruct.h
deleted file mode 100644
index 200d5fb1b5e..00000000000
--- a/TAO/tests/DynAny_Test/test_dynstruct.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynstruct.h
- *
- * $Id$
- *
- * Header file for class to test DynStruct.
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_DYNSTRUCT_H)
-#define TEST_DYNSTRUCT_H
-
-#include "tao/ORB.h"
-
-class Test_DynStruct
-{
-public:
- Test_DynStruct (CORBA::ORB_var orb, int debug);
- ~Test_DynStruct (void);
-
- const char* test_name (void) const;
-
- int run_test (void);
-
-private:
- CORBA::ORB_var orb_;
- char* test_name_;
- CORBA::ULong error_count_;
- int debug_;
-};
-
-#endif /* TEST_DYNSTRUCT_H */
diff --git a/TAO/tests/DynAny_Test/test_dynunion.cpp b/TAO/tests/DynAny_Test/test_dynunion.cpp
deleted file mode 100644
index 21cc5e1ad58..00000000000
--- a/TAO/tests/DynAny_Test/test_dynunion.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynunion.cpp
- *
- * $Id$
- *
- * Implementation of the simple DynUnion test
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-#include "da_testsC.h"
-#include "test_dynunion.h"
-#include "data.h"
-#include "analyzer.h"
-#include "tao/DynamicAny/DynamicAny.h"
-#include "ace/OS_NS_string.h"
-
-Test_DynUnion::Test_DynUnion (CORBA::ORB_var orb, int debug)
- : orb_ (orb),
- test_name_ (CORBA::string_dup ("test_dynunion")),
- error_count_ (0),
- debug_ (debug)
-{
-}
-
-Test_DynUnion::~Test_DynUnion (void)
-{
- CORBA::string_free (this->test_name_);
- this->test_name_ = 0;
-}
-
-const char*
-Test_DynUnion::test_name (void) const
-{
- return this->test_name_;
-}
-
-int
-Test_DynUnion::run_test (void)
-{
- Data data (this->orb_);
-
- DynAnyTests::test_union tu;
-
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG ((LM_DEBUG,
- "\t*=*=*=*= %s =*=*=*=*\n",
- data.labels[12]));
-
- CORBA::Object_var factory_obj =
- this->orb_->resolve_initial_references ("DynAnyFactory"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAnyFactory_var dynany_factory =
- DynamicAny::DynAnyFactory::_narrow (factory_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (dynany_factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil dynamic any factory after narrow\n"),
- -1);
- }
-
- DynAnyAnalyzer analyzer(this->orb_.in(), dynany_factory.in(), debug_);
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/from_any/to_any with string\n"));
-
- DynAnyTests::test_union tstring;
- tstring._d (DynAnyTests::TE_THIRD);
- tstring.str (CORBA::string_dup (data.m_string1));
- CORBA::Any in_any4;
- in_any4 <<= tstring;
- DynamicAny::DynAny_var dp4 =
- dynany_factory->create_dyn_any (in_any4
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynUnion_var fa4 =
- DynamicAny::DynUnion::_narrow (dp4.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- analyzer.analyze(fa4.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any5 = fa4->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var dp5 =
- dynany_factory->create_dyn_any (out_any5.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(Any)/insert/get\n"));
-
- tu._d (DynAnyTests::TE_SECOND);
- tu.tc (data.m_typecode2);
- CORBA::Any in_any1;
- in_any1 <<= tu;
- DynamicAny::DynAny_var dp1 =
- dynany_factory->create_dyn_any (in_any1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynUnion_var fa1 =
- DynamicAny::DynUnion::_narrow (dp1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- fa1->insert_typecode (data.m_typecode1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::TypeCode_var s_out1 = fa1->get_typecode (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean const equal_tc1 =
- s_out1->equal (data.m_typecode1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (equal_tc1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode)/from_any/to_any\n"));
-
- analyzer.analyze(fa1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any1 = fa1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynAny_var ftc1_base =
- dynany_factory->create_dyn_any_from_type_code (DynAnyTests::_tc_test_union
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynUnion_var ftc1 =
- DynamicAny::DynUnion::_narrow (ftc1_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ftc1.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynUnion::_narrow() returned nil\n"),
- -1);
- }
-
- ftc1->from_any (out_any1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::TypeCode_var s_out2 =
- ftc1->get_typecode (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean const equal_tc2 =
- s_out2->equal (data.m_typecode1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (equal_tc2)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: constructor(TypeCode alias)/from_any/to_any\n"));
-
- analyzer.analyze(fa1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var out_any2 = fa1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::TypeCode_var s_out3;
-
- ACE_TRY_EX (bad_kind)
- {
- DynamicAny::DynAny_var ftc2_base =
- dynany_factory->create_dyn_any_from_type_code
- (DynAnyTests::_tc_test_union_alias ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
- DynamicAny::DynUnion_var ftc2 =
- DynamicAny::DynUnion::_narrow (ftc2_base.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
-
- if (CORBA::is_nil (ftc2.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DynUnion::_narrow() returned nil\n"),
- -1);
- }
-
- ftc2->from_any (out_any2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
- ftc2->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
- s_out3 = ftc2->get_typecode (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (bad_kind);
- }
- ACE_CATCH (CORBA::TypeCode::BadKind, ex)
- {
- // Failed to create
- }
- ACE_ENDTRY;
- ACE_TRY_CHECK;
-
- if (!CORBA::is_nil (s_out3.in ()))
- {
- CORBA::Boolean const equal_tc =
- s_out3->equal (data.m_typecode1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (equal_tc)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing:discriminator/discriminator_kind\n"));
-
- DynamicAny::DynAny_var dp2 = ftc1->get_discriminator (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::TypeCode_var tc2 = dp2->type (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::TCKind tc1kind = ftc1->discriminator_kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::TCKind tc2kind = tc2->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (tc2kind == tc1kind)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "testing:member/member_kind/member_name\n"));
-
- DynamicAny::DynAny_var dp3 = ftc1->member (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::String_var m_nm = ftc1->member_name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::TCKind tk = ftc1->member_kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::TypeCode_var tc3 = dp3->get_typecode (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean const equal_tc3 =
- data.m_typecode1->equal (tc3.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!ACE_OS::strcmp (m_nm.in (), "tc")
- && tk == CORBA::tk_TypeCode
- && equal_tc3)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: set_to_default_member\n"));
-
- ftc1->set_to_default_member (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->seek (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->insert_short (data.m_short1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynAny_var mem = ftc1->member (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Short out_s = mem->get_short (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (out_s == data.m_short1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "++ OK ++\n"));
- }
- else
- {
- ++this->error_count_;
- }
-
- fa1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "testing: create_dyn_any with _default()\n"));
- DynAnyTests::test_implicit_def test_implicit_def_union;
- CORBA::Any any_union;
-
- test_implicit_def_union._default();
- ACE_TRY_CHECK;
- any_union <<= test_implicit_def_union;
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var da_union =
- dynany_factory->create_dyn_any (any_union);
- ACE_TRY_CHECK;
-
- // if we get here the create_dyn_any worked.
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_dynunion::run_test");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%d errors\n",
- this->error_count_));
-
- return 0;
-}
diff --git a/TAO/tests/DynAny_Test/test_dynunion.h b/TAO/tests/DynAny_Test/test_dynunion.h
deleted file mode 100644
index f790e0b6f57..00000000000
--- a/TAO/tests/DynAny_Test/test_dynunion.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//=============================================================================
-/**
- * @file test_dynunion.h
- *
- * $Id$
- *
- * Header file for class to test DynUnion.
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_DYNUNION_H)
-#define TEST_DYNUNION_H
-
-#include "tao/ORB.h"
-
-class Test_DynUnion
-{
-public:
- Test_DynUnion (CORBA::ORB_var orb, int debug);
- ~Test_DynUnion (void);
-
- const char* test_name (void) const;
-
- int run_test (void);
-
-private:
- CORBA::ORB_var orb_;
- char* test_name_;
- CORBA::ULong error_count_;
- int debug_;
-};
-
-#endif /* TEST_DYNUNION_H */
-
diff --git a/TAO/tests/DynAny_Test/test_wrapper.cpp b/TAO/tests/DynAny_Test/test_wrapper.cpp
deleted file mode 100644
index a4192374341..00000000000
--- a/TAO/tests/DynAny_Test/test_wrapper.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//=============================================================================
-/**
- * @file test_wrapper.cpp
- *
- * $Id$
- *
- * This file contains the implementation of the DynAny basic test manager
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_WRAPPER_CPP)
-#define TEST_WRAPPER_CPP
-
-#include "test_wrapper.h"
-#include "ace/OS.h"
-#include "ace/Log_Msg.h"
-
-// Constructor
-template <class T>
-Test_Wrapper<T>::Test_Wrapper (T* t)
- : test_object_ (t)
-{
-}
-
-// Destructor
-template <class T>
-Test_Wrapper<T>::~Test_Wrapper (void)
-{
- delete this->test_object_;
-}
-
-template <class T>
-int
-Test_Wrapper<T>::run_test (void)
-{
- const char* test_name = this->test_object_->test_name ();
-
- ACE_DEBUG ((LM_DEBUG,
- "********************* %s *******************\n\n",
- test_name));
-
- if (this->test_object_->run_test () == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) test_wrapper.cpp - run_test:"
- "run_test exception in %s",
- test_name));
-
- return -1;
- }
-
- return 0;
-}
-
-#endif /* TEST_WRAPPER_CPP */
diff --git a/TAO/tests/DynAny_Test/test_wrapper.h b/TAO/tests/DynAny_Test/test_wrapper.h
deleted file mode 100644
index 096490de601..00000000000
--- a/TAO/tests/DynAny_Test/test_wrapper.h
+++ /dev/null
@@ -1,45 +0,0 @@
-
-//=============================================================================
-/**
- * @file test_wrapper.h
- *
- * $Id$
- *
- * Header file for the DynAny basic test manager
- *
- *
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- */
-//=============================================================================
-
-
-#if !defined (TEST_WRAPPER_H)
-#define TEST_WRAPPER_H
-
-template <class T>
-class Test_Wrapper
-{
-public:
- typedef T TEST_OBJECT;
-
- // constructor and destructor
- Test_Wrapper (T *);
-
- ~Test_Wrapper (void);
-
- int run_test (void);
-
-private:
- // This does all the work.
- TEST_OBJECT* test_object_;
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "test_wrapper.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("test_wrapper.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* TEST_WRAPPER_H */
diff --git a/TAO/tests/Explicit_Event_Loop/.cvsignore b/TAO/tests/Explicit_Event_Loop/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Explicit_Event_Loop/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Explicit_Event_Loop/CHANGES b/TAO/tests/Explicit_Event_Loop/CHANGES
deleted file mode 100644
index 6e0c6694fc2..00000000000
--- a/TAO/tests/Explicit_Event_Loop/CHANGES
+++ /dev/null
@@ -1,56 +0,0 @@
-$Id$
-
-Changelog for chapter 3 example in "Advanced CORBA Programming
-with C++" by Michi Henning and Steve Vinoski, Copyright 1999,
-Addison-Wesley, Reading, MA. The following changes have been made
-to the book's source code to make the example work with TAO and
-with various platforms and compilers.
-
-______________________________________________________________________________
-ESSENTIAL CHANGES:
- 1. changed filenames .cc to .cpp and .hh h, and modified #includes in
- client.cpp server.cpp and server.h appropriately.
-
- 2. a) changed #include "time.h" to #include "timeC.h" in client.cpp
-
- b) Moved standard #includes below local #includes, and commented-out
- unnecessary #includes to avoid warnings and errors (g++)
- -client.cpp now reads:
- #include "timeC.h"
- #include <iomanip.h>
- // #include <iostream.h>
- -server.cpp now reads:
- #include "server.h"
- // #include <time.h>
- // #include <iostream.h>
-
-______________________________________________________________________________
-ADDITIONAL CHANGES:
- 3. added .in() to _var type parameters
- -3 times in client.cpp for calls to is_nil() and _narrow()
- -3 times in main() in server.cpp for calls to _narrow(),
- object_to_string, and <<
-
-______________________________________________________________________________
-CHANGES MADE EXCLUSIVLY FOR TESTING PURPOSES
-
- 4. to allow the test to be built without exceptions=1, all try/catch
- code has been replaced with ACE_TRY macros, and the CORBA Environment
- variable has been added to the parameters of get_gmt().
-
- 5. In server.cpp, the call to orb->run() has been replaced with an explicit
- event utilizing orb->work_pending() and orb->perform_work().
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc b/TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc
deleted file mode 100644
index 6da42a65f4b..00000000000
--- a/TAO/tests/Explicit_Event_Loop/Explicit_Event_Loop.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- timeC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Explicit_Event_Loop/README b/TAO/tests/Explicit_Event_Loop/README
deleted file mode 100644
index 939e4134b7e..00000000000
--- a/TAO/tests/Explicit_Event_Loop/README
+++ /dev/null
@@ -1,46 +0,0 @@
-$Id$
-
-This tests the methods work_pending() and perform_work() methods of
-the orb. The simple time server, instead of calling orb->run(), has
-an loop in which work_pending() and perform_work() are called
-explicitly. Its usage is specified below.
-
-______________________________________________________________________________
-This test has been adapted from code in chapter 3 of "Advanced CORBA
-Programming with C++" by Michi Henning and Steve Vinoski. Copyright 1999.
-Addison-Wesley, Reading, MA. To make the examples work with TAO, some minor
-modifications to the source code have been made, with permission, by Mike
-Moran <mm4@cs.wustl.edu>. All of these changes are documented in the file
-CHANGES in this directory.
-______________________________________________________________________________
-
-Summary:
- This is the simple time server given in chapter 3 of the book.
- There is a server process which holds a servant object which can return
- the current Greenwich time, and a client process which can acess this
- object.
-
-Building:
- This test uses the ACE_TRY macros, and does not need to use native
- C++ exceptions. Make sure to use TAO_FLAG Ge=1 to ensure that
- CORBA::Environment variables are created in the IDL generated stubs
- and skeletons.
-
- With GNU make, simply type
-
- % make
-
- to create the executable server and client
-
-server:
- The server takes no parameters nor command line options and returns an
- IOR to stdout. The server then waits infinitely for clients requests.
-
-client:
- The client takes an IOR from the command line, prints out the current
- time, and terminates.
-
-run_test.pl:
- This is currently a UNIX only script! It starts up the server, redirecting
- stdout to a file, then passes the file's contents to the command line of
- the client. After the client terminates, the server is killed.
diff --git a/TAO/tests/Explicit_Event_Loop/client.cpp b/TAO/tests/Explicit_Event_Loop/client.cpp
deleted file mode 100644
index 174fa2dc97c..00000000000
--- a/TAO/tests/Explicit_Event_Loop/client.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Explicit_Event_Loop
-//
-// = FILENAME
-// client.cpp
-//
-// = AUTHORS
-// Source code used in TAO has been modified and adapted from the
-// code provided in the book, "Advanced CORBA Programming with C++"
-// by Michi Henning and Steve Vinoski. Copyright
-// 1999. Addison-Wesley, Reading, MA. Used with permission of
-// Addison-Wesley.
-//
-// Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "timeC.h"
-
-#include "ace/Log_Msg.h"
-
-// The following header is #included automatically by ACE+TAO.
-// Therefore, they don't need to be included explicitly.
-//#include <iostream.h>
-//#include <iomanip.h>
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Initialize orb
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Check arguments.
- if (argc != 2)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: client IOR_string\n"),
- 1);
- }
-
- // Destringify argv[1].
- CORBA::Object_var obj = orb->string_to_object (argv[1]
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (obj.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Time reference\n"),
- 1);
- }
-
- // Narrow.
- Time_var tm = Time::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (tm.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Argument is not a Time reference\n"),
- 1);
- }
-
- // Get time.
- TimeOfDay tod = tm->get_gmt (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s%s%d:%s%d:%d\n",
- "Time in Greenwich is ",
- tod.hour < 10 ? "0" : "",
- tod.hour,
- tod.minute < 10 ? "0" : "",
- tod.minute,
- tod.second));
- }
-
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "client: a CORBA exception occured");
- return 1;
- }
- ACE_CATCHALL
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "client: an unknown exception was caught\n"),
- 1);
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
- return 0;
-}
diff --git a/TAO/tests/Explicit_Event_Loop/run_test.pl b/TAO/tests/Explicit_Event_Loop/run_test.pl
deleted file mode 100755
index 103f523706c..00000000000
--- a/TAO/tests/Explicit_Event_Loop/run_test.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", "file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Explicit_Event_Loop/server.cpp b/TAO/tests/Explicit_Event_Loop/server.cpp
deleted file mode 100644
index 498c465ec22..00000000000
--- a/TAO/tests/Explicit_Event_Loop/server.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Explicit_Event_Loop
-//
-// = FILENAME
-// server.cpp
-//
-// = AUTHORS
-// Source code used in TAO has been modified and adapted from the
-// code provided in the book, "Advanced CORBA Programming with C++"
-// by Michi Henning and Steve Vinoski. Copyright
-// 1999. Addison-Wesley, Reading, MA. Used with permission of
-// Addison-Wesley.
-//
-// Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "server.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_unistd.h"
-
-const char *ior_output_file = "server.ior";
-int done = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'd':
- TAO_debug_level++;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-TimeOfDay
-Time_impl::
-get_gmt ( ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- time_t time_now = time (0);
- struct tm *time_p = gmtime (&time_now);
-
- TimeOfDay tod;
- tod.hour = time_p->tm_hour;
- tod.minute = time_p->tm_min;
- tod.second = time_p->tm_sec;
-
- done = 1;
-
- return tod;
-}
-
-void do_something_else()
-{
- // Sleep a bit so we don't eat up
- // a ton of cpu
- ACE_OS::sleep(3);
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Initialize orb
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- // Get reference to Root POA.
- CORBA::Object_var obj
- = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa
- = PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Activate POA manager.
- PortableServer::POAManager_var mgr
- = poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create an object.
- Time_impl time_servant;
-
- // Write its stringified reference to stdout.
- Time_var tm = time_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var str = orb->object_to_string (tm.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- str.in ()));
-
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((
- LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file
- ),
- 1
- );
- }
-
- ACE_OS::fprintf (output_file,
- "%s",
- str.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Explicit Event Loop.
- while (!done)
- {
- CORBA::Boolean pending =
- orb->work_pending (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (pending)
- {
- orb->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- do_something_else ();
- }
-
- orb->shutdown ();
- orb->destroy ();
- }
-
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "server: a CORBA exception occured");
- return 1;
- }
- ACE_CATCHALL
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s\n",
- "client: an unknown exception was caught\n"),
- 1);
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Explicit_Event_Loop/server.h b/TAO/tests/Explicit_Event_Loop/server.h
deleted file mode 100644
index e5c19b27546..00000000000
--- a/TAO/tests/Explicit_Event_Loop/server.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Explicit_Event_Loop
-//
-// = FILENAME
-// server.h
-//
-// = AUTHORS
-// Source code used in TAO has been modified and adapted from the code
-// provided in the book, "Advanced CORBA Programming with C++" by Michi
-// Henning and Steve Vinoski. Copyright 1999. Addison-Wesley, Reading,
-// MA. Used with permission of Addison-Wesley.
-//
-// Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef server_HH_
-#define server_HH_
-
-#include "timeS.h"
-
-class Time_impl : public virtual POA_Time
-{
-public:
- virtual TimeOfDay get_gmt (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#endif /* server_HH_ */
diff --git a/TAO/tests/Explicit_Event_Loop/time.idl b/TAO/tests/Explicit_Event_Loop/time.idl
deleted file mode 100644
index 827ea4c527d..00000000000
--- a/TAO/tests/Explicit_Event_Loop/time.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-
-// $Id$
-
-struct TimeOfDay {
- short hour; // 0 - 23
- short minute; // 0 - 59
- short second; // 0 - 59
-};
-
-interface Time {
- TimeOfDay get_gmt();
-};
-
diff --git a/TAO/tests/Exposed_Policies/.cvsignore b/TAO/tests/Exposed_Policies/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Exposed_Policies/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Exposed_Policies/Counter.idl b/TAO/tests/Exposed_Policies/Counter.idl
deleted file mode 100644
index d8fa1959ce3..00000000000
--- a/TAO/tests/Exposed_Policies/Counter.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-//$Id$
-
-/// This interface abstracts a counter. It provides methods
-/// for increasing and getting the value of the counter.
-interface Counter
-{
- /// Increases the counter value.
- void increment ();
-
- /// Decreases the counter value.
- long get_count ();
-
- /// Sets the counter value to zero.
- void reset ();
-
- /// Shuts down the ORB on which this obj is running.
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Exposed_Policies/Counter_i.cpp b/TAO/tests/Exposed_Policies/Counter_i.cpp
deleted file mode 100644
index 4a707034563..00000000000
--- a/TAO/tests/Exposed_Policies/Counter_i.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//$Id$
-
-#include "Counter_i.h"
-
-ACE_RCSID(tao, Counter_Servant, "$Id$")
-
-// Dtor-Ctor Implementation.
-
-Counter_Servant::Counter_Servant (Policy_Tester *policy_tester)
- : count_ (0),
- policy_tester_ (policy_tester)
-{
- // No-Op.
-}
-
-Counter_Servant::~Counter_Servant (void)
-{
- // No-Op.
-}
-
-// Counter Interface Methods Implementation.
-
-void
-Counter_Servant::increment (ACE_ENV_SINGLE_ARG_DECL_NOT_USED/*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++this->count_;
-}
-
-CORBA::Long
-Counter_Servant::get_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED/*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->count_;
-}
-
-void
-Counter_Servant::reset (ACE_ENV_SINGLE_ARG_DECL_NOT_USED/*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->count_ = 0;
-}
-
-void
-Counter_Servant::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->policy_tester_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-}
diff --git a/TAO/tests/Exposed_Policies/Counter_i.h b/TAO/tests/Exposed_Policies/Counter_i.h
deleted file mode 100644
index 503d9cd3296..00000000000
--- a/TAO/tests/Exposed_Policies/Counter_i.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//$Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Exposed_Policies
-//
-// = FILENAME
-// Counter_i.h
-//
-// = DESCRIPTION
-// This class implements the Counter IDL interface.
-//
-// = AUTHOR
-// Angelo Corsaro <corsaro@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef COUNTER_I_H_
-#define COUNTER_I_H_
-
-// -- App. Specific Include --
-#include "CounterS.h"
-#include "Policy_Tester.h"
-
-
-class Counter_Servant : public POA_Counter
-{
-public:
-
- // = Ctor-Dtor Declaration
-
- Counter_Servant (Policy_Tester *policy_tester);
- virtual ~Counter_Servant (void);
-
- // = Counter Interface Methods Overloading.
-
- virtual void increment (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Long get_count (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void reset (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- CORBA::Long count_;
- Policy_Tester *policy_tester_;
-};
-
-#endif /*COUNTER_I_H_*/
diff --git a/TAO/tests/Exposed_Policies/Exposed_Policies.mpc b/TAO/tests/Exposed_Policies/Exposed_Policies.mpc
deleted file mode 100644
index 6e9c5283fe0..00000000000
--- a/TAO/tests/Exposed_Policies/Exposed_Policies.mpc
+++ /dev/null
@@ -1,25 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server {
- Source_Files {
- Policy_Tester.cpp
- Policy_Verifier.cpp
- RT_Properties.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_server {
- exename = client
- after += *Server
-
- Source_Files {
- CounterC.cpp
- Policy_Tester.cpp
- Policy_Verifier.cpp
- RT_Properties.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Exposed_Policies/Object.cfg b/TAO/tests/Exposed_Policies/Object.cfg
deleted file mode 100644
index 68f5672d6ad..00000000000
--- a/TAO/tests/Exposed_Policies/Object.cfg
+++ /dev/null
@@ -1 +0,0 @@
-Priority 4
diff --git a/TAO/tests/Exposed_Policies/Object.cfg.tru64 b/TAO/tests/Exposed_Policies/Object.cfg.tru64
deleted file mode 100644
index adba1999c4a..00000000000
--- a/TAO/tests/Exposed_Policies/Object.cfg.tru64
+++ /dev/null
@@ -1 +0,0 @@
-Priority 24
diff --git a/TAO/tests/Exposed_Policies/POA.cfg b/TAO/tests/Exposed_Policies/POA.cfg
deleted file mode 100644
index d0e054fa835..00000000000
--- a/TAO/tests/Exposed_Policies/POA.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-Priority 1
-
-Priority_Bands 2
-Priority_Range 0 2
-Priority_Range 3 5
diff --git a/TAO/tests/Exposed_Policies/POA.cfg.tru64 b/TAO/tests/Exposed_Policies/POA.cfg.tru64
deleted file mode 100644
index d327282c330..00000000000
--- a/TAO/tests/Exposed_Policies/POA.cfg.tru64
+++ /dev/null
@@ -1,5 +0,0 @@
-Priority 21
-
-Priority_Bands 2
-Priority_Range 20 22
-Priority_Range 23 25
diff --git a/TAO/tests/Exposed_Policies/Policy_Tester.cpp b/TAO/tests/Exposed_Policies/Policy_Tester.cpp
deleted file mode 100644
index 217eacdae41..00000000000
--- a/TAO/tests/Exposed_Policies/Policy_Tester.cpp
+++ /dev/null
@@ -1,298 +0,0 @@
-// $Id$
-
-// -- App. Specific Include --
-#include "Policy_Tester.h"
-#include "RT_Properties.h"
-#include "CounterC.h"
-
-// -- ACE Include --
-#include "ace/Arg_Shifter.h"
-#include "ace/OS_NS_stdio.h"
-
-// -- RTCORBA Include --
-#include "tao/RTCORBA/RT_Policy_i.h"
-
-// -- RTCORBA Include --
-#include "tao/RTCORBA/RT_ORB.h"
-
-#include "tao/ORB_Constants.h"
-#include "tao/ORB_Core.h"
-
-ACE_RCSID (tao, Policy_Tester, "$Id$")
-
-Policy_Tester::Policy_Tester (void)
- : rt_object_properties_ (0),
- rt_poa_properties_ (0)
-{
- // No_Op
-}
-
-Policy_Tester::~Policy_Tester (void)
-{
-}
-
-void
-Policy_Tester::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- PortableServer::POAManager_var poa_manager =
- this->child_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-Policy_Tester::init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
-{
- // ORB Initialization.
- this->orb_ =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get a reference to the RT-ORB.
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->rt_orb_ = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Here we parse the command line paramether passed
- // to the application.
-
- ACE_Arg_Shifter arg_shifter (argc, argv);
-
- while (arg_shifter.is_anything_left ())
- {
- const char *arg = 0;
- // IOR File Name Option.
- if ((arg = arg_shifter.get_the_parameter ("-POAConfigFile")))
- {
- this->rt_poa_properties_ =
- RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
- else if ((arg = arg_shifter.get_the_parameter ("-ObjectConfigFile")))
- {
- this->rt_object_properties_ =
- RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
- else if ((arg = arg_shifter.get_the_parameter ("-BaseObjectIOR")))
- {
- if (this->rt_poa_properties_ == 0)
- {
- ACE_NEW_THROW_EX (this->rt_poa_properties_,
- RT_Properties,
- CORBA::NO_MEMORY (TAO::VMCID,
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (-1);
- }
- this->rt_poa_properties_->ior_source (arg);
- }
- else if ((arg = arg_shifter.get_the_parameter ("-OverriddenIOR")))
- {
- if (this->rt_object_properties_ == 0)
- {
- ACE_NEW_THROW_EX (this->rt_object_properties_,
- RT_Properties,
- CORBA::NO_MEMORY (TAO::VMCID,
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (-1);
- }
- this->rt_object_properties_->ior_source (arg);
- }
- else
- arg_shifter.consume_arg ();
- }
-
- if ((this->rt_poa_properties_ == 0) || (this->rt_object_properties_ == 0))
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Configuration file missing!")));
- return -1;
- }
-
- int result =
- this->create_objects (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (result != 0)
- return result;
-
- return 0;
-}
-
-CORBA::Boolean
-Policy_Tester::check_reference (CORBA::Object_ptr object,
- const char *msg)
-{
- if (CORBA::is_nil (object))
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (msg)));
- return 0;
- }
- return 1;
-}
-
-
-int
-Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::PolicyList poa_policy_list;
- poa_policy_list.length (3);
-
- // Create the priority policy using the RT-ORB.
- RTCORBA::Priority priority = this->rt_poa_properties_->priority ();
- poa_policy_list[0] =
- this->rt_orb_->create_priority_model_policy (RTCORBA::SERVER_DECLARED,
- priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create priority Banded Connection Policy.
- RTCORBA::PriorityBands poa_priority_bands =
- this->rt_poa_properties_->priority_bands ();
-
- poa_policy_list[1] =
- this->rt_orb_->create_priority_banded_connection_policy (poa_priority_bands
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Client Protocol Policy.
- RTCORBA::ProtocolList protocol_list;
- protocol_list.length (1);
-
- protocol_list[0].protocol_type = IOP::TAG_INTERNET_IOP;
- protocol_list[0].orb_protocol_properties =
- TAO_Protocol_Properties_Factory::create_orb_protocol_property (IOP::TAG_INTERNET_IOP);
-
- protocol_list[0].transport_protocol_properties =
- TAO_Protocol_Properties_Factory::create_transport_protocol_property (IOP::TAG_INTERNET_IOP,
- this->orb_->orb_core ());
-
- poa_policy_list[2] =
- this->rt_orb_->create_client_protocol_policy (protocol_list);
-
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->poa_ =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- PortableServer::POAManager_var poa_mgr =
- PortableServer::POAManager::_nil ();
-
- object =
- this->poa_->create_POA ("Child_POA",
- poa_mgr.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->child_poa_ =
- RTPortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create a Corba Object reference, using the policies
- // set at the POA level.
- object =
- this->child_poa_->create_reference ("IDL:Counter:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Reference Created!\n")));
-
- if (!check_reference (object.in (),
- "Unable to create Object!\n"))
- return -1;
-
- Counter_var base_object = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (!check_reference (base_object.in(),
- "Unable to create a Object!\n"))
- return -1;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (base_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Activated as <%s>\n"), ior.in ()));
-
- FILE *output_file = ACE_OS::fopen (this->rt_poa_properties_->ior_source (), "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Cannot open output file for writing IOR: %s"),
- this->rt_poa_properties_->ior_source ()),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- // Now we create an object that overrides some of the policies
- // set at the POA level.
-
-
- // Create a Corba Object reference, using the policies
- // set at the POA level.
-
- object =
- this->child_poa_->create_reference_with_priority
- ("IDL:Counter:1.0",
- this->rt_object_properties_->priority ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Reference Created!\n")));
-
- if (!check_reference (object.in (),
- "Unable to create a Counter Object!\n"))
- return -1;
-
- Counter_var over_object = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (!check_reference (over_object.in(),
- "Unable to create Object!\n"))
- return -1;
-
-
- CORBA::String_var o_ior =
- this->orb_->object_to_string (over_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Activated as <%s>\n"), o_ior.in ()));
-
- output_file = ACE_OS::fopen (this->rt_object_properties_->ior_source (), "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Cannot open output file for writing IOR: %s"),
- this->rt_object_properties_->ior_source ()),
- -1);
- ACE_OS::fprintf (output_file, "%s", o_ior.in ());
- ACE_OS::fclose (output_file);
- return 0;
-}
-
-void
-Policy_Tester::shutdown (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Exposed_Policies/Policy_Tester.h b/TAO/tests/Exposed_Policies/Policy_Tester.h
deleted file mode 100644
index 970ed503b7f..00000000000
--- a/TAO/tests/Exposed_Policies/Policy_Tester.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Exposed_Policies
-//
-// = FILENAME
-// Policy_Verifier.h
-//
-// = DESCRIPTION
-// This class verifies that the policy are correctly embedded
-// in the IOR.
-//
-// = AUTHOR
-// Angelo Corsaro <corsaro@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef POLICY_TESTER_H_
-#define POLICY_TESTER_H_
-
-// -- App. Specific Include --
-#include "RT_Properties.h"
-
-// -- TAO Include --
-#include "tao/ORB.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-
-class Policy_Tester
-{
-public:
- // Ctor/Dtor.
- Policy_Tester (void);
- ~Policy_Tester (void);
-
- void run (ACE_ENV_SINGLE_ARG_DECL);
- // Runs the test.
-
- int init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL);
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL);
-private:
- // Helper method used internally.
- int create_objects (ACE_ENV_SINGLE_ARG_DECL);
-
- CORBA::Boolean check_reference (CORBA::Object_ptr object,
- const char *msg);
-
-private:
-
- int is_initialized_;
-
- RTCORBA::RTORB_var rt_orb_;
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- RTPortableServer::POA_var child_poa_;
- RT_Properties *rt_object_properties_;
- RT_Properties *rt_poa_properties_;
-};
-
-
-#endif /* POLICY_TESTER_H_ */
diff --git a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp
deleted file mode 100644
index 4541f43613c..00000000000
--- a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp
+++ /dev/null
@@ -1,267 +0,0 @@
-#include "Policy_Verifier.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (tao, Policy_Verifier, "$Id$")
-
-Policy_Verifier::Policy_Verifier (void)
- : priority_bands_ (0)
-{
- ACE_OS::strcpy (this->base_object_ref_,
- "file://default.ior");
- ACE_OS::strcpy (this->overridden_object_ref_,
- "file://overridden.ior");
-}
-
-Policy_Verifier::~Policy_Verifier (void)
-{
- // No Op.
-}
-
-bool
-Policy_Verifier::init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
-{
- this->orb_ =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- ACE_Arg_Shifter arg_shifter (argc, argv);
-
- while (arg_shifter.is_anything_left ())
- {
- const char *arg = 0;
- // IOR File Name Option.
- if ((arg = arg_shifter.get_the_parameter ("-POAConfigFile")))
- {
- this->rt_poa_properties_ =
- RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- this->priority_bands_ =
- this->rt_poa_properties_->priority_bands ().length ();
- }
- else if ((arg = arg_shifter.get_the_parameter ("-ObjectConfigFile")))
- {
- this->rt_object_properties_ =
- RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
- }
- else if ((arg = arg_shifter.get_the_parameter ("-BaseObjectIOR")))
- {
- if (this->rt_poa_properties_ == 0)
- {
- ACE_NEW_THROW_EX (this->rt_poa_properties_,
- RT_Properties,
- CORBA::NO_MEMORY (TAO::VMCID,
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (false);
- }
- this->rt_poa_properties_->ior_source (arg);
- ACE_OS::strcpy (this->base_object_ref_, "file://");
- ACE_OS::strcat (this->base_object_ref_,
- this->rt_poa_properties_->ior_source ());
- }
- else if ((arg = arg_shifter.get_the_parameter ("-OverriddenIOR")))
- {
- if (this->rt_object_properties_ == 0)
- {
- ACE_NEW_THROW_EX (this->rt_object_properties_,
- RT_Properties,
- CORBA::NO_MEMORY (TAO::VMCID,
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (false);
- }
- this->rt_object_properties_->ior_source (arg);
- ACE_OS::strcpy (this->overridden_object_ref_, "file://");
- ACE_OS::strcat (this->overridden_object_ref_,
- this->rt_object_properties_->ior_source ());
- }
- else
- {
- arg_shifter.consume_arg ();
- }
- }
-
- if ((this->rt_poa_properties_ == 0) || (this->rt_object_properties_ == 0))
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Configuration file missing!\n")));
- return false;
- }
-
- // Get the Object references.
- CORBA::Object_var object = this->orb_->string_to_object (this->base_object_ref_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (!Policy_Verifier::check_reference (object.in (), "Invalid IOR file!\n"))
- return false;
-
- this->base_object_ = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (!Policy_Verifier::check_reference (this->base_object_.in (),
- "Unable to convert the IOR to the proper object reference.\n"))
- return false;
-
- object = this->orb_->string_to_object (this->overridden_object_ref_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (!Policy_Verifier::check_reference (object.in (), "Invalid IOR file!\n"))
- return false;
-
- this->overridden_object_ = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (false);
-
- if (!Policy_Verifier::check_reference (this->overridden_object_.in (),
- "Unable to convert the IOR to the proper object reference.\n"))
- return false;
-
- return true;
-}
-
-void
-Policy_Verifier::run (ACE_ENV_SINGLE_ARG_DECL )
-{
- this->verify_reference (this->base_object_.in (),
- this->rt_poa_properties_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->verify_reference (this->overridden_object_.in (),
- this->rt_object_properties_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Policy_Verifier::verify_reference (Counter_ptr object,
- RT_Properties *rt_properties
- ACE_ENV_ARG_DECL)
-{
-
- ACE_TRY
- {
- CORBA::Policy_var policy_var =
- object->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (Policy_Verifier::check_reference (policy_var.in (), "Unable to get Priority Policy.\n"))
- {
- RTCORBA::PriorityModelPolicy_var priority_policy =
- RTCORBA::PriorityModelPolicy::_narrow (policy_var.in ());
-
- RTCORBA::PriorityModel priority_model =
- priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Priority priority =
- priority_policy->server_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (priority_model == RTCORBA::SERVER_DECLARED)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n\nPriority Model: RTCORBA::SERVER_DECLARED\n")
- ));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Priority Model: %d\nCORBA Priority: %d\n\n"),
- priority_model,
- priority
- ));
-
-
- if (priority != rt_properties->priority ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Priority Value Mismatch.\n")));
- }
-
- policy_var = object->_get_policy (RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (Policy_Verifier::check_reference (policy_var.in (),
- "Unable to get Priority Banded Policy\n"))
- {
-
- RTCORBA::PriorityBandedConnectionPolicy_var priority_banded_policy =
- RTCORBA::PriorityBandedConnectionPolicy::_narrow (policy_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- if (Policy_Verifier::check_reference (priority_banded_policy.in (),
- "Unable to get Priority Banded Policy\n"))
- {
-
- // Here we have a priority banded connection policy.
-
- RTCORBA::PriorityBands_var pb =
- priority_banded_policy->priority_bands ();
- unsigned int band_num = pb->length ();
- if (band_num != this->priority_bands_)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Mismatching Number of Priority Bands!\n")));
-
- for (unsigned int i = 0; i < band_num; ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Priority Band <%d>: (%d, %d)\n"),
- i,
- pb[i].low,
- pb[i].high
- ));
-
-
- if ((band_num == rt_properties->priority_bands ().length ()) &&
- ((pb[i].low != rt_properties->priority_bands ()[i].low) ||
- (pb[i].high != rt_properties->priority_bands ()[i].high)))
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Mismatching Priority Band Range!\n")));
-
- }
- }
- }
- policy_var = object->_get_policy (RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (Policy_Verifier::check_reference (policy_var.in (),
- "Unable to get Client Protocol Policy\n"))
- {
- RTCORBA::ClientProtocolPolicy_var client_protocol_policy =
- RTCORBA::ClientProtocolPolicy::_narrow (policy_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ProtocolList_var protocol_list =
- client_protocol_policy->protocols (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (unsigned int i = 0; i < protocol_list->length (); i++)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\nThe Client Protocol Type: %d\n"),
- protocol_list[i].protocol_type));
-
- }
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "CORBA Exception Raised");
- }
-
- ACE_ENDTRY;
-}
-
-CORBA::Boolean
-Policy_Verifier::check_reference (CORBA::Object_ptr object,
- const char *msg)
-{
- if (CORBA::is_nil (object))
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (msg)));
- return 0;
- }
- return 1;
-}
diff --git a/TAO/tests/Exposed_Policies/Policy_Verifier.h b/TAO/tests/Exposed_Policies/Policy_Verifier.h
deleted file mode 100644
index 8eeec72ae89..00000000000
--- a/TAO/tests/Exposed_Policies/Policy_Verifier.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Exposed_Policies
-//
-// = FILENAME
-// Policy_Verifier.h
-//
-// = DESCRIPTION
-// This class verifies that the policy are correctly embedded
-// in the IOR.
-//
-// = AUTHOR
-// Angelo Corsaro <corsaro@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef POLICY_VERIFIER_H_
-#define POLICY_VERIFIER_H_
-
-// -- App. Specific Include --
-#include "CounterC.h"
-#include "RT_Properties.h"
-
-// -- ACE Include --
-#include "ace/Arg_Shifter.h"
-#include "ace/Log_Msg.h"
-
-// -- TAO Include --
-#include "tao/Basic_Types.h"
-#include "tao/ORB_Constants.h"
-
-class Policy_Verifier
-{
-public:
-
- // -- Ctor/Dtor --
- Policy_Verifier (void);
- ~Policy_Verifier (void);
-
- bool init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- void run (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
-private:
- // -- Helper methods --
- void verify_reference (Counter_ptr counter,
- RT_Properties *rt_properties
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- CORBA::Boolean check_reference (CORBA::Object_ptr object,
- const char *msg);
-
-private:
-
- CORBA::ORB_var orb_;
-
- RT_Properties *rt_object_properties_;
- RT_Properties *rt_poa_properties_;
- unsigned int priority_bands_;
- Counter_var base_object_;
- Counter_var overridden_object_;
-
- char base_object_ref_[256];
- char overridden_object_ref_[256];
-};
-
-#endif /* POLICY_VERIFIER_H_ */
diff --git a/TAO/tests/Exposed_Policies/README b/TAO/tests/Exposed_Policies/README
deleted file mode 100644
index ad737b918e0..00000000000
--- a/TAO/tests/Exposed_Policies/README
+++ /dev/null
@@ -1,79 +0,0 @@
-$Id$
-
-This directory contains a test case used to verify that the client
-exposed policies get embedded correctly in the IOR and exposed to the
-client in the object reference.
-
-The policy tested are:
-
- - PriorityModelPolicy
- - PriorityBandedConnectionPolicy
- - ClientProtocolPolicy
-
-The policy can be set at POA level or at object level. The policies
-that have to be associated with a POA or with an object are specified
-using a configuration file. As an example we can consider the file
-POA.cfg that contains the policy used to create a child POA:
-
-File: POA.cfg
-
- IOR_Source poa.ior
-
- Priority 10
-
- Priority_Bands 5
- Priority_Range 3 5
- Priority_Range 7 11
- Priority_Range 5 9
- Priority_Range 1 5
- Priority_Range 10 15
-
-
-The tag used to decribe the information have the following meaning:
-
- - IOR_Source: Defines the name of the file that has to be used to
- store the IOR of the object created.
-
- - Priority: Defines a CORBA::Priority value.
-
- - Priority_Bands: Defines the number of priority bands.
-
- - Priority_Range: Defines the priority range associated with a
- priority_band.
-
-
-The policies value that are specified in the config file can be used
-to set the policy at POA level or to override those police on a Object
-level basis (beaware that the only policy that can be overridden on an
-Object basis is the Priority).
-
-In particular the option "-POAConfigFile" let you specify the policy
-that have to be used when the POA is created. While the option
-"-ObjectConfigFile" let you set the options on a object basis
-overriding the policies that were set at a POA level.
-
-
-When the test is run two object are created, of this object one has
-the same priority that where specified when the POA was created, while
-the other ovverride some of them as prescribed in the config file
-specified with the option "-ObjectConfigFile".
-
-The config file are used by the client side to verify that what is
-embedded in the IOR is correct.
-
-
-USAGE:
-
- server -ORBSvcConf server.conf -ORBendpoint iiop://<hostaddr>:0/priority=<priority> -ORBendpoint iiop://<hostaddr>:0/priority=<priority> -POAConfigFile <config_file_name> -ObjectConfigFile <config_file_name>
-
- client -POAConfigFile <config_file_name>
- -ObjectConfigFile <config_file_name>
-
-
-EXAMPLE:
-
- $ server -POAConfigFile POA.cfg -ObjectConfigFile Object.cfg
-
- $ client -POAConfigFile POA.cfg -ObjectConfigFile Object.cfg
-
- $ client -POAConfigFile POA.cfg -ObjectConfigFile Object.cfg
diff --git a/TAO/tests/Exposed_Policies/RT_Properties.cpp b/TAO/tests/Exposed_Policies/RT_Properties.cpp
deleted file mode 100644
index 4a23c92f0f5..00000000000
--- a/TAO/tests/Exposed_Policies/RT_Properties.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-//$Id$
-
-#include "RT_Properties.h"
-
-#include "tao/ORB_Constants.h"
-
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (ExposedPolicies, RT_Properties, "$Id$")
-
-RT_Properties::RT_Properties (void)
- : priority_ (10)
-{
- ACE_OS::strcpy (ior_source_, "poa_default.ior");
-}
-
-RT_Properties::~RT_Properties (void)
-{
- // No-Op.
-}
-
-RT_Properties *
-RT_Properties::read_from (const char *file_name
- ACE_ENV_ARG_DECL)
-{
- FILE *fp = ACE_OS::fopen (file_name, "r");
-
- RT_Properties *rt_properties;
-
- ACE_NEW_THROW_EX (rt_properties,
- RT_Properties,
- CORBA::NO_MEMORY (TAO::VMCID,
- CORBA::COMPLETED_NO));
-
- // @@ Angelo: what if the length is more than 255?
- char string_field[256];
- int int_field;
- unsigned int i = 0;
-
- while (fscanf (fp, "%s", string_field) != EOF )
- {
- if (ACE_OS::strcmp (string_field, "Priority") == 0)
- {
- fscanf (fp, "%d", &int_field);
- rt_properties->priority (int_field);
- }
- else if (ACE_OS::strcmp (string_field, "Priority_Bands") == 0)
- {
- fscanf (fp, "%d", &int_field);
- rt_properties->priority_bands_.length (int_field);
-
- }
- else if (ACE_OS::strcmp (string_field, "Priority_Range") == 0)
- {
- fscanf (fp, "%d", &int_field);
- rt_properties->priority_bands_[i].low = int_field;
-
- fscanf (fp, "%d", &int_field);
- rt_properties->priority_bands_[i].high = int_field;
-
- ++i;
- }
- }
-
-
- return rt_properties;
-}
-
-void
-RT_Properties::priority (RTCORBA::Priority priority)
-{
- this->priority_ = priority;
-}
-
-RTCORBA::Priority
-RT_Properties::priority (void)
-{
- return this->priority_;
-}
-
-void
-RT_Properties::priority_bands (const RTCORBA::PriorityBands& priority_bands)
-{
- this->priority_bands_ = priority_bands;
-}
-
-const RTCORBA::PriorityBands&
-RT_Properties::priority_bands (void)
-{
- return this->priority_bands_;
-}
-
-
-void
-RT_Properties::ior_source (const char *s)
-{
- // @@ Angelo: please use strncpy() for strings like this, otherwise
- // you could blow the buffer limits!
- ACE_OS::strcpy (this->ior_source_, s);
-}
-
-const char *
-RT_Properties::ior_source (void)
-{
- return this->ior_source_;
-}
diff --git a/TAO/tests/Exposed_Policies/RT_Properties.h b/TAO/tests/Exposed_Policies/RT_Properties.h
deleted file mode 100644
index 35166b9d9fa..00000000000
--- a/TAO/tests/Exposed_Policies/RT_Properties.h
+++ /dev/null
@@ -1,52 +0,0 @@
-//$Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO
-//
-// = FILENAME
-// RT_Properties.h
-//
-// = DESCRIPTION
-// Defines a series of "real time" property that an Object
-// or a POA created on a RT-ORB can have.
-//
-// = AUTHOR
-// Angelo Corsaro <corsaro@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef RT_PROPERTIES_H_
-#define RT_PROPERTIES_H_
-
-#include "tao/RTCORBA/RTCORBA.h"
-
-class RT_Properties
-{
-public:
- // -- Ctor/Dtor --
- RT_Properties (void);
- ~RT_Properties (void);
-
- static RT_Properties * read_from (const char *file_name
- ACE_ENV_ARG_DECL);
-
- // -- Accessor Methods --
- void priority (RTCORBA::Priority priority);
- RTCORBA::Priority priority (void);
-
- void priority_bands (const RTCORBA::PriorityBands& priority_bands);
- const RTCORBA::PriorityBands& priority_bands (void);
-
- void ior_source (const char *s);
- const char* ior_source (void);
-
-private:
-
- RTCORBA::Priority priority_;
- RTCORBA::PriorityBands priority_bands_;
- char ior_source_[256];
-};
-
-#endif /* RT_PROPERTIES_H_ */
diff --git a/TAO/tests/Exposed_Policies/client.cpp b/TAO/tests/Exposed_Policies/client.cpp
deleted file mode 100644
index 80bc23f24f3..00000000000
--- a/TAO/tests/Exposed_Policies/client.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-
-// -- App. Specific Include --
-#include "CounterC.h"
-// #include "util.h"
-
-// -- App. Specific Include --
-#include "Policy_Verifier.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(tao, client, "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- int status = 0;
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- Policy_Verifier policy_verifier;
-
- bool retval = policy_verifier.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (retval)
- {
- policy_verifier.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- status++;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "CORBA Exception Raised");
- status++;
- }
-
- ACE_ENDTRY;
-
- return status;
-}
diff --git a/TAO/tests/Exposed_Policies/run_test.pl b/TAO/tests/Exposed_Policies/run_test.pl
deleted file mode 100755
index 9ea2e82c7d1..00000000000
--- a/TAO/tests/Exposed_Policies/run_test.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-require PerlACE::Run_Test;
-
-$base_ior_file = PerlACE::LocalFile ("default.ior");
-$overridden_ior_file = PerlACE::LocalFile ("overridden.ior");
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server",
- " -POAConfigFile POA.cfg" .
- " -ObjectConfigFile Object.cfg" .
- " -BaseObjectIOR default.ior" .
- " -OverriddenIOR overridden.ior");
-}
-else {
- if ($^O eq "dec_osf") {
- $poa_file = PerlACE::LocalFile ("POA.cfg.tru64");
- $obj_file = PerlACE::LocalFile ("Object.cfg.tru64");
- }
- else {
- $poa_file = PerlACE::LocalFile ("POA.cfg");
- $obj_file = PerlACE::LocalFile ("Object.cfg");
- }
- $SV = new PerlACE::Process ("server",
- " -POAConfigFile $poa_file" .
- " -ObjectConfigFile $obj_file" .
- " -BaseObjectIOR $base_ior_file" .
- " -OverriddenIOR $overridden_ior_file");
-}
-
-$CL = new PerlACE::Process ("client", "-POAConfigFile $poa_file"
- . " -ObjectConfigFile $obj_file"
- . " -BaseObjectIOR $base_ior_file"
- . " -OverriddenIOR $overridden_ior_file");
-
-$status = 0;
-
-unlink($base_ior_file);
-unlink($overridden_ior_file);
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($base_ior_file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$base_ior_file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (30);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Exposed_Policies/server.cpp b/TAO/tests/Exposed_Policies/server.cpp
deleted file mode 100644
index ecc7d20d022..00000000000
--- a/TAO/tests/Exposed_Policies/server.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//$Id$
-
-////////////////////////////////////////////////////////////////////////
-// This files tests the Client exposed policies:
-// - PriorityModelPolicy
-// - PriorityBandedConnectionPolicy
-// - ClientProtocolPolicy
-//
-// This policies are embedded in the object reference, by writem
-// them into the IOR.
-//
-//
-// -- App. Specific Include --
-#include "Policy_Tester.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(tao, server, "$Id$")
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- Policy_Tester policy_tester;
-
- int result = policy_tester.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (result != 0)
- return result;
-
- policy_tester.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- ACE_TEXT ("CORBA Exception Raised."));
- return 1;
- }
-
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Exposed_Policies/svc.conf b/TAO/tests/Exposed_Policies/svc.conf
deleted file mode 100644
index 37973382e2c..00000000000
--- a/TAO/tests/Exposed_Policies/svc.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Regular test
-static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO"
diff --git a/TAO/tests/FL_Cube/.cvsignore b/TAO/tests/FL_Cube/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/FL_Cube/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/FL_Cube/FL_Cube.mpc b/TAO/tests/FL_Cube/FL_Cube.mpc
deleted file mode 100644
index 9f8856707ff..00000000000
--- a/TAO/tests/FL_Cube/FL_Cube.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*client) : taoclient, portableserver, tao_flresource {
- source_files {
- client.cpp
- }
-}
-
-project(*server) : taoserver, tao_flresource {
- after += *client
- source_files {
- server.cpp
- test_i.cpp
- }
-}
diff --git a/TAO/tests/FL_Cube/README b/TAO/tests/FL_Cube/README
deleted file mode 100644
index b50b764e52c..00000000000
--- a/TAO/tests/FL_Cube/README
+++ /dev/null
@@ -1,10 +0,0 @@
-# $Id$
-
-Test the integration of the FL toolkit and TAO.
-
-Simply run the server and the client, as follows:
-
-$ server -o foo.ior
-$ client -k file://foo.ior
-
-The test only does something useful if the FL toolkit was enabled.
diff --git a/TAO/tests/FL_Cube/client.cpp b/TAO/tests/FL_Cube/client.cpp
deleted file mode 100644
index 5e55fff3819..00000000000
--- a/TAO/tests/FL_Cube/client.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// $Id$
-#include "tao/FlResource/FlResource_Loader.h"
-#include "testC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(FL_Cube, client, "$Id$")
-
-#include <FL/Fl.h>
-#include <FL/Fl_Window.h>
-#include <FL/Fl_Roller.h>
-
-class Client
-{
- // = TITLE
- // Run the client thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run the client threads.
- //
-public:
- Client (CORBA::ORB_ptr orb,
- Fl_Window* parent);
- // ctor
-
- ~Client (void);
-
- void show (void);
- // Call show on all the window objects
-
- void parse_args (int argc, char *argv[]
- ACE_ENV_ARG_DECL);
-
-private:
- static void x_cb (Fl_Widget *widget, void* cookie);
- static void y_cb (Fl_Widget *widget, void* cookie);
- // The callbacks
-
- void x_changed (void);
- void y_changed (void);
- // The methods for the callbacks
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- Fl_Roller* x_roller_;
- Fl_Roller* y_roller_;
- // The rollers
-
- Simple_Server_var server_;
- // The server.
-};
-
-int main (int argc, char* argv[])
-{
- TAO::FlResource_Loader fl_loader;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Fl_Window window (300, 100);
-
- Client client (orb.in (), &window);
-
- window.end ();
-
- window.show ();
-
- client.show ();
-
- client.parse_args (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Fl::run ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-Client::Client (CORBA::ORB_ptr orb,
- Fl_Window* parent)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
- this->x_roller_ =
- new Fl_Roller (10, parent->h () / 2 - 20,
- parent->w () / 2 - 10, 40);
- this->x_roller_->type (FL_HORIZONTAL);
- this->x_roller_->callback (Client::x_cb, this);
- this->x_roller_->range (-360, 360);
- this->x_roller_->step (1);
-
- this->y_roller_ =
- new Fl_Roller (3 * parent->w () / 4 - 20, 10,
- 40, parent->h () - 20);
- this->y_roller_->type (FL_VERTICAL);
- this->y_roller_->callback (Client::y_cb, this);
- this->y_roller_->range (-360, 360);
- this->y_roller_->step (1);
-}
-
-Client::~Client (void)
-{
- delete x_roller_;
- delete y_roller_;
-}
-
-void
-Client::show (void)
-{
- this->x_roller_->show ();
- this->y_roller_->show ();
-}
-
-void
-Client::x_cb (Fl_Widget*, void* cookie)
-{
- Client *self = static_cast<Client*> (cookie);
- self->x_changed ();
-}
-
-void
-Client::y_cb (Fl_Widget*, void* cookie)
-{
- Client *self = static_cast<Client*> (cookie);
- self->y_changed ();
-}
-
-void
-Client::x_changed (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Long x = CORBA::Long (this->x_roller_->value ());
- this->server_->set_x_angle (x ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Client::x_changed");
- }
- ACE_ENDTRY;
-}
-
-void
-Client::y_changed (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Long y = CORBA::Long (this->y_roller_->value ());
- this->server_->set_y_angle (y ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Client::x_changed");
- }
- ACE_ENDTRY;
-}
-
-void
-Client::parse_args (int argc, char *argv[]
- ACE_ENV_ARG_DECL)
-{
- const char *ior = "file://test.ior";
-
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]));
- }
-
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->server_ =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/FL_Cube/server.cpp b/TAO/tests/FL_Cube/server.cpp
deleted file mode 100644
index f3c3a235446..00000000000
--- a/TAO/tests/FL_Cube/server.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "tao/FlResource_Loader.h"
-
-ACE_RCSID(FL_Cube, server, "$Id$")
-
-#include <FL/Fl.h>
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- Fl_Window window(300, 300);
- TAO::FlResource_Loader fl_loader;
-
- Simple_Window sw (10, 10,
- window.w () - 20, window.h () - 20);
- window.resizable (&sw);
-
- window.end ();
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- char* targv[] = { argv[0] };
- window.show (1, targv);
-
- sw.show ();
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_i server_impl (orb.in (), &sw);
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (Fl::run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "Fl::run"), -1);
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
diff --git a/TAO/tests/FL_Cube/test.idl b/TAO/tests/FL_Cube/test.idl
deleted file mode 100644
index 6f1397b3008..00000000000
--- a/TAO/tests/FL_Cube/test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server {
-
- oneway void set_x_angle (in long x);
- oneway void set_y_angle (in long y);
- // Set the X and Y angles in the view port..
-
- void shutdown ();
- // Shutdown the ORB
-};
diff --git a/TAO/tests/FL_Cube/test_i.cpp b/TAO/tests/FL_Cube/test_i.cpp
deleted file mode 100644
index 55e557c3341..00000000000
--- a/TAO/tests/FL_Cube/test_i.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include <GL/gl.h>
-
-ACE_RCSID(FL_Cube, test_i, "$Id$")
-
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb,
- Simple_Window *window)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- window_ (window)
-{
-
-}
-
-void
-Simple_Server_i::set_x_angle (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->window_->set_x_angle (x);
-}
-
-void
-Simple_Server_i::set_y_angle (CORBA::Long y ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->window_->set_y_angle (y);
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
-
-// ****************************************************************
-
-Simple_Window::Simple_Window (int x, int y,
- int w, int h,
- const char* l)
- : Fl_Gl_Window (x, y, w, h, l),
- x_angle_ (0),
- y_angle_ (0)
-{
- boxv0[0] = -0.5; boxv0[1] = -0.5; boxv0[2] = -0.5;
- boxv1[0] = 0.5; boxv1[1] = -0.5; boxv1[2] = -0.5;
- boxv2[0] = 0.5; boxv2[1] = 0.5; boxv2[2] = -0.5;
- boxv3[0] = -0.5; boxv3[1] = 0.5; boxv3[2] = -0.5;
- boxv4[0] = -0.5; boxv4[1] = -0.5; boxv4[2] = 0.5;
- boxv5[0] = 0.5; boxv5[1] = -0.5; boxv5[2] = 0.5;
- boxv6[0] = 0.5; boxv6[1] = 0.5; boxv6[2] = 0.5;
- boxv7[0] = -0.5; boxv7[1] = 0.5; boxv7[2] = 0.5;
-}
-
-void
-Simple_Window::set_x_angle (CORBA::Long x)
-{
- this->x_angle_ = x;
- this->redraw ();
-}
-
-void
-Simple_Window::set_y_angle (CORBA::Long y)
-{
- this->y_angle_ = y;
- this->redraw ();
-}
-
-void
-Simple_Window::draw (void)
-{
- // Based on the CubeView example in the FL toolkit.
-
- if (!this->valid())
- {
- glLoadIdentity();
- glViewport(0, 0, this->w(), this->h());
- glOrtho(-2,2,-2,2,-20000,10000);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glPushMatrix();
-
- glRotatef(this->x_angle_, 0, 1, 0);
- glRotatef(this->y_angle_, 1, 0, 0);
-
- this->draw_cube ();
-
- glPopMatrix ();
-}
-
-void
-Simple_Window::draw_cube (void)
-{
- const float ALPHA = 0.5;
-
- glBegin(GL_QUADS);
- glColor4f(0.0, 0.0, 1.0, ALPHA);
- glVertex3fv(boxv0);
- glVertex3fv(boxv1);
- glVertex3fv(boxv2);
- glVertex3fv(boxv3);
-
- glColor4f(1.0, 1.0, 0.0, ALPHA);
- glVertex3fv(boxv0);
- glVertex3fv(boxv4);
- glVertex3fv(boxv5);
- glVertex3fv(boxv1);
-
- glColor4f(0.0, 1.0, 1.0, ALPHA);
- glVertex3fv(boxv2);
- glVertex3fv(boxv6);
- glVertex3fv(boxv7);
- glVertex3fv(boxv3);
-
- glColor4f(1.0, 0.0, 0.0, ALPHA);
- glVertex3fv(boxv4);
- glVertex3fv(boxv5);
- glVertex3fv(boxv6);
- glVertex3fv(boxv7);
-
- glColor4f(1.0, 0.0, 1.0, ALPHA);
- glVertex3fv(boxv0);
- glVertex3fv(boxv3);
- glVertex3fv(boxv7);
- glVertex3fv(boxv4);
-
- glColor4f(0.0, 1.0, 0.0, ALPHA);
- glVertex3fv(boxv1);
- glVertex3fv(boxv5);
- glVertex3fv(boxv6);
- glVertex3fv(boxv2);
- glEnd();
-
- glColor3f(1.0, 1.0, 1.0);
- glBegin(GL_LINES);
- glVertex3fv(boxv0);
- glVertex3fv(boxv1);
-
- glVertex3fv(boxv1);
- glVertex3fv(boxv2);
-
- glVertex3fv(boxv2);
- glVertex3fv(boxv3);
-
- glVertex3fv(boxv3);
- glVertex3fv(boxv0);
-
- glVertex3fv(boxv4);
- glVertex3fv(boxv5);
-
- glVertex3fv(boxv5);
- glVertex3fv(boxv6);
-
- glVertex3fv(boxv6);
- glVertex3fv(boxv7);
- glVertex3fv(boxv7);
- glVertex3fv(boxv4);
-
- glVertex3fv(boxv0);
- glVertex3fv(boxv4);
-
- glVertex3fv(boxv1);
- glVertex3fv(boxv5);
-
- glVertex3fv(boxv2);
- glVertex3fv(boxv6);
-
- glVertex3fv(boxv3);
- glVertex3fv(boxv7);
- glEnd();
-}
-
diff --git a/TAO/tests/FL_Cube/test_i.h b/TAO/tests/FL_Cube/test_i.h
deleted file mode 100644
index b2573fa173f..00000000000
--- a/TAO/tests/FL_Cube/test_i.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/FL_Server
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_FL_SERVER_TEST_I_H
-#define TAO_FL_SERVER_TEST_I_H
-
-#include "testS.h"
-
-#include <FL/Fl_Gl_Window.h>
-
-
-class Simple_Window : public Fl_Gl_Window
-{
-public:
- Simple_Window (int x, int y, int w, int h,
- const char * l = 0);
- // Constructor
-
- void set_x_angle (CORBA::Long x);
- void set_y_angle (CORBA::Long y);
-
-private:
- virtual void draw (void);
- // from the Fl_Gl_Window...
-
- virtual void draw_cube (void);
-
- CORBA::Long x_angle_;
- CORBA::Long y_angle_;
- // The angles...
-
- float boxv0[3]; float boxv1[3];
- float boxv2[3]; float boxv3[3];
- float boxv4[3]; float boxv5[3];
- float boxv6[3]; float boxv7[3];
- // The vertices of the cube
-};
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb,
- Simple_Window* window);
- // ctor
-
- // = The Simple_Server methods.
- void set_x_angle (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void set_y_angle (CORBA::Long y ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- Simple_Window* window_;
- // Display the graphics...
-};
-
-#endif /* TAO_FL_SERVER_TEST_I_H */
diff --git a/TAO/tests/Faults/.cvsignore b/TAO/tests/Faults/.cvsignore
deleted file mode 100644
index c347b958f8e..00000000000
--- a/TAO/tests/Faults/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-client
-middle
-ping
-pong
-server
diff --git a/TAO/tests/Faults/Faults.mpc b/TAO/tests/Faults/Faults.mpc
deleted file mode 100644
index 0bc0ae29bce..00000000000
--- a/TAO/tests/Faults/Faults.mpc
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, minimum_corba {
- IDL_Files {
- test.idl
- }
-
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Middle): taoexe, portableserver, minimum_corba {
- after += *Server
- IDL_Files {
- test.idl
- }
-
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- middle.cpp
- }
-}
-
-project(*Client): taoexe, portableserver, minimum_corba {
- after += *Middle
- IDL_Files {
- test.idl
- }
-
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- client.cpp
- }
-}
-
-project(*Ping): taoexe, portableserver, minimum_corba {
- IDL_Files {
- ping.idl
- }
-
- Source_Files {
- pingC.cpp
- pingS.cpp
- ping_i.cpp
- ping.cpp
- }
-}
-
-project(*Pong): taoexe, portableserver, minimum_corba {
- after += *Ping
- IDL_Files {
- ping.idl
- }
-
- Source_Files {
- pingC.cpp
- pingS.cpp
- ping_i.cpp
- pong.cpp
- }
-}
-
diff --git a/TAO/tests/Faults/README b/TAO/tests/Faults/README
deleted file mode 100644
index 4994b397e2a..00000000000
--- a/TAO/tests/Faults/README
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
- A little test to check the the ORB can handle server and
-client crashes. It is a bit tricky to run so better check the
-run_test.pl script for details.
diff --git a/TAO/tests/Faults/client.cpp b/TAO/tests/Faults/client.cpp
deleted file mode 100644
index d7f4cf4e6e0..00000000000
--- a/TAO/tests/Faults/client.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-
-ACE_RCSID(Failure, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 10;
-int do_shutdown = 0;
-int do_suicide = 0;
-int do_self_shutdown = 0;
-int do_abort = 0;
-int do_crash = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "acszxk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'a':
- do_abort = 1;
- break;
-
- case 'c':
- do_crash = 1;
- break;
-
- case 'x':
- do_shutdown = 1;
- break;
-
- case 's':
- do_suicide = 1;
- break;
-
- case 'z':
- do_self_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "[-a] [-c] [-x] [-s] [-z] "
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Callback_i callback_impl (orb.in ());
-
- Callback_var callback =
- callback_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i != niterations; ++i)
- {
- CORBA::Long r =
- server->test_method (0, 0, callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d for %d",
- r, i));
- }
- }
-
- if (do_abort)
- {
- ACE_TRY_EX(ABORT)
- {
- server->shutdown_now (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX(ABORT);
- }
- ACE_CATCH (CORBA::COMM_FAILURE, comm_failure)
- {
- ACE_UNUSED_ARG (comm_failure);
- // Expected exception, continue....
- }
- ACE_ENDTRY;
- ACE_TRY_CHECK;
- }
- else if (do_crash)
- {
- ACE_TRY_EX(CRASH)
- {
- server->shutdown_now (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX(CRASH);
- }
- ACE_CATCH (CORBA::COMM_FAILURE, comm_failure)
- {
- ACE_UNUSED_ARG (comm_failure);
- // Expected exception, continue....
- }
- ACE_ENDTRY;
- ACE_TRY_CHECK;
- }
- else if (do_suicide)
- {
- (void) server->test_method (1, 0, callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "ERROR: client should have aborted\n"));
- }
- else if (do_self_shutdown)
- {
- (void) server->test_method (1, 1, callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (do_shutdown)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCH (CORBA::COMM_FAILURE, x)
- {
- // For other case this is expected.
- if (do_self_shutdown == 0)
- {
- x._tao_print_exception ("ERROR: Unexpected exception \n");
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Faults/middle.cpp b/TAO/tests/Faults/middle.cpp
deleted file mode 100644
index 8791dfa0c45..00000000000
--- a/TAO/tests/Faults/middle.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Failure, middle, "$Id$")
-
-const char *ior_output_file = "middle.ior";
-const char *ior = "file://test.ior";
-int niterations = 10;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:k:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Middle_i *middle_impl = 0;
- ACE_NEW_RETURN (middle_impl,
- Middle_i (orb.in (),
- server.in ()),
- -1);
-
- PortableServer::ServantBase_var owner_transfer(middle_impl);
-
- Simple_Server_var middle =
- middle_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (middle.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "middle - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in middle:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Faults/ping.cpp b/TAO/tests/Faults/ping.cpp
deleted file mode 100644
index d113c4a8a84..00000000000
--- a/TAO/tests/Faults/ping.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ping_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Faults, server, "$Id$")
-
-const char *ior_output_file = "ping.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // create child poa with PERSISTENT policy
- ACE_TRY_CHECK;
- CORBA::PolicyList policies;
- policies.length (2);
- policies[0] =
- root_poa->create_lifespan_policy(PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[1] =
- root_poa->create_implicit_activation_policy(PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var persistent_poa =
- root_poa->create_POA("persistent",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- PingObject_i *server_impl = 0;
- ACE_NEW_RETURN (server_impl,
- PingObject_i (orb.in (),
- persistent_poa.in ()),
- -1);
-
- PortableServer::ServantBase_var owner_transfer(server_impl);
-
- PingObject_var server =
- server_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "ping - event loop finished\n"));
-
- persistent_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in ping:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Faults/ping.idl b/TAO/tests/Faults/ping.idl
deleted file mode 100644
index e52c5776d28..00000000000
--- a/TAO/tests/Faults/ping.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-// $Id$
-
-interface PingObject
-{
- // = DESCRIPTION
- // An interface to ping-pong between two objects, it is used to
- // test a very interesting use-case reported by Andreas Geisler.
-
- oneway void ping (in PingObject callback);
- // The ping method, the server should respond by invoking <pong> on
- // the <callback> object
-
- oneway void pong ();
- // A response from the server
-
- oneway void shutdown ();
- // Shutdown the peer
-};
diff --git a/TAO/tests/Faults/ping_i.cpp b/TAO/tests/Faults/ping_i.cpp
deleted file mode 100644
index c3526a74f73..00000000000
--- a/TAO/tests/Faults/ping_i.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// $Id$
-
-#include "ping_i.h"
-
-#if !defined(__ACE_INLINE__)
-#include "ping_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(Faults, test_i, "$Id$")
-
-void
-PingObject_i::ping (PingObject_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- callback->pong (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-PingObject_i::pong (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-PingObject_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-PortableServer::POA_ptr
-PingObject_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
diff --git a/TAO/tests/Faults/ping_i.h b/TAO/tests/Faults/ping_i.h
deleted file mode 100644
index d9a8dbab725..00000000000
--- a/TAO/tests/Faults/ping_i.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Faults
-//
-// = FILENAME
-// ping_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_PING_I_H
-#define TAO_PING_I_H
-
-#include "pingS.h"
-
-class PingObject_i : public POA_PingObject
-{
- // = TITLE
- // A simple implementation of the <ping> interface
- //
- // = DESCRIPTION
- // Used to verify that the client can tolerate server crashes with
- // oneway invocations and that there are no problems with
- // persistent object references after the crash.
- //
-public:
- PingObject_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr the_poa);
- // ctor
-
- // = The PingObject interface methods
- void ping (PingObject_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void pong (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-
- PortableServer::POA_var poa_;
- // The poa
-};
-
-#if defined(__ACE_INLINE__)
-#include "ping_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_PING_I_H */
diff --git a/TAO/tests/Faults/ping_i.i b/TAO/tests/Faults/ping_i.i
deleted file mode 100644
index 6444139ea3c..00000000000
--- a/TAO/tests/Faults/ping_i.i
+++ /dev/null
@@ -1,9 +0,0 @@
-// $Id$
-
-ACE_INLINE
-PingObject_i::PingObject_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
diff --git a/TAO/tests/Faults/pong.cpp b/TAO/tests/Faults/pong.cpp
deleted file mode 100644
index fbc0b86a42f..00000000000
--- a/TAO/tests/Faults/pong.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-// $Id$
-
-#include "ping_i.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Faults, server, "$Id$")
-
-int iterations = 60;
-int period = 10;
-int kill_on = 30;
-const char* ior = "file://ping.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:p:k:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'p':
- period = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 't':
- kill_on = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i <iterations> "
- "-p <period> (milliseconds) "
- "-k ior "
- "-t <rate> (terminate server every n calls) "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-void
-run_client (CORBA::ORB_ptr orb,
- PingObject_ptr server,
- PingObject_ptr callback
- ACE_ENV_ARG_DECL)
-{
- // Run the client requests in a separate routine to isolate the
- // exceptions...
-
- for (int i = 0; i != iterations; ++i)
- {
- ACE_Time_Value tv (0, 1000 * period);
- const char* reason = "";
- ACE_TRY
- {
- reason = "Exception during ping call";
- server->ping (callback ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Run for <period> milliseconds, to receive the reply
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Terminate the client if:
- // - This is the last iteration
- // - The iteration is 0 modulo <kill_on>
- if (i + 1 == iterations
- || (kill_on != 0 && i > 0 && i % kill_on == 0))
- {
- ACE_DEBUG ((LM_DEBUG, "Shutting down server\n"));
- reason = "Exception during server shutdown";
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::TRANSIENT, t)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Ignoring transient exception\n"));
- // ACE_PRINT_EXCEPTION (t, reason);
- ACE_OS::sleep (tv);
- }
- ACE_CATCH (CORBA::COMM_FAILURE, f)
- {
- ACE_DEBUG ((LM_DEBUG, "Ignoring comm failure exception\n"));
- // ACE_PRINT_EXCEPTION (f, reason);
- ACE_OS::sleep (tv);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, reason);
- ACE_OS::sleep (tv);
- }
- ACE_ENDTRY;
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // create child poa with PERSISTENT policy
- ACE_TRY_CHECK;
- CORBA::PolicyList policies;
- policies.length (2);
- policies[0] =
- root_poa->create_lifespan_policy(PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policies[1] =
- root_poa->create_implicit_activation_policy(PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var persistent_poa =
- root_poa->create_POA("persistent",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PingObject_var server =
- PingObject::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- PingObject_i callback_impl (orb.in (),
- persistent_poa.in ());
-
- PingObject_var callback =
- callback_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- // If the ior_output_file exists, output the ior to it
- run_client (orb.in (),
- server.in (),
- callback.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- persistent_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Faults/run_test.pl b/TAO/tests/Faults/run_test.pl
deleted file mode 100755
index c4a0c9319e2..00000000000
--- a/TAO/tests/Faults/run_test.pl
+++ /dev/null
@@ -1,359 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-$middlefile = PerlACE::LocalFile ("middle.ior");
-$dum_core = PerlACE::LocalFile ("core");
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$SV1 = new PerlACE::Process ("server", "-ORBSvcConf server.conf -o $iorfile");
-$CL = new PerlACE::Process ("client", "");
-$MD = new PerlACE::Process ("middle", "-o $middlefile -k file://$iorfile");
-$PI = new PerlACE::Process ("ping", "-o $iorfile");
-$PO = new PerlACE::Process ("pong", "-k file://$iorfile -p 100 -i 60 -t 30");
-
-###############################################################################
-print STDERR "################ Default ORB Config###############\n";
-print STDERR "===== Base test, no crashes\n";
-
-unlink $iorfile;
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL->Arguments ("-k file://$iorfile -i 100");
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Client crash (abort) during upcall\n";
-
-$CL->Arguments ("-k file://$iorfile -i 100 -s");
-
-$client = $CL->SpawnWaitKill (20);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Client crash during upcall\n";
-
-$CL->Arguments ("-k file://$iorfile -i 100 -z");
-
-$client = $CL->SpawnWaitKill (20);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Server crash (abort) during upcall\n";
-
-$CL->Arguments ("-k file://$iorfile -i 100 -a");
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-# since the server crashes, skip check for $server != 0
-if ($server == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Server crash during upcall\n";
-
-unlink $iorfile;
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL->Arguments ("-k file://$iorfile -i 100 -c");
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-# since the server crashes, skip check for $server != 0
-if ($server == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Three-way test, client crashes and server detects\n";
-
-unlink $iorfile;
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-unlink $middlefile;
-$MD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($middlefile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$middlefile>\n";
- $MD->Kill ();
- exit 1;
-}
-
-$CL->Arguments ("-k file://$middlefile -i 100 -s");
-
-$client = $CL->SpawnWaitKill (100);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-$CL->Arguments (" -k file://$middlefile -i 10 -x");
-
-$client = $CL->SpawnWaitKill (100);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$middle = $MD->WaitKill (20);
-
-if ($middle != 0) {
- print STDERR "ERROR: the middle test failed, middle returned $middle\n";
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Ping-pong test, server crashes but client continues\n";
-
-unlink $iorfile;
-$PI->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-if ($PO->SpawnWaitKill (60) == -1) {
- $status = 1;
-}
-
-if ($PI->WaitKill (60) == -1) {
- $status = 1;
-}
-
-########################################################################
-########################################################################
-########################################################################
-print STDERR "################ Thread-Per-Connection Config###############\n";
-print STDERR "===== Base test, no crashes\n";
-
-unlink $iorfile;
-$SV1->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL->Arguments ("-k file://$iorfile -i 100");
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Client crash (abort) during upcall\n";
-
-$CL->Arguments ("-k file://$iorfile -i 100 -s");
-
-$client = $CL->SpawnWaitKill (20);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Client crash during upcall\n";
-
-$CL->Arguments ("-k file://$iorfile -i 100 -z");
-
-$client = $CL->SpawnWaitKill (20);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Server crash (abort) during upcall\n";
-
-$CL->Arguments ("-k file://$iorfile -i 100 -a");
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV1->WaitKill (20);
-
-# since the server crashes, skip check for $server != 0
-if ($server == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Server crash during upcall\n";
-
-unlink $iorfile;
-$SV1->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV1->Kill ();
- exit 1;
-}
-
-$CL->Arguments ("-k file://$iorfile -i 100 -c");
-
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV1->WaitKill (20);
-
-# since the server crashes, skip check for $server != 0
-if ($server == -1) {
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Three-way test, client crashes and server detects\n";
-
-unlink $iorfile;
-$SV1->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV1->Kill ();
- exit 1;
-}
-
-unlink $middlefile;
-$MD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($middlefile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$middlefile>\n";
- $MD->Kill ();
- exit 1;
-}
-
-$CL->Arguments ("-k file://$middlefile -i 100 -s");
-
-$client = $CL->SpawnWaitKill (100);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-$CL->Arguments (" -k file://$middlefile -i 10 -x");
-
-$client = $CL->SpawnWaitKill (100);
-
-# since the client crashes, skip check for $client != 0
-if ($client == -1) {
- $status = 1;
-}
-
-$server = $SV1->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$middle = $MD->WaitKill (20);
-
-if ($middle != 0) {
- print STDERR "ERROR: the middle test failed, middle returned $middle\n";
- $status = 1;
-}
-
-###############################################################################
-print STDERR "===== Ping-pong test, server crashes but client continues\n";
-
-unlink $iorfile;
-$PI->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV1->Kill ();
- exit 1;
-}
-
-if ($PO->SpawnWaitKill (60) == -1) {
- $status = 1;
-}
-
-if ($PI->WaitKill (60) == -1) {
- $status = 1;
-}
-
-unlink $dum_core;
-
-exit $status;
diff --git a/TAO/tests/Faults/server.conf b/TAO/tests/Faults/server.conf
deleted file mode 100644
index 4db827456eb..00000000000
--- a/TAO/tests/Faults/server.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# $Id$
-#
-static Server_Strategy_Factory "-ORBConcurrency thread-per-connection"
diff --git a/TAO/tests/Faults/server.cpp b/TAO/tests/Faults/server.cpp
deleted file mode 100644
index 530af043ca7..00000000000
--- a/TAO/tests/Faults/server.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Failure, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i *server_impl;
-
- ACE_NEW_RETURN (server_impl,
- Simple_Server_i (orb.in ()),
- 1);
-
-
- PortableServer::ServantBase_var server_owner_transfer(server_impl);
-
-
- Simple_Server_var server =
- server_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Faults/test.idl b/TAO/tests/Faults/test.idl
deleted file mode 100644
index 9ee2052e8b8..00000000000
--- a/TAO/tests/Faults/test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-interface Callback
-{
- oneway void shutdown (in boolean is_clean);
- // A safe way to shutdown the client, using either clean shutdowns
- // or "catastrophic failures".
-};
-
-interface Simple_Server
-{
- long test_method (in boolean do_callback,
- in boolean is_clean,
- in Callback cb);
- // Just call a method on the server, we can pass a callback object
- // so the server can be tested for client shutdowns.
-
- void shutdown_now (in boolean is_clean);
- // An unsafe way to shutdown the server, we can even ask for a
- // "catastrophic crash" (implemented using abort())
-
- oneway void shutdown ();
- // A safe way to shutdown the server, it is a oneway function so we
- // will never get a COMM_FAILURE error
-};
diff --git a/TAO/tests/Faults/test_i.cpp b/TAO/tests/Faults/test_i.cpp
deleted file mode 100644
index 3d01593e5db..00000000000
--- a/TAO/tests/Faults/test_i.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Failure, test_i, "$Id$")
-
-void
-Callback_i::shutdown (CORBA::Boolean is_clean
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (is_clean == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Performing catastrophic shutdown\n"));
-
-// Tru64 seems to hang and not abort and dump core when abort() is called
-// here. This needs further investigation. This fix is a temporary one.
-#if defined (DIGITAL_UNIX) || defined (DEC_CXX)
- ACE_OS::_exit();
-#else
- ACE_OS::abort();
-#endif
- return;
- }
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Shutdown: Performed clean shutdown\n"));
-}
-
-// ****************************************************************
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Boolean do_callback,
- CORBA::Boolean is_clean,
- Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (do_callback)
- {
- ACE_DEBUG ((LM_DEBUG, "Callback to shutdown client (%d)\n",
- is_clean));
- callback->shutdown (is_clean ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
- ACE_Time_Value tv (0, 20000);
- ACE_OS::sleep (tv);
- return 0;
-}
-
-void
-Simple_Server_i::shutdown_now (CORBA::Boolean is_clean
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (is_clean == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Performing catastrophic shutdown \n"));
-#if defined (DIGITAL_UNIX) || defined (DEC_CXX)
- ACE_OS::_exit();
-#else
- ACE_OS::abort();
-#endif
- return;
- }
-
- ACE_DEBUG ((LM_DEBUG, "shutdown_now:Performing clean shutdown\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-// ****************************************************************
-
-CORBA::Long
-Middle_i::test_method (CORBA::Boolean do_callback,
- CORBA::Boolean is_clean,
- Callback_ptr callback
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- int i = 0;
- for (; i != 10; ++i)
- {
- this->server_->test_method (0,
- 0,
- callback
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
-
- this->server_->test_method (do_callback,
- is_clean,
- callback
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- for (; i != 10; ++i)
- {
- this->server_->test_method (0,
- 0,
- callback
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
-
- return 0;
-}
-
-void
-Middle_i::shutdown_now (CORBA::Boolean is_clean
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->server_->shutdown_now (is_clean ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Middle_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- this->server_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // ignore them
- }
- ACE_ENDTRY;
-
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Faults/test_i.h b/TAO/tests/Faults/test_i.h
deleted file mode 100644
index 154b36ae553..00000000000
--- a/TAO/tests/Faults/test_i.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/MT_Server
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_FAILURE_TEST_I_H
-#define TAO_FAILURE_TEST_I_H
-
-#include "testS.h"
-
-class Callback_i
- : public virtual POA_Callback
-{
- // = TITLE
- // A callback object to shutdown the "client"
- //
- // = DESCRIPTION
- // To test that the server can tolerate client crashes the server
- // receives a callback object.
- //
-public:
- Callback_i (CORBA::ORB_ptr orb);
- // ctor
-
- void shutdown (CORBA::Boolean is_clean
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // The callback method
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Boolean do_callback,
- CORBA::Boolean is_clean,
- Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown_now (CORBA::Boolean is_clean
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-class Middle_i : public virtual POA_Simple_Server
-{
- // = TITLE
- // Another implementation of the simple server...
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Middle_i (CORBA::ORB_ptr orb,
- Simple_Server_ptr server);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Boolean do_callback,
- CORBA::Boolean is_clean,
- Callback_ptr callback
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown_now (CORBA::Boolean is_clean
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_ptr orb_;
- // The ORB
-
- Simple_Server_var server_;
- // The real server
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_FAILURE_TEST_I_H */
diff --git a/TAO/tests/Faults/test_i.i b/TAO/tests/Faults/test_i.i
deleted file mode 100644
index 63f454c670b..00000000000
--- a/TAO/tests/Faults/test_i.i
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Callback_i::Callback_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-ACE_INLINE
-Middle_i::Middle_i (CORBA::ORB_ptr orb,
- Simple_Server_ptr server)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- server_ (Simple_Server::_duplicate (server))
-{
-}
diff --git a/TAO/tests/File_IO/.cvsignore b/TAO/tests/File_IO/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/File_IO/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/File_IO/File.idl b/TAO/tests/File_IO/File.idl
deleted file mode 100644
index 2d5070bfdbb..00000000000
--- a/TAO/tests/File_IO/File.idl
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-//=================================================================
-//
-// = FILENAME
-// File.idl
-//
-// = DESCRIPTION
-// A simple File Descriptor and File System IDL interface.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//==================================================================
-
-// IDL
-
-module File
-{
- exception IOError
- {
- long error;
- };
-
- interface Descriptor
- {
- typedef sequence<octet> DataBuffer;
-
- long write (in DataBuffer buffer)
- raises (IOError);
- // write buffer to File
-
- DataBuffer read (in long num_bytes)
- raises (IOError);
- // read num_bytes to DataBuffer
-
- unsigned long lseek (in unsigned long offset,
- in long whence)
- raises (IOError);
- // seek to offset in File from whence
-
- void destroy ();
- // destroy the descriptor
- };
-
- interface System
- {
- Descriptor open (in string file_name,
- in long flags)
- raises (IOError);
- // File open operation
- };
-};
diff --git a/TAO/tests/File_IO/File_IO.mpc b/TAO/tests/File_IO/File_IO.mpc
deleted file mode 100644
index 0f597f3533e..00000000000
--- a/TAO/tests/File_IO/File_IO.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, minimum_corba {
- Source_Files {
- File_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode, minimum_corba {
- after += *Server
- Source_Files {
- FileC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/File_IO/File_i.cpp b/TAO/tests/File_IO/File_i.cpp
deleted file mode 100644
index 2e74de2a9f9..00000000000
--- a/TAO/tests/File_IO/File_i.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-// $Id$
-
-//===================================================================
-//
-// = FILENAME
-// File_i.cpp
-//
-// = DESCRIPTION
-// Implementation of the File IDL module and the interfaces
-// Descriptor and System in it.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//====================================================================
-
-#include "File_i.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_fcntl.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Default_Servant, File_i, "File_i.cpp,v 1.14 2001/03/04 19:27:53 irfan Exp")
-
-// IDL File::System constructor
-FileImpl::System::System (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa)),
- // Create the Default Descriptor Servant
- fd_servant_ (poa)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- // set the default servant of the POA
- poa->set_servant (&this->fd_servant_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-FileImpl::System::~System (void)
-{
-}
-
-PortableServer::POA_ptr
-FileImpl::System::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-File::Descriptor_ptr
-FileImpl::System::open (const char *file_name,
- CORBA::Long flags
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- File::IOError))
-{
- // Do an ACE_OS::open
- ACE_HANDLE file_descriptor = ACE_OS::open (file_name,
- flags,
- ACE_DEFAULT_FILE_PERMS);
-
- if (file_descriptor == ACE_INVALID_HANDLE)
- {
- ACE_THROW_RETURN (File::IOError (), 0);
- }
-
- char file_descriptor_buffer[BUFSIZ];
-
- // convert ACE_HANDLE to a string
- ACE_OS::sprintf (file_descriptor_buffer,
- "%ld",
- (long int) file_descriptor);
-
- //Create an objectID from the ACE_HANDLE string
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId (file_descriptor_buffer);
-
- // create an object reference with the specified ObjectID got
- // from ACE_HANDLE string
- CORBA::Object_var obj =
- this->poa_->create_reference_with_id (oid.in (),
- "IDL:File/Descriptor:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (File::Descriptor::_nil ());
-
- // Narrow the object reference to a File Descriptor
- File::Descriptor_var fd =
- File::Descriptor::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK_RETURN (File::Descriptor::_nil ());
-
- return fd._retn ();
-}
-
-// IDL File::Descriptor constructor
-FileImpl::Descriptor::Descriptor (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-FileImpl::Descriptor::~Descriptor (void)
-{
-}
-
-PortableServer::POA_ptr
-FileImpl::Descriptor::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-//Extracts the ACE_HANDLE from the passed object reference
-ACE_HANDLE
-FileImpl::Descriptor::fd (ACE_ENV_SINGLE_ARG_DECL)
-{
- //
- // One way of getting our id.
- //
-
- // Get a reference to myself
- File::Descriptor_var me = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (ACE_INVALID_HANDLE);
-
- // Get the ObjectId from the reference
- PortableServer::ObjectId_var oid1 =
- this->poa_->reference_to_id (me.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ACE_INVALID_HANDLE);
-
- //
- // Another way of getting our id.
- //
-
- PortableServer::ObjectId_var oid2 =
- this->poa_->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ACE_INVALID_HANDLE);
-
- //
- // Yet another way of getting our id.
- //
-
- int argc = 0;
- CORBA::ORB_var orb = CORBA::ORB_init (argc, 0, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ACE_INVALID_HANDLE);
-
- // Get the POA Current object reference
- CORBA::Object_var obj =
- orb->resolve_initial_references ("POACurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ACE_INVALID_HANDLE);
-
- // Narrow the object reference to a POA Current reference
- PortableServer::Current_var poa_current =
- PortableServer::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (ACE_INVALID_HANDLE);
-
- PortableServer::ObjectId_var oid3 =
- poa_current->get_object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (ACE_INVALID_HANDLE);
-
- ACE_ASSERT (oid1.in () == oid2.in ());
- ACE_ASSERT (oid2.in () == oid3.in ());
-
- // Convert the ObjectId to a string
- CORBA::String_var s =
- PortableServer::ObjectId_to_string (oid1.in ());
-
- // Get the ACE_HANDLE from the string
- return (ACE_HANDLE) ::atol (s.in ());
-}
-
-CORBA::Long
-FileImpl::Descriptor::write (const File::Descriptor::DataBuffer &buffer
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- File::IOError))
-{
- ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- const CORBA::Octet *data = &buffer[0];
-
- ssize_t len = ACE_OS::write (file_descriptor,
- data,
- buffer.length ());
- if (len > 0)
- return len;
-
- ACE_THROW_RETURN (File::IOError (), 0);
-}
-
-File::Descriptor::DataBuffer *
-FileImpl::Descriptor::read (CORBA::Long num_bytes
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- File::IOError))
-{
- ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- CORBA::Octet *buffer = File::Descriptor::DataBuffer::allocbuf (num_bytes);
- ssize_t length = ACE_OS::read (file_descriptor, buffer, num_bytes);
-
- if (length > 0)
- return new File::Descriptor::DataBuffer (length,
- length,
- buffer,
- 1);
-
- File::Descriptor::DataBuffer::freebuf (buffer);
- ACE_THROW_RETURN (File::IOError (), 0);
-}
-
-CORBA::ULong
-FileImpl::Descriptor::lseek (CORBA::ULong offset,
- CORBA::Long whence
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- File::IOError))
-{
- ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- CORBA::Long result = (CORBA::Long) ACE_OS::lseek (file_descriptor,
- offset,
- whence);
- if (result == -1)
- ACE_THROW_RETURN (File::IOError (), 0);
-
- return (CORBA::ULong) result;
-}
-
-void
-FileImpl::Descriptor::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the ACE_HANDLE for this object reference
- ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Close the file corresponding to this object reference.
- ACE_OS::close (file_descriptor);
-}
diff --git a/TAO/tests/File_IO/File_i.h b/TAO/tests/File_IO/File_i.h
deleted file mode 100644
index ebe06fce403..00000000000
--- a/TAO/tests/File_IO/File_i.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// $Id$
-
-//===================================================================
-//
-// = FILENAME
-// File_i.h
-//
-// = DESCRIPTION
-// Defines the implementation classes for the File IDL
-// module
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//====================================================================
-
-#include "FileS.h"
-
-class FileImpl
-{
- // = TITLE
- // FileImpl class provides the namespace for the File IDL module .
-public:
- class Descriptor : public POA_File::Descriptor
- {
- // = TITLE
- // Descriptor implements the Descriptor interface in the File
- // Module A single Descriptor servant can serve multiple object
- // references
- public:
- Descriptor (PortableServer::POA_ptr poa);
- // Constructor
-
- ~Descriptor (void);
- // Destructor
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
- // Returns the default POA of this object
-
- virtual CORBA::Long write (const File::Descriptor::DataBuffer &buffer
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- File::IOError));
- // write buffer to File corresponding to this Descriptor
-
- virtual File::Descriptor::DataBuffer *read (CORBA::Long num_bytes
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- // Reads num_bytes from the file and returns it
- File::IOError));
-
- virtual CORBA::ULong lseek (CORBA::ULong offset,
- CORBA::Long whence
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- File::IOError));
- // seek to the offset in file from whence
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // closes the file corresponding to the requested ObjectID
-
- private:
-
- ACE_HANDLE fd (ACE_ENV_SINGLE_ARG_DECL);
- // Extracts the ACE_HANDLE from the objectID
-
- PortableServer::POA_var poa_;
- };
-
- class System : public POA_File::System
- {
- // = TITLE
- // File System implementation class.
- public:
- System (PortableServer::POA_ptr poa);
- // Constructor, Creates a single File Descriptor Servant and
- // registers it with the POA as the Default Servant
-
- ~System (void);
- //Destructor
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
- //Returns the default POA of this object
-
- File::Descriptor_ptr open (const char *file_name,
- CORBA::Long flags
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- File::IOError));
- // Opens a file ,creates a Descriptor reference with the
- // ACE_HANDLE and returns that reference
-
- private:
- PortableServer::POA_var poa_;
-
- Descriptor fd_servant_;
- // The single File Descriptor servant which serves requests for
- // any Descriptor object under poa_.
- };
-};
diff --git a/TAO/tests/File_IO/README b/TAO/tests/File_IO/README
deleted file mode 100644
index 1362696a08a..00000000000
--- a/TAO/tests/File_IO/README
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-
-@page File_IO Test README File
-
- A stress test for receiving large replies. The replies are
- read from files. This test is stress test that brought bug #id
- 1002 to the surface. The test doesnt seem to have anything
- special, but just to be sure that bug 1002 doesnt show up
- again in some other form. This test was donated by Jonathan
- Reis <reis@stentor.com>.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/File_IO/client.cpp b/TAO/tests/File_IO/client.cpp
deleted file mode 100644
index 189a81e3d59..00000000000
--- a/TAO/tests/File_IO/client.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-// $Id$
-
-//===================================================================
-// = LIBRARY
-// TAO/tests/POA/Default_Servant/client
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// A client program for the File IDL module
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//====================================================================
-
-#include "FileC.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "ace/OS.h"
-#include "ace/SString.h"
-#include "ace/Thread_Manager.h"
-
-ACE_RCSID(Default_Servant, client, "client.cpp,v 1.8 2001/03/26 21:16:52 coryan Exp")
-
- static const char *iorfile = "ior";
-static const char *filename = "big.txt";
-
-static int NUM_THREADS = 4;
-static int iterations = 100;
-
-static CORBA::ORB_var orb;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "t:dk:f:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd':
- TAO_debug_level++;
- break;
- case 'k':
- iorfile = get_opts.opt_arg ();
- break;
- case 'f':
- filename = get_opts.opt_arg ();
- break;
- case 't':
- NUM_THREADS = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- "[-k <iorfile>]"
- "[-f <filename>]"
- "[-m <message>]"
- "[-t <threads>]"
- "[-i <iterations>]"
- "\n",
- argv [0]),
- -1);
- }
-
- if (iorfile == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify the IOR for the servant"), -1);
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-void
-validate_connection (CORBA::Object_ptr object
- ACE_ENV_ARG_DECL)
-{
- // Try to validate the connection several times, ignoring transient
- // exceptions. If the connection can still not be setup, return
- // failure.
- for (int i = 0; i < 100; ++i)
- {
- ACE_TRY
- {
- object->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::TRANSIENT, exception)
- {
- // Ignore...
- }
- ACE_CATCHANY
- {
- // Rethrow any other exceptions.
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-}
-
-static void *
-MTTEST (void *args)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_CString &ior = *(ACE_CString*)args;
- ACE_TRY
- {
- CORBA::Object_var object = orb->string_to_object (ior.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- validate_connection (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow the object reference to a File::System
- File::System_var file_system = File::System::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creat the file filename i.e "test"
- File::Descriptor_var fd = file_system->open (filename,
- O_RDONLY
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for( int i = 0; i < iterations; ++i)
- {
- //seek to the beginning of the file
-#if 0
- ACE_DEBUG((LM_DEBUG,"Making request number %d\n",i));
-#endif /*if 0*/
-
- fd->lseek (0, SEEK_SET ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Read back the written message
- // Twice the size of the socket buffer
- File::Descriptor::DataBuffer_var data_received = fd->read (128*1024
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // close the file
- fd->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in main");
- return 0;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB
- orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse the command-line arguments to get the IOR
- parse_args (argc, argv);
-
- // parse args should catch this, but just in case...
- if (iorfile == 0)
- return 0;
-
- // Read the file, and get the IOR
- ACE_HANDLE input_file = ACE_OS::open (iorfile, 0);
- if (input_file == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open input file for reading IOR: %s\n",
- iorfile),
- -1);
- ACE_Read_Buffer ior_buffer (input_file);
- char *data = ior_buffer.read ();
- if (data == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior\n"),
- -1);
-
- ACE_CString ior = data;
- ior_buffer.alloc ()-> free (data);
- ACE_OS::close (input_file);
-
- if (ACE_Thread_Manager::instance ()->spawn_n (NUM_THREADS,
- ACE_THR_FUNC (MTTEST),
- &ior,
- THR_NEW_LWP | THR_DETACHED) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n%a"),
- ACE_TEXT ("thread create failed")));
- }
- ACE_Thread_Manager::instance()->wait();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in main");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/File_IO/run_test.pl b/TAO/tests/File_IO/run_test.pl
deleted file mode 100755
index 302f5244e4b..00000000000
--- a/TAO/tests/File_IO/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k $iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (120);
-$server = $SV->TerminateWaitKill (10);
-
-unlink $iorfile;
-unlink "test"; # created by the program
-unlink "big.txt"; # created by the program
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/File_IO/server.cpp b/TAO/tests/File_IO/server.cpp
deleted file mode 100644
index 7d73730e5dc..00000000000
--- a/TAO/tests/File_IO/server.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-// -*- C++ -*-
-
-#include "File_i.h"
-#include "tao/debug.h"
-#include "ace/SString.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/OS_NS_fcntl.h"
-
-ACE_RCSID (File_IO,
- server,
- "$Id$")
-
-static const char *ior_output_file = "ior";
-static const int nthreads = 2;
-
-
-class Worker : public ACE_Task_Base
-{
- // = TITLE
- // Run a server thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run server threads
- //
-public:
- Worker (CORBA::ORB_ptr orb);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'd':
- TAO_debug_level++;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "[-oior_output_file]"
- "[-d]"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_HANDLE handle = ACE_OS::open ("big.txt",
- O_RDWR | O_CREAT,
- ACE_DEFAULT_FILE_PERMS);
-
- ACE_OS::lseek (handle, 1024*1024*10, SEEK_SET);
- ACE_OS::write (handle, "", 1);
- ACE_OS::close (handle);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Initialize the ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result = parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow the object reference to a POA reference
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies (5);
- policies.length (5);
-
- // ID Assignment Policy
- policies[0] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Lifespan Policy
- policies[1] =
- root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Request Processing Policy
- policies[2] =
- root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Servant Retention Policy
- policies[3] =
- root_poa->create_servant_retention_policy (PortableServer::RETAIN ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Id Uniqueness Policy
- policies[4] =
- root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_CString name = "firstPOA";
- PortableServer::POA_var first_poa =
- root_poa->create_POA (name.c_str (),
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- CORBA::Policy_ptr policy = policies[i];
- policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Create a File System Implementation object in first_poa
- FileImpl::System file_system_impl (first_poa.in ());
-
- PortableServer::ObjectId_var file_system_oid =
- PortableServer::string_to_ObjectId ("FileSystem");
-
- first_poa->activate_object_with_id (file_system_oid.in (),
- &file_system_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var file_system =
- first_poa->id_to_reference (file_system_oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the IOR for the "FileSystem" object
- CORBA::String_var file_system_ior =
- orb->object_to_string (file_system.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,"%s\n",
- file_system_ior.in ()));
-
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", file_system_ior.in ());
- ACE_OS::fclose (output_file);
-
- // set the state of the poa_manager to active i.e ready to
- // process requests
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Worker worker (orb.in ());
- if (worker.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- worker.thr_mgr ()->wait ();
-
- first_poa->destroy(1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy(1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "EXCEPTION CAUGHT");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-// ****************************************************************
-
-Worker::Worker (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Run the ORB for atmost 75 seconds
- ACE_Time_Value tv (75, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Worker::svc");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Forwarding/.cvsignore b/TAO/tests/Forwarding/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Forwarding/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Forwarding/Forwarding.mpc b/TAO/tests/Forwarding/Forwarding.mpc
deleted file mode 100644
index c0830f61571..00000000000
--- a/TAO/tests/Forwarding/Forwarding.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Forwarding/README b/TAO/tests/Forwarding/README
deleted file mode 100644
index 12c0bd3a90c..00000000000
--- a/TAO/tests/Forwarding/README
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
-
-@page Forwarding Test README File
-
-$Id$
-
- This is a minimal test for location forwarding. It verifies
-that the client ORB can process LOCATION_FORWARD replies correctly.
-It takes advantage of the IORTable facilities in TAO to create a
-simple corbaloc IOR, TAO always responds with a LOCATION_FORWARD
-message when a requests is made for an object in the IORTable.
-
- The test tries to invoke a method on the object using both the
-full IOR and the corbaloc IOR, both should work to pass the test
-successfully. The test was originally implemented because the ORB was
-having problems with location forward messages received by a follower
-thread.
-
- To execute the test simply run:
-
-$ ./run_test.pl
-
- the script returns 0 on success and non-zero on failures.
-
-@todo The test is not nearly a complete test for location forwarding,
- for example, it does not test deeeply nested location forwards
- or the interactions between location forwarding and multiple
- profiles.
-
-*/
diff --git a/TAO/tests/Forwarding/client.cpp b/TAO/tests/Forwarding/client.cpp
deleted file mode 100644
index 7d6eee99bb3..00000000000
--- a/TAO/tests/Forwarding/client.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(Forwarding, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 10;
-int nthreads = 1;
-int do_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Worker : public ACE_Task_Base
-{
-public:
- Worker (CORBA::ORB_ptr orb);
- // Constructor
-
- virtual void run_test (ACE_ENV_SINGLE_ARG_DECL);
- // The actual implementation of the test
-
- // = The Task_Base methods
- virtual int svc (void);
-
-private:
- CORBA::ORB_var orb_;
- // The ORB reference
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Worker worker (orb.in ());
-
- if (worker.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot activate worker threads\n"),
- 1);
-
- ACE_Time_Value tv (5, 0);
-
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now run a test in the main thread, just to confuse matters a
- // little more.
- worker.run_test (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- worker.thr_mgr ()->wait ();
-
- if (do_shutdown)
- {
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in main:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Worker::Worker (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->run_test (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in thread (%t)\n");
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-Worker::run_test (ACE_ENV_SINGLE_ARG_DECL)
-{
- for (int j = 0; j != niterations; ++j)
- {
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Boolean is_simple_server =
- object->_is_a ("IDL:Simple_Server:1.0" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (!is_simple_server)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result from _is_a()\n"));
- }
-
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior));
- return;
- }
-
- for (int i = 0; i != niterations; ++i)
- {
- CORBA::Boolean r =
- server->test_is_a ("IDL:Foo:1.0" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (r != 0)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d\n",
- r));
- }
-}
diff --git a/TAO/tests/Forwarding/run_test.pl b/TAO/tests/Forwarding/run_test.pl
deleted file mode 100755
index 69d94eedb7a..00000000000
--- a/TAO/tests/Forwarding/run_test.pl
+++ /dev/null
@@ -1,59 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://localhost:$port -o $iorfile");
-$CL1 = new PerlACE::Process ("client", "-i 100 -k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-x -i 100 -k corbaloc::localhost:$port/Simple_Server");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-print STDERR "==== Running first test, using full IORs\n";
-
-$client = $CL1->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client 1 returned $client\n";
- $status = 1;
-}
-
-print STDERR "==== Running second test, using corbaloc IORs ($port)\n";
-
-
-$client = $CL2->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client 2 returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Forwarding/server.cpp b/TAO/tests/Forwarding/server.cpp
deleted file mode 100644
index 788a56c975a..00000000000
--- a/TAO/tests/Forwarding/server.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/IORTable/IORTable.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Forwarding, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var table_object =
- orb->resolve_initial_references("IORTable" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var table =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (CORBA::is_nil (table.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the IORTable.\n"),
- 1);
- table->bind ("Simple_Server", ior.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Forwarding/test.idl b/TAO/tests/Forwarding/test.idl
deleted file mode 100644
index b9aa7108ed3..00000000000
--- a/TAO/tests/Forwarding/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface Simple_Server
-{
- boolean test_is_a (in string type);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Forwarding/test_i.cpp b/TAO/tests/Forwarding/test_i.cpp
deleted file mode 100644
index b110a24573e..00000000000
--- a/TAO/tests/Forwarding/test_i.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(Forwarding, test_i, "$Id$")
-
-CORBA::Boolean
-Simple_Server_i::test_is_a (const char * /* type */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a %s\n", type));
- return 0;
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Forwarding/test_i.h b/TAO/tests/Forwarding/test_i.h
deleted file mode 100644
index 01b273ba987..00000000000
--- a/TAO/tests/Forwarding/test_i.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Forwarding
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_FORWARDING_TEST_I_H
-#define TAO_FORWARDING_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Boolean test_is_a (const char * type ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_FORWARDING_TEST_I_H */
diff --git a/TAO/tests/Forwarding/test_i.i b/TAO/tests/Forwarding/test_i.i
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/Forwarding/test_i.i
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.cpp
deleted file mode 100644
index a6a92dab129..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Big_Reply_ptr reply_gen,
- int event_count,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , reply_gen_ (Test::Big_Reply::_duplicate (reply_gen))
- , event_count_ (event_count)
-
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- // Now get the big replies..
- ACE_TRY
- {
- for (int i = 0; i != this->event_count_; ++i)
- {
- Test::Octet_Seq_var seq =
- this->reply_gen_->get_big_reply (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong length = seq->length ();
- for(CORBA::ULong i = 0; i < length; ++i)
- {
- if (seq[i] != 'A')
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Invalid data '%c' at %d\n", seq[i], i),
- -1);
- }
- }
-
-// ACE_Time_Value tv(0, 10000000);
-// ACE_OS::sleep(tv);
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception Caught \n");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.h b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.h
deleted file mode 100644
index 7a3de11b440..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef JAVA_BIG_REPLY_CLIENT_TASK_H
-#define JAVA_BIG_REPLY_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Big_Reply_ptr receiver,
- CORBA::Long event_count,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
-
- /// Reference to the test interface
- Test::Big_Reply_var reply_gen_;
-
- /// Number of remote calls
- int event_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* JAVA_BIG_REPLY_CLIENT_TASK_H */
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Java_Big_Reply.mpc b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Java_Big_Reply.mpc
deleted file mode 100644
index 693db9d11bc..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Java_Big_Reply.mpc
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*IDL) {
- requires += java
-
- // Define the Java IDL with a hack output extension
- // Since our idl file has a module, the generated java files
- // will go int the module name so we set the extension to /
- Define_Custom(JAVA_IDL) {
- command = idlj
- inputext = .idl
- generic_outputext = /
- }
-
- // Make sure we don't get any of the defaults
- Source_Files {
- }
- Inline_Files {
- }
- Header_Files {
- }
-
- JAVA_IDL_Files {
- // The idlj will automatically put the generated files
- // in the Test directory
- gendir = Test
-
- // We want both server and client side
- commandflags += -fall
-
- Test.idl
- }
-}
-
-// This project will build the java server and C++ client
-project(Java_Big_Reply): taoexe, portableserver {
- requires += java
- after += *IDL
-
- // Define the java type
- Define_Custom(JAVA) {
- command = javac
- commandflags = -d .
- inputext = .java
- generic_outputext = .class
- }
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Test.idl b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Test.idl
deleted file mode 100644
index 442d6a746be..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Test.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-//$Id$
-module Test
-{
-
- typedef sequence<octet> Octet_Seq;
-
- interface Big_Reply
- {
- /// Receive a big reply
- Octet_Seq get_big_reply ();
-
- /// Ping message
- void ping ();
-
- /// Shudown the remote ORB
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp
deleted file mode 100644
index e900b46cdc1..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Muxing, client, "$Id$")
-
-static const char *ior = "file://server.ior";
-static size_t nthreads = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-n <nthreads> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Big_Reply_var reply_gen =
- Test::Big_Reply::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (reply_gen.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
-
- Client_Task client_task (reply_gen.in (),
- 10,
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- reply_gen->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/run_test.pl b/TAO/tests/GIOP_Fragments/Java_Big_Reply/run_test.pl
deleted file mode 100755
index d51fafed5e6..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/run_test.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-use Config;
-sub which {
- my($prog) = shift;
- my($exec) = $prog;
-
- if (defined $ENV{'PATH'}) {
- my($part) = '';
- foreach $part (split($Config{'path_sep'}, $ENV{'PATH'})) {
- $part .= "/$prog";
- if ( -x $part ) {
- $exec = $part;
- last;
- }
- }
- }
-
- return $exec;
-}
-
-$iorfile = PerlACE::LocalFile ('server.ior');
-unlink $iorfile;
-
-$SV = new PerlACE::Process (which('java'), 'server');
-$CL = new PerlACE::Process ('client');
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL->Spawn (60);
-
-$client = $CL->WaitKill (60);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/server.java b/TAO/tests/GIOP_Fragments/Java_Big_Reply/server.java
deleted file mode 100644
index f23d552c542..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/server.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// $Id$
-
-// If this server is compiled and run with the JDK ORB, it will
-// fragment the GIOP Messages sent when get_big_reply() is called.
-
-import org.omg.CORBA.*;
-import org.omg.PortableServer.*;
-import Test.Big_ReplyPOA;
-
-class Big_ReplyImpl extends Big_ReplyPOA
-{
- private org.omg.CORBA.ORB orb_;
-
- public byte[] get_big_reply () {
- byte [] seq = new byte [1000000];
- for (int i = 0; i < seq.length; i++)
- seq [i] = 'A';
- return seq;
- }
-
- public void setORB (org.omg.CORBA.ORB orb_val) {
- orb_ = orb_val;
- }
-
- public void ping () {
- }
-
- public void shutdown () {
- orb_.shutdown (false);
- }
-}
-
-
-public class server
-{
- public static void main (String args[]) {
- try {
- ORB orb = ORB.init (args, null);
- POA poa = org.omg.PortableServer.POAHelper.narrow (
- orb.resolve_initial_references ("RootPOA"));
-
- Big_ReplyImpl servant = new Big_ReplyImpl ();
- servant.setORB (orb);
- poa.activate_object (servant);
-
- String filename = new String ("server.ior");
- String ior = orb.object_to_string (servant._this ());
- java.io.FileWriter file = new java.io.FileWriter (filename);
- file.write (ior);
- file.flush ();
- file.close ();
-
- poa.the_POAManager ().activate ();
- System.out.println ("Ready...");
- orb.run ();
- }
- catch (Exception e) {
- System.err.println ("ERROR: " + e);
- e.printStackTrace (System.out);
- }
- }
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Java_Big_Request.mpc b/TAO/tests/GIOP_Fragments/Java_Big_Request/Java_Big_Request.mpc
deleted file mode 100644
index 3c081fa6da4..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Java_Big_Request.mpc
+++ /dev/null
@@ -1,45 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*IDL) {
- requires += java
-
- // Define the Java IDL with a hack output extension
- // Since our idl file has a module, the generated java files
- // will go int the module name so we set the extension to /
- Define_Custom(JAVA_IDL) {
- command = idlj
- inputext = .idl
- generic_outputext = /
- }
-
- // Make sure we don't get any of the defaults
- Source_Files {
- }
- Inline_Files {
- }
- Header_Files {
- }
-
- JAVA_IDL_Files {
- // The idlj will automatically put the generated files
- // in the Test directory
- gendir = Test
-
- Test.idl
- }
-}
-
-// This project will build the java server and C++ client
-project(Java_Big_Request): taoexe, portableserver {
- requires += java
- after += *IDL
-
- // Define the java type
- Define_Custom(JAVA) {
- command = javac
- commandflags = -d .
- inputext = .java
- generic_outputext = .class
- }
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.cpp
deleted file mode 100644
index 3e0c7b01499..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-#include "Payload_Receiver.h"
-
-ACE_RCSID(Big_Request_Muxing, Payload_Receiver, "$Id$")
-
-Payload_Receiver::Payload_Receiver (CORBA::ORB_ptr orb)
- : count_ (0),
- orb_(CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Payload_Receiver::more_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Payload_Receiver::Invalid_Payload))
-{
- ++this->count_;
-
- CORBA::ULong length = payload.length ();
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- if (payload[i] != 'A')
- {
- ACE_THROW (Test::Payload_Receiver::Invalid_Payload ());
- }
- }
-}
-
-
-void
-Payload_Receiver::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-
-int
-Payload_Receiver::get_count () const
-{
- return count_;
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.h b/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.h
deleted file mode 100644
index 418f80cbffa..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef JAVA_BIG_REQUEST_PAYLOAD_RECEIVER_H
-#define JAVA_BIG_REQUEST_PAYLOAD_RECEIVER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Payload_Receiver interface
-/**
- * Simply print count how many bytes were received.
- */
-class Payload_Receiver
- : public virtual POA_Test::Payload_Receiver
-{
-public:
- /// Constructor
- Payload_Receiver (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void more_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Payload_Receiver::Invalid_Payload));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- int get_count (void) const;
-
-public:
- int count_;
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* JAVA_BIG_REQUEST_PAYLOAD_RECEIVER_H */
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Test.idl b/TAO/tests/GIOP_Fragments/Java_Big_Request/Test.idl
deleted file mode 100644
index 902aed29cf4..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Test.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- typedef sequence<octet> Payload;
-
- interface Payload_Receiver
- {
- exception Invalid_Payload {
- };
-
- /// Send the data using a twoway operation
- void more_data (in Payload the_payload)
- raises (Invalid_Payload);
-
- /// Shudown the remote ORB
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/client.java b/TAO/tests/GIOP_Fragments/Java_Big_Request/client.java
deleted file mode 100644
index b3d1dd3eafb..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/client.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-
-// If this server is compiled and run with the JDK ORB, it will
-// fragment the GIOP Messages sent when more_data() is called.
-
-import java.io.FileReader;
-import java.io.BufferedReader;
-import org.omg.CORBA.*;
-import org.omg.PortableServer.*;
-import Test.Payload_Receiver;
-import Test.Payload_ReceiverHelper;
-
-public class client
-{
- public static void main (String args[]) {
- try {
- ORB orb = ORB.init (args, null);
-
- // Get the object reference
- BufferedReader reader = new BufferedReader (
- new FileReader ("server.ior"));
- StringBuffer ior = new StringBuffer();
- String line = null;
- while ((line = reader.readLine()) != null) {
- ior.append(line);
- }
-
- org.omg.CORBA.Object obj = orb.string_to_object (ior.toString ());
- Payload_Receiver receiver = Payload_ReceiverHelper.narrow (obj);
-
- // Set up the payload
- byte [] seq = new byte [1000000];
- for (int i = 0; i < seq.length; ++i)
- seq [i] = 'A';
-
- // Invoke the method on the server
- for (int i = 0; i < 20; ++i)
- receiver.more_data (seq);
-
- receiver.shutdown ();
- }
- catch (Exception e) {
- System.err.println ("ERROR: " + e);
- e.printStackTrace (System.out);
- }
- }
-}
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/run_test.pl b/TAO/tests/GIOP_Fragments/Java_Big_Request/run_test.pl
deleted file mode 100755
index e8514914409..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/run_test.pl
+++ /dev/null
@@ -1,53 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ('server.ior');
-$TARGETHOSTNAME = 'localhost';
-$port = PerlACE::uniqueid () + 12000;
-
-## No ORB fragments GIOP 1.0 messages.
-## The JDK ORB only fragments GIOP 1.2 messages.
-foreach my $giop ('1.2') {
- print "Testing GIOP $giop Fragmentation\n";
- unlink $iorfile;
-
- $SV = new PerlACE::Process ('server',
- '-ORBEndpoint ' .
- "iiop://$giop\@$TARGETHOSTNAME" . ":$port");
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- my($cl) = system('java client');
- if ($cl != 0) {
- print STDERR "ERROR: client returned $cl\n";
- ++$status;
- }
-
- $server = $SV->WaitKill (20);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- ++$status;
- }
-
- unlink $iorfile;
-
- if ($status) {
- last;
- }
-}
-
-exit $status;
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp
deleted file mode 100644
index cbe3a65d928..00000000000
--- a/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-// $Id$
-
-#include "Payload_Receiver.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Big_Request_Muxing, server, "$Id$")
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int status = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Payload_Receiver *payload_receiver_impl;
- ACE_NEW_RETURN (payload_receiver_impl,
- Payload_Receiver (orb.in ()),
- 1);
- PortableServer::ServantBase_var receiver_owner_transfer(payload_receiver_impl);
-
- Test::Payload_Receiver_var payload_receiver =
- payload_receiver_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (payload_receiver.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (payload_receiver_impl->get_count () != 20)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: %d is not the correct "
- "number of calls\n",
- payload_receiver_impl->get_count ()));
- ++status;
- }
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- ++status;
- }
- ACE_ENDTRY;
-
- return status;
-}
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/.cvsignore b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/.cvsignore
deleted file mode 100644
index 254defddb53..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-server
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/PMB_With_Fragments.mpc b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/PMB_With_Fragments.mpc
deleted file mode 100644
index 85905a99a88..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/PMB_With_Fragments.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoserver {
-}
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp
deleted file mode 100644
index 8dd53b815ec..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-#include "Payload_Receiver.h"
-
-ACE_RCSID(PMB_With_Fragments, Payload_Receiver, "$Id$")
-
-Payload_Receiver::Payload_Receiver (CORBA::ORB_ptr orb)
- : count_ (0),
- orb_(CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Payload_Receiver::more_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Payload_Receiver::Invalid_Payload))
-{
- ++this->count_;
-
- CORBA::ULong length = payload.length ();
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- if (payload[i] != 'A')
- {
- ACE_THROW (Test::Payload_Receiver::Invalid_Payload ());
- }
- }
-}
-
-
-void
-Payload_Receiver::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-
-int
-Payload_Receiver::get_count () const
-{
- return count_;
-}
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.h b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.h
deleted file mode 100644
index b9ced6d7672..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef PMB_WITH_FRAGMENTS_PAYLOAD_RECEIVER_H
-#define PMB_WITH_FRAGMENTS_PAYLOAD_RECEIVER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Payload_Receiver interface
-/**
- * Simply print count how many bytes were received.
- */
-class Payload_Receiver
- : public virtual POA_Test::Payload_Receiver
-{
-public:
- /// Constructor
- Payload_Receiver (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void more_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Payload_Receiver::Invalid_Payload));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- int get_count (void) const;
-
-public:
- int count_;
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* PMB_WITH_FRAGMENTS_PAYLOAD_RECEIVER_H */
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/README b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/README
deleted file mode 100644
index f29f1d236ec..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/README
+++ /dev/null
@@ -1,21 +0,0 @@
-In order to regenerate the data files, you will need to perform the
-following steps:
-
-1) Instrument TAO_Transport to write a copy of each data block into a file
-that was read from a socket by applying Transport.patch.
-
-2) Temporarily change ../Java_Big_Request/client.java to send only 2
-requests.
-
-3) Run the server from PMB_With_Fragments and the java client from
-../Java_Big_Request.
-
-Start the server:
-
-server -ORBEndpoint iiop://localhost:11000 -o ../Java_Big_Request/server.ior
-
-Then run the java client:
-
-java client
-
-4) Move the generated data file to the correct name.
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Test.idl b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Test.idl
deleted file mode 100644
index 39951f72137..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Test.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- typedef sequence<octet> Payload;
-
- interface Payload_Receiver
- {
- exception Invalid_Payload {
- };
-
- /// Send the data using a twoway operation
- void more_data (in Payload the_payload)
- raises (Invalid_Payload);
-
- /// Shutdown the remote ORB
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch
deleted file mode 100644
index 65433d35488..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Index: Transport.cpp
-===================================================================
-RCS file: /project/cvs-repository/ACE_wrappers-repository/TAO/tao/Transport.cpp,v
-retrieving revision 1.115
-diff -u -r1.115 Transport.cpp
---- Transport.cpp 7 Feb 2005 19:27:20 -0000 1.115
-+++ Transport.cpp 21 Feb 2005 14:23:10 -0000
-@@ -106,6 +106,29 @@
- ACE_Log_Msg::instance ()->release ();
- }
-
-+#define TAO_DUMP_TRANSPORT_DATA
-+
-+#if defined (TAO_DUMP_TRANSPORT_DATA)
-+static void
-+dump_transport_data(size_t id,
-+ const ACE_Message_Block* message_block)
-+{
-+ char dump_path[PATH_MAX];
-+ ACE_OS::sprintf(dump_path, "transport_data_dump_%d.dat", id);
-+
-+ ACE_HANDLE dump_out = ACE_OS::open(dump_path, O_WRONLY|O_APPEND);
-+ if (dump_out == ACE_INVALID_HANDLE) {
-+ dump_out = ACE_OS::open(dump_path, O_WRONLY|O_CREAT,
-+ ACE_DEFAULT_FILE_PERMS);
-+ }
-+ if (dump_out != ACE_INVALID_HANDLE) {
-+ ACE_OS::write(dump_out,
-+ message_block->rd_ptr (), message_block->length ());
-+ ACE_OS::close(dump_out);
-+ }
-+}
-+#endif /* TAO_DUMP_TRANSPORT_DATA */
-+
- TAO_Transport::TAO_Transport (CORBA::ULong tag,
- TAO_ORB_Core *orb_core)
- : tag_ (tag)
-@@ -1332,6 +1355,10 @@
- // Set the write pointer in the stack buffer
- message_block.wr_ptr (n);
-
-+#if defined (TAO_DUMP_TRANSPORT_DATA)
-+ dump_transport_data (this->id (), &message_block);
-+#endif /* TAO_DUMP_TRANSPORT_DATA */
-+
- // Parse the message and try consolidating the message if
- // needed.
- retval = this->parse_consolidate_messages (message_block,
-@@ -1551,6 +1578,10 @@
-
- incoming.wr_ptr (n);
- missing_data -= n;
-+
-+#if defined (TAO_DUMP_TRANSPORT_DATA)
-+ dump_transport_data (this->id (), &incoming);
-+#endif /* TAO_DUMP_TRANSPORT_DATA */
- }
-
- // If we got an error..
-@@ -1981,6 +2012,10 @@
- // Move the write pointer
- qd->msg_block_->wr_ptr (n);
-
-+#if defined (TAO_DUMP_TRANSPORT_DATA)
-+ dump_transport_data (this->id (), qd->msg_block_);
-+#endif /* TAO_DUMP_TRANSPORT_DATA */
-+
- // Decrement the missing data
- qd->missing_data_ -= n;
-
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/dribble.pl b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/dribble.pl
deleted file mode 100755
index 26a561aa58b..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/dribble.pl
+++ /dev/null
@@ -1,150 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
- & eval 'exec perl -w -S $0 $argv:q'
- if 0;
-
-# ******************************************************************
-# Author: Chris Cleeland
-# Date: 10/26/2002
-# $Id$
-# ******************************************************************
-
-use Getopt::Long;
-use File::Basename;
-use IO::Socket::INET;
-use IO::File;
-use Carp;
-
-sub getnum {
- use POSIX qw(strtoul);
- my $str = shift;
- $str =~ s/^\s+//;
- $str =~ s/\s+$//;
- $! = 0;
- my($num, $unparsed) = strtoul($str);
- if (($str eq '') || ($unparsed != 0) || $!) {
- return undef;
- } else {
- return $num;
- }
-}
-
-my $corba_server_addr = "127.0.0.1";
-my $corba_server_port = 12345;
-my $progress_interval = 10;
-my $verbosity = 0;
-my $interactive = undef;
-my $datastreamfile = 'datastream.dat';
-my $dataxmitlayoutfile = undef;
-my $delay = .25;
-
-my %options = ('host|h=s' => \$corba_server_addr,
- 'port|p=s' => \$corba_server_port,
- 'interval|i=i' => \$progress_interval,
- 'verbose|verbosity|v+' => \$verbosity,
- 'interactive' => \$interactive,
- 'stream|s=s' => \$datastreamfile,
- 'layout|l=s' => \$dataxmitlayoutfile,
- 'delay|d=f' => \$delay,
- );
-my $result = GetOptions (%options);
-
-if (!$result) {
- my($str) = 'Usage: ' . basename($0);
- my($initial) = length($str);
- my($length) = $initial;
- my($maxLine) = 78;
-
- print $str;
-
- foreach my $key (sort keys %options) {
- my($opt, $type) = split(/[|=]/, $key);
- my($str) = " [--$opt" . (defined $type ? " <$opt>" : "") . "]";
- my($len) = length($str);
- if ($length + $len > $maxLine) {
- print "\n" . (" " x $initial);
- $length = $initial;
- }
- print $str;
- $length += $len;
- }
- print "\n";
- exit(0);
-}
-
-croak "Must supply a data file using --stream and a layout file using --layout"
- unless defined $datastreamfile && defined $dataxmitlayoutfile;
-
-my $sock = IO::Socket::INET->new(PeerAddr => $corba_server_addr,
- PeerPort => $corba_server_port,
- Proto => 'tcp')
- or croak "Unable to establish connection to $corba_server_addr:$corba_server_port: $!\n";
-
-#
-# Infer a name for the layout file
-#
-if (! defined $dataxmitlayoutfile) {
- $dataxmitlayoutfile = $datastreamfile;
- $dataxmitlayoutfile =~ s/\.dat$/\.layout/;
-}
-
-# Now we just start reading from <> and writing to the socket We
-# currently assume all are oneways, so we don't worry about reading
-# from the socket.
-
-my $stream = new IO::File $datastreamfile, "r"
- or croak "Unable to open $datastreamfile for reading: $!";
-my $layout = new IO::File $dataxmitlayoutfile, "r"
- or croak "Unable to open $dataxmitlayoutfile for reading: $!";
-
-$| = 1;
-print "Sending...(1 dot every $progress_interval hunks)\n";
-print "Hit <RETURN> key to send a packet\n" if defined $interactive;
-my $numread;
-do {
-
- #
- # Determine the size of the hunk we have to read/send
- #
- $_ = $layout->getline;
- s/#.*$//;
- chomp $_;
- next if ($_ =~ /^\s*$/);
-
- my $requested_hunksize = getnum($_);
- my $l = $layout->input_line_number;
-
- my $hunk;
-
- #
- # Read in the hunk size we want
- #
- $numread = $stream->sysread($hunk, $requested_hunksize);
- if (! defined $numread) {
- carp "\nHunk $l: Error reading from stream: $!";
- next;
- }
- elsif ($numread != $requested_hunksize) {
- carp "\nHunk $l: short read (expected $requested_hunksize, got $numread); going on.";
- }
-
- print "Hunk $l: length ", length($hunk), "\n" if ($verbosity >= 1);
- if (defined $interactive) {
- <STDIN>;
- }
- else {
- select(undef, undef, undef, $delay);
- }
-
- my $ret = $sock->send($hunk, 0);
- if ($ret != length($hunk)) {
- carp "\nHunk $l: problem sending hunk $.: $!\n";
- exit(1);
- }
-
- print "." if ($. % $progress_interval == 0);
-} until $numread == 0 || $layout->eof;
-print "\nDone.\n";
-
-## Sleep 1 second to allow the socket on Windows to get flushed
-## before it's destroyed and this process exits.
-sleep(1);
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.dat b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.dat
deleted file mode 100644
index c09b63a7cc1..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.dat
+++ /dev/null
Binary files differ
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.layout b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.layout
deleted file mode 100644
index cb44db16b3e..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.layout
+++ /dev/null
@@ -1,86 +0,0 @@
-2
-2
-6
-2
-3
-9
-272
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-18462
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.dat b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.dat
deleted file mode 100644
index 9b9e637d489..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.dat
+++ /dev/null
Binary files differ
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.layout b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.layout
deleted file mode 100644
index dfa5d7a16b9..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.layout
+++ /dev/null
@@ -1,86 +0,0 @@
-2
-2
-6
-2
-3
-9
-272
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-25815
-18500
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl
deleted file mode 100755
index c8c8761853f..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl
+++ /dev/null
@@ -1,57 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ('server.ior');
-$TARGETHOSTNAME = 'localhost';
-$port = PerlACE::uniqueid () + 12000;
-$debug = 0;
-$endien = (pack('L', 0x41424344) eq 'ABCD' ? '_be' : '');
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGT_HOST'};
- $SV = new PerlACE::ProcessVX ('server',
- '-ORBEndpoint ' .
- "iiop://$TARGETHOSTNAME" . ":$port " .
- "-ORBDebugLevel $debug");
-}
-else {
- $SV = new PerlACE::Process ('server',
- '-ORBEndpoint ' .
- "iiop://$TARGETHOSTNAME" . ":$port " .
- "-ORBDebugLevel $debug");
-}
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-my($cl) = system("$^X dribble.pl --host=$TARGETHOSTNAME --port=$port " .
- "--stream=giop1.2_fragments$endien.dat " .
- "--layout=giop1.2_fragments$endien.layout");
-if ($cl != 0) {
- print STDERR "ERROR: client returned $cl\n";
- ++$status;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- ++$status;
-}
-
-unlink $iorfile;
-exit $status;
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp
deleted file mode 100644
index 166b514f35c..00000000000
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-// $Id$
-
-#include "Payload_Receiver.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Big_Request_Muxing, server, "$Id$")
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int status = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- PortableServer::LifespanPolicy_var lifespan =
- root_poa->create_lifespan_policy (PortableServer::PERSISTENT);
- CORBA::PolicyList policy_list;
- policy_list.length (1);
- policy_list[0] = PortableServer::LifespanPolicy::_duplicate (
- lifespan.in ());
- PortableServer::POA_var persistent_poa =
- root_poa->create_POA ("PersistentPOA", poa_manager.in (),
- policy_list);
- lifespan->destroy ();
-
-
- Payload_Receiver *payload_receiver_impl = 0;
- ACE_NEW_RETURN (payload_receiver_impl,
- Payload_Receiver (orb.in ()),
- 1);
- PortableServer::ServantBase_var receiver_owner_transfer(payload_receiver_impl);
-
- PortableServer::ObjectId_var id =
- persistent_poa->activate_object (payload_receiver_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- persistent_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (payload_receiver_impl->get_count () != 2)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: %d is not the correct "
- "number of calls\n",
- payload_receiver_impl->get_count ()));
- ++status;
- }
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- ++status;
- }
- ACE_ENDTRY;
-
- return status;
-}
diff --git a/TAO/tests/Hang_Shutdown/Hang.mpc b/TAO/tests/Hang_Shutdown/Hang.mpc
deleted file mode 100644
index 9d58d8df81e..00000000000
--- a/TAO/tests/Hang_Shutdown/Hang.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- server.cpp
- TestS.cpp
- TestC.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- avoids += ace_for_tao
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Hang_Shutdown/Test.idl b/TAO/tests/Hang_Shutdown/Test.idl
deleted file mode 100644
index 0ea5055f05a..00000000000
--- a/TAO/tests/Hang_Shutdown/Test.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-module Test
-{
- interface Hang
- {
- void send_stuff (in string foo,
- in boolean flag);
- };
-};
-
diff --git a/TAO/tests/Hang_Shutdown/client.conf b/TAO/tests/Hang_Shutdown/client.conf
deleted file mode 100644
index 71a8d5538ea..00000000000
--- a/TAO/tests/Hang_Shutdown/client.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-
-static Client_Strategy_Factory "-ORBClientConnectionHandler rw" \ No newline at end of file
diff --git a/TAO/tests/Hang_Shutdown/client.cpp b/TAO/tests/Hang_Shutdown/client.cpp
deleted file mode 100644
index 066461f895a..00000000000
--- a/TAO/tests/Hang_Shutdown/client.cpp
+++ /dev/null
@@ -1,267 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS.h"
-#include "ace/Task.h"
-#include "ace/Profile_Timer.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-namespace Test
-{
- const char *ior = "file://server.ior";
-
- ACE_Profile_Timer profile_timer;
- bool blocked = false;
-
- bool
- parse_args (int argc, char *argv[])
- {
- ACE_Get_Opt get_opts (argc, argv, "b:k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'b':
- {
- int tmp =
- ACE_OS::atoi (get_opts.opt_arg ());
-
- if (tmp)
- blocked = true;
- else
- blocked = false;
- }
- break;
- case 'k':
- {
- ior = get_opts.opt_arg ();
- }
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- false);
- }
-
- // Indicates sucessful parsing of the command line
- return true;
- }
-
- class Client_Task : public ACE_Task_Base
- {
- public:
- Client_Task (Hang_ptr h)
- : h_ (Hang::_duplicate (h))
- {}
-
- virtual int svc (void)
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- this->h_->send_stuff ("Testing",
- false
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->h_->send_stuff ("Testing",
- false
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->h_->send_stuff ("Testing",
- true
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::COMM_FAILURE, f)
- {
- ACE_UNUSED_ARG (f);
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Caught COMM_FAILURE Exception \n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) This is expected \n"));
-
- return 0;
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ex._tao_print_exception ("Caught CORBA Exception \n");
-
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Error in test \n"));
-
- return -1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Caught a C++ exception \n"));
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Error in test \n"));
-
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
- }
-
- private:
- Hang_var h_;
- };
-
- class Shutdown_Task : public ACE_Task_Base
- {
- public:
- Shutdown_Task (CORBA::ORB_ptr o)
- : o_ (CORBA::ORB::_duplicate (o))
- {}
-
- virtual int svc (void)
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Calling shutdown \n"));
-
- // Just wait for the main thread to start sening out
- // messages
- ACE_OS::sleep (4);
-
- // Start the timer
- profile_timer.start ();
-
- this->o_->shutdown (blocked
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Stop the timer
- profile_timer.stop ();
-
- // Get the elampsed time
- ACE_Profile_Timer::ACE_Elapsed_Time el;
- profile_timer.elapsed_time (el);
-
- // The elapsed time is in secs
- if (el.real_time > 1)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Too long to shutdown \n"));
-
- return 0;
- }
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Caught exception during shutdown \n"));
-
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Error in test \n"));
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Returning from shutdown \n"));
- return 0;
- }
- private:
- CORBA::ORB_var o_;
- };
-
- static int
- try_main (int argc, char *argv[])
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) == false)
- return -1;
-
- CORBA::Object_var tmp =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hang_var test =
- Hang::_narrow (tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil test reference <%s>\n",
- ior),
- 1);
- }
-
- Client_Task ct (test.in ());
-
- if (ct.activate (THR_NEW_LWP | THR_JOINABLE, 1) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Activating shutdown thread \n"));
-
- Shutdown_Task st (orb.in ());
-
- if (st.activate (THR_NEW_LWP | THR_JOINABLE, 1) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate shutdown threads\n"),
- 1);
-
- ACE_Thread_Manager::instance ()->wait ();
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "CORBA Exception caught \n");
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Eror in test \n"));
- return -1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Error in test \n"));
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- return Test::try_main (argc, argv);
-}
diff --git a/TAO/tests/Hang_Shutdown/run_test.pl b/TAO/tests/Hang_Shutdown/run_test.pl
deleted file mode 100755
index 9fbc65b65ec..00000000000
--- a/TAO/tests/Hang_Shutdown/run_test.pl
+++ /dev/null
@@ -1,85 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (25);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-################################
-print STDERR "===== Client with RW handler\n";
-if (PerlACE::is_vxworks_test()) {
- $SV1 = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV1 = new PerlACE::Process ("server");
-}
-$CL1 = new PerlACE::Process ("client",
- " -ORBSvcConf client.conf");
-
-$SV1->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client1 = $CL1->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server1 = $SV1->WaitKill (25);
-
-if ($server1 != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-
-unlink $iorfile;
-exit $status;
diff --git a/TAO/tests/Hang_Shutdown/server.cpp b/TAO/tests/Hang_Shutdown/server.cpp
deleted file mode 100644
index 4f17562b879..00000000000
--- a/TAO/tests/Hang_Shutdown/server.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-namespace Test
-{
- const char *ior_output_file = "server.ior";
-
- static int
- try_main (int argc,
- char *argv[])
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *test_impl;
- ACE_NEW_RETURN (test_impl,
- test_i (),
- 1);
- PortableServer::ServantBase_var owner_transfer (test_impl);
-
- Hang_var test =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (10);
-
- orb->run (&tv);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught CORBA exception \n");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- return Test::try_main (argc, argv);
-}
diff --git a/TAO/tests/Hang_Shutdown/test_i.h b/TAO/tests/Hang_Shutdown/test_i.h
deleted file mode 100644
index 28f6ef82e23..00000000000
--- a/TAO/tests/Hang_Shutdown/test_i.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-#ifndef TAO_HANG_TEST_I_H
-#define TAO_HANG_TEST_I_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#include "ace/OS_NS_unistd.h"
-
-namespace Test
-{
- class test_i
- : public virtual POA_Test::Hang
- {
- public:
- // = The skeleton methods
- virtual void send_stuff (const char* str,
- CORBA::Boolean flag
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) - [%C]\n", str));
-
- if (flag)
- {
- ACE_OS::sleep (10);
-
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Returning from send_stuff\n", str));
- }
-
- return;
- }
- private:
- };
-}
-
-#include /**/ "ace/post.h"
-#endif /* TAO_HANG_TEST_I_H */
diff --git a/TAO/tests/Hello/.cvsignore b/TAO/tests/Hello/.cvsignore
deleted file mode 100644
index 83770c96269..00000000000
--- a/TAO/tests/Hello/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-TestA.cpp
-client
-server
diff --git a/TAO/tests/Hello/Hello.cpp b/TAO/tests/Hello/Hello.cpp
deleted file mode 100644
index 70af3ea8a11..00000000000
--- a/TAO/tests/Hello/Hello.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Hello/Hello.h b/TAO/tests/Hello/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/Hello/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Hello/Hello.mpc b/TAO/tests/Hello/Hello.mpc
deleted file mode 100644
index 9a1892855d9..00000000000
--- a/TAO/tests/Hello/Hello.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Hello/README b/TAO/tests/Hello/README
deleted file mode 100644
index ee77329decb..00000000000
--- a/TAO/tests/Hello/README
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
-
-@page Hello Test README File
-
- The simplest possible test for TAO. This is a very simple
-test for TAO, it can be argued that it is in fact too simple to do
-anything useful, i.e. chances are that this test will always pass.
-
- The goals of writing this test are:
-
-- Provide a very simple, very fast 'smoke test' for ORB developers.
- If Hello does not pass then something is extremely broken and you
- should go back to the drawing board.
-- Provide a code base to write more complex tests
-- Rule out basic infrastructure problems: if this test does not work
- for a user then the infrastructure (network, DNS, host
- configuration) are more likely to be at fault than the ORB.
-- External users are often asked to send us a 'simple test' for their
- use case, we can now point them to this test to explain what do we
- mean by "simple".
-- The -GA option has been added to the IDL compiler command line.
- This option generates type code and Any insertion/extraction
- operator implementations in a separate file with the extension *A.cpp.
- This file is not included in the compilation however, to make sure
- there is no dependency on it if the client and server do not use
- type codes or Anys.
-
- Please refrain from "improving", extending or expanding this
-test, if you need to change
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Hello/Test.idl b/TAO/tests/Hello/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Hello/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Hello/client.cpp b/TAO/tests/Hello/client.cpp
deleted file mode 100644
index f85722246b5..00000000000
--- a/TAO/tests/Hello/client.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Hello/run_test.pl b/TAO/tests/Hello/run_test.pl
deleted file mode 100755
index a0fdda9e00f..00000000000
--- a/TAO/tests/Hello/run_test.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$debug_level = '0';
-
-foreach $i (@ARGV) {
- if ($i eq '-debug') {
- $debug_level = '10';
- }
-}
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBDebuglevel $debug_level -o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBdebuglevel $debug_level -o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$server = $SV->Spawn ();
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Hello/server.cpp b/TAO/tests/Hello/server.cpp
deleted file mode 100644
index 3b309f50f0d..00000000000
--- a/TAO/tests/Hello/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s\n",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/ICMG_Any_Bug/.cvsignore b/TAO/tests/ICMG_Any_Bug/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/ICMG_Any_Bug/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/ICMG_Any_Bug/Hello.cpp b/TAO/tests/ICMG_Any_Bug/Hello.cpp
deleted file mode 100755
index bfa97ea05a1..00000000000
--- a/TAO/tests/ICMG_Any_Bug/Hello.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-#include "HelloWorld.h"
-
-ACE_RCSID(ICMG_Any_Bug, Hello, "$Id")
-
-Hello::Hello (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa)),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Test::HelloWorld_ptr
-Hello::get_helloworld (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- HelloWorld *hello_world;
- ACE_NEW_THROW_EX (hello_world,
- HelloWorld,
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (Test::HelloWorld::_nil ());
-
- PortableServer::ObjectId_var oid =
- poa_->activate_object (hello_world
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Test::HelloWorld::_nil ());
-
- Test::HelloWorld_var hw = hello_world->_this ();
- return hw._retn ();
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/ICMG_Any_Bug/Hello.h b/TAO/tests/ICMG_Any_Bug/Hello.h
deleted file mode 100755
index 429a7e10963..00000000000
--- a/TAO/tests/ICMG_Any_Bug/Hello.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "TestS.h"
-
-/// Implement the Test::Hello interface
-///
-class Hello
- : public virtual POA_Test::Hello
-{
-public:
-
- /// Constructor
- Hello (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa);
-
- virtual Test::HelloWorld_ptr get_helloworld (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- PortableServer::POA_var poa_;
-
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/ICMG_Any_Bug/Hello.mpc b/TAO/tests/ICMG_Any_Bug/Hello.mpc
deleted file mode 100644
index a41e64733b8..00000000000
--- a/TAO/tests/ICMG_Any_Bug/Hello.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(ICMG_Any_Bug_Hello_Server): taoserver {
- Source_Files {
- Hello.cpp
- HelloWorld.cpp
- server.cpp
- }
-}
-
-project(ICMG_Any_Bug_Hello_Client): taoclient, ifr_client, dynamicinterface, minimum_corba {
- after += ICMG_Any_Bug_Hello_Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/ICMG_Any_Bug/HelloWorld.cpp b/TAO/tests/ICMG_Any_Bug/HelloWorld.cpp
deleted file mode 100644
index e4badcc805c..00000000000
--- a/TAO/tests/ICMG_Any_Bug/HelloWorld.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-
-#include "HelloWorld.h"
-
-
-ACE_RCSID (ICMG_Any_Bug, HelloWorld, "$Id$")
-
-
-HelloWorld::HelloWorld (void)
-{
-}
-
-char *
-HelloWorld::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("TAO Any Implementation Works!");
-}
diff --git a/TAO/tests/ICMG_Any_Bug/HelloWorld.h b/TAO/tests/ICMG_Any_Bug/HelloWorld.h
deleted file mode 100755
index ad60160af2d..00000000000
--- a/TAO/tests/ICMG_Any_Bug/HelloWorld.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLOWORLD_H
-#define HELLOWORLD_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::HelloWorld interface
-///
-class HelloWorld
- : public virtual POA_Test::HelloWorld
-{
-public:
-
- HelloWorld (void);
- /// Constructor
-
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLOWORLD_H */
diff --git a/TAO/tests/ICMG_Any_Bug/README b/TAO/tests/ICMG_Any_Bug/README
deleted file mode 100644
index 28e5ee3c61d..00000000000
--- a/TAO/tests/ICMG_Any_Bug/README
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-
-@page ICMG_Any Test README File
-
- The goals of writing this test are:
-
- 1. To test TAO's implementaion of Any_to_object ().
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/ICMG_Any_Bug/Test.idl b/TAO/tests/ICMG_Any_Bug/Test.idl
deleted file mode 100644
index 70c1c911dd0..00000000000
--- a/TAO/tests/ICMG_Any_Bug/Test.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- interface HelloWorld
- {
- string get_string ();
- };
-
- interface Hello
- {
- HelloWorld get_helloworld ();
-
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/ICMG_Any_Bug/client.cpp b/TAO/tests/ICMG_Any_Bug/client.cpp
deleted file mode 100755
index 3457c09156a..00000000000
--- a/TAO/tests/ICMG_Any_Bug/client.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id$
-
-#include "tao/DynamicInterface/Request.h"
-#include "TestC.h"
-#include "tao/ORB.h"
-#include "ace/Get_Opt.h"
-#include <string>
-
-ACE_RCSID (ICMG_Any_Bug,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow (tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference \n"),
- 1);
- }
-
- CORBA::Request_var request;
- request = tmp->_request ("get_helloworld");
- request->set_return_type (Test::_tc_HelloWorld);
-
- CORBA::Any any;
- any <<= "Hi From DOC Group";
- request->arguments ()->add_value ("msg", any, CORBA::ARG_IN);
-
- request->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::NamedValue_ptr results = request->result ();
- CORBA::Any * obj_any = results->value ();
-
- CORBA::Object_var obj2;
- *obj_any >>= CORBA::Any::to_object (obj2);
- if (CORBA::is_nil (obj2.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Any_To_Object reference \n"),
- 1);
- }
-
- Test::HelloWorld_var hello_world =
- Test::HelloWorld::_narrow (obj2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello_world.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::HelloWorld reference \n"),
- 1);
- }
-
- CORBA::String_var the_string =
- hello_world->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/ICMG_Any_Bug/run_test.pl b/TAO/tests/ICMG_Any_Bug/run_test.pl
deleted file mode 100755
index 8c0d02aecd2..00000000000
--- a/TAO/tests/ICMG_Any_Bug/run_test.pl
+++ /dev/null
@@ -1,43 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/ICMG_Any_Bug/server.cpp b/TAO/tests/ICMG_Any_Bug/server.cpp
deleted file mode 100755
index e32f495349a..00000000000
--- a/TAO/tests/ICMG_Any_Bug/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (ICMG_Any_Bug,
- server,
- "$Id$ ")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in (), root_poa.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer (hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/IDL_Test/.cvsignore b/TAO/tests/IDL_Test/.cvsignore
deleted file mode 100644
index e04cf61fd06..00000000000
--- a/TAO/tests/IDL_Test/.cvsignore
+++ /dev/null
@@ -1,23 +0,0 @@
-anonymousA.cpp
-arrayA.cpp
-constantsA.cpp
-enum_in_structA.cpp
-fullA.cpp
-fwdA.cpp
-generic_objectA.cpp
-gperfA.cpp
-includedA.cpp
-includingA.cpp
-interfaceA.cpp
-keywordsA.cpp
-main
-nested_scopeA.cpp
-paramsA.cpp
-pragmaA.cpp
-reopen_include1A.cpp
-reopen_include2A.cpp
-reopened_modulesA.cpp
-repo_id_modA.cpp
-sequenceA.cpp
-typedefA.cpp
-unionA.cpp
diff --git a/TAO/tests/IDL_Test/Bug_2577_Regression.idl b/TAO/tests/IDL_Test/Bug_2577_Regression.idl
deleted file mode 100644
index 9b7b9ffa3af..00000000000
--- a/TAO/tests/IDL_Test/Bug_2577_Regression.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-// Test Bug 2577
-
-struct DateTime_T
-{
- short t;
-};
-
-typedef DateTime_T WhenLastUpdated_T;
-
-valuetype Data_T
-{
- // Typedef valuetype member was blocking generation of
- // SArg specialization for the struct.
- public WhenLastUpdated_T whenLastUpdated;
-};
-
-interface User_T {
- DateTime_T getLoginTime();
-};
-
diff --git a/TAO/tests/IDL_Test/Bug_2582_Regression.idl b/TAO/tests/IDL_Test/Bug_2582_Regression.idl
deleted file mode 100644
index 9eacd797660..00000000000
--- a/TAO/tests/IDL_Test/Bug_2582_Regression.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-// Test Bug 2582
-
-enum EncodingID_T
- {
- ENCODING_XML
- };
-
-struct Encoding_T
-{
- EncodingID_T id;
-};
-
-typedef EncodingID_T EncodingID2_T;
-
-interface FieldDevice_T
-{
- EncodingID2_T getEncodingID();
- Encoding_T getEncoding();
-};
-
diff --git a/TAO/tests/IDL_Test/Bug_2583_Regression.idl b/TAO/tests/IDL_Test/Bug_2583_Regression.idl
deleted file mode 100644
index e524981b54c..00000000000
--- a/TAO/tests/IDL_Test/Bug_2583_Regression.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-
-// Test Bug 2583
-
-module Test {
- local interface DynAny {};
- struct NameDynAnyPair {
- string id;
- DynAny value;
- };
- typedef sequence<NameDynAnyPair> NameDynAnyPairSeq;
-};
diff --git a/TAO/tests/IDL_Test/IDL_Test.mpc b/TAO/tests/IDL_Test/IDL_Test.mpc
deleted file mode 100644
index ba063d345ec..00000000000
--- a/TAO/tests/IDL_Test/IDL_Test.mpc
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Main): taoserver, messaging {
- exename = main
-
- IDL_Files {
- idlflags += -GC -GH -Gd
- array.idl
- Bug_2577_Regression.idl
- Bug_2582_Regression.idl
- Bug_2583_Regression.idl
- enum_in_struct.idl
- full.idl
- fwd.idl
- gperf.idl
- including.idl
- interface.idl
- included.idl
- union.idl
- nested_scope.idl
- params.idl
- reopened_modules.idl
- sequence.idl
- reopen_include1.idl
- reopen_include2.idl
- typeprefix.idl
- }
-
- IDL_Files {
- idlflags += -GC -GH -Gd -GA
- anonymous.idl
- constants.idl
- generic_object.idl
- keywords.idl
- pragma.idl
- repo_id_mod.idl
- typedef.idl
- valuetype.idl
- array_only.idl
- }
-
- Source_Files {
- main.cpp
- }
-}
diff --git a/TAO/tests/IDL_Test/README b/TAO/tests/IDL_Test/README
deleted file mode 100644
index 9165d90c57e..00000000000
--- a/TAO/tests/IDL_Test/README
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// README
-//
-// = AUTHOR
-// Jeff Parsons <j.parsons@vanderbilt.edu>
-//
-// ============================================================================
-
-This test is a collection of IDL files that once caused IDL compiler
-or C++ compiler errors, plus a dummy main.cpp for the build. There is
-no execution check in this test, the only outcome of interest being
-the build. The examples in the IDL files come from many sources - some
-are made from scratch, some are adapted from other tests, and some are
-adapted from examples sent in by ACE and/or TAO users. To all of these
-last, many thanks for your help in digging out these bugs!
-
-Each IDL file contains examples that are related, either by the IDL
-type involved or by the context in which the error occurs. As new bugs
-are uncovered and fixed, new examples will be added to the suite, to
-ensure that the bugs do not recur.
-
-The -GA option has been added to the IDL compiler command line. This
-option generates the implementations of type codes and Any
-insertion/extraction operators in a separate file with the
-extension *A.cpp. These files have been added to the build, to make
-sure that the option functions correctly for all the IDL types
-found in this test. If the client or server does not use type codes
-or Anys, these files may be left out of the compilation. This
-feature is tested in TAO_ROOT/tests/Hello.
-
-The IDL compiler command line options -GC -GH and -Gd have also been added.
-They switch on generation, respectively, of extra code for Asynchronous
-Method Invocation (AMI), Asynchronous Method Handling (AMH) and direct
-collocation of invocations (bypassing the POA and using a simple C++
-method call). By adding these options we can test for correct code
-generation for every IDL interface found in this test.
-
-To build the test files, type 'make' at the command line. The TAO IDL
-compiler will open each IDL file in the directory and generate code
-that will then be compiled by the C++ compiler on your platform.
-
-To run the test, type 'main' at the command line. The generation of
-correct IOR prefixes in pragma.idl is checked in the body of main().
-The rest of the .idl files need only to build cleanly. To test the
-client/server functionality of the various IDL types and operations,
-see the test suite in ACE_wrappers/TAO/tests/Param_Test.
-
diff --git a/TAO/tests/IDL_Test/anonymous.idl b/TAO/tests/IDL_Test/anonymous.idl
deleted file mode 100644
index 19b85b0ffd8..00000000000
--- a/TAO/tests/IDL_Test/anonymous.idl
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// anonymous.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// Normal typedef'd sequence
-module Not_Anon
-{
- typedef sequence<short> short_seq;
-};
-
-// Array is typedef'd, but sequence is not
-module Half_Anon
-{
- typedef sequence<char> char_seq_array[14];
- typedef sequence<unsigned long, 18> bd_ulong_seq_array[17];
- typedef sequence<unsigned short> ushort_seq_array[12];
- typedef sequence<unsigned short, 7> bd_ushort_seq_array[11];
-};
-
-module All_Anon
-{
- // Tests generation of unique template parameter type
- // names when identical bounded strings are used
- // repeatedly as parameters and/or return types.
- interface anon_bd_string_test
- {
- const long test_string_size = 25;
-
- string<test_string_size> TestFunc ();
- string<test_string_size> TestFunc2 ();
- string<test_string_size> TestFunc3 ();
- string<test_string_size> TestFunc23 ();
-
- void TestFunc4 (in string<test_string_size> inarg);
- void TestFunc41 (in string<test_string_size> inarg);
- void TestFunc42 (in string<test_string_size> inarg);
- void TestFunc43 (in string<test_string_size> inarg);
- };
-
- // Neither array nor sequence are typedef'd.
- exception Nested_Anon
- {
- sequence<float> float_seq_array[6];
- };
-};
-
-// An anonymous string of the same bound will be found in
-// another IDL file not included in this one (typedef.idl).
-// The typecode for the anonymous string should not give us
-// 'already found' link errors.
-module Second
-{
- typedef string<32> SecondString;
-};
diff --git a/TAO/tests/IDL_Test/array.idl b/TAO/tests/IDL_Test/array.idl
deleted file mode 100644
index f39886a1279..00000000000
--- a/TAO/tests/IDL_Test/array.idl
+++ /dev/null
@@ -1,168 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// array.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// Multidimensional arrays - constant vigilance.
-typedef short TwoDArray[64][63];
-
-typedef short ThreeDArray[64][63][62];
-
-typedef short FourDArray[64][63][62][61];
-
-// This problem is a combination of two others
-// that have long been fixed, but you never know...
-
-typedef long inside_array[5];
-
-struct wrap
- {
- inside_array member;
- };
-
-typedef wrap outside_array[10];
-
-
-// Once a problem with expressions in the brackets,
-// as well as the typedef'd/anonymous thing.
-
-interface tdef
-{
- const short byteslen = 12;
- typedef octet Bytes[byteslen + 1];
-
- struct bytes_or_longs
- {
- Bytes the_bytes; // typedef'd
- long Longs[byteslen]; // anonymous
- };
-};
-
-// To test that all the octet arrays build and link as
-// unique types.
-module ABCModule
-{
- struct RmtPhysicalInfo
- {
- octet rmtNodeId[22];
- octet rmtDetails[22];
- };
-
- struct bbbBubBubBubBaby
- {
- octet rmtNodeId[22];
- octet rmtDetails[22];
- };
-};
-
-typedef octet oa1[22];
-typedef octet oa2[22];
-
-// Test generation of Arg_Traits specialization for identical
-// arrays.
-interface array_args
-{
- void all_arrays (in oa1 arg1,
- in oa2 arg2);
-};
-
-// This should generate unique _var and _forany types, but
-// also generate TAO_String_Manager as the element type for both.
-module string_array
-{
- typedef string ArrayOfString[15];
- typedef string MyString;
- typedef MyString ArrayOfMyString[15];
-};
-
-// Checks code generation for arrays and typedefs of arrays
-// when they are not declared globally or inside a module.
-interface testdata
-{
- typedef char Arraychar[2];
- typedef Arraychar ArrayDeChar;
-
- struct struct2
- {
- Arraychar field_1;
- ArrayDeChar field_2;
- };
-
- typedef sequence<Arraychar> ArraycharList;
- typedef sequence<Arraychar,10> BdArraycharList;
-
- typedef sequence<ArrayDeChar> ArrayDeCharList;
- typedef sequence<ArrayDeChar,10> BdArrayDeCharList;
-};
-
-// Tests for explicit conversion of slice pointer to the
-// corresponding forany class before using CDR or Any
-// operators. This is required because myvec2_slice and
-// myvec3_slice are the same type, so implicit conversion
-// from myvec2_slice (in the case below) could go to
-// myvec2_forany or myvec3_forany.
-module arraytest
-{
- typedef string myvec2[2];
- typedef string myvec3[3];
-
- interface MyTest
- {
- void test_method (out myvec2 mystring);
- };
-};
-
-// Caught the has_constructor() flag not being passed from the
-// element type to the array in the AST.
-module bug_2126
-{
- union FirstUnion switch (boolean)
- {
- case TRUE: long first_union_foo;
- case FALSE: long first_union_bar;
- };
-
- typedef FirstUnion FirstUnionArray[2];
-
- struct MyStruct
- {
- FirstUnionArray my_struct_foo;
- };
-
- union SecondUnion switch (boolean)
- {
- case TRUE: MyStruct second_union_struct_member;
- case FALSE: long wibble;
- };
-
- typedef FirstUnion BdFirstUnionArray[2];
-
- struct BdMyStruct
- {
- BdFirstUnionArray my_struct_foo;
- };
-
- union BdSecondUnion switch (boolean)
- {
- case TRUE: BdMyStruct second_union_struct_member;
- case FALSE: long wibble;
- };
-};
-
-
diff --git a/TAO/tests/IDL_Test/array_only.idl b/TAO/tests/IDL_Test/array_only.idl
deleted file mode 100755
index bb791128223..00000000000
--- a/TAO/tests/IDL_Test/array_only.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// array_only.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// The IDL compiler used to generated code that would not compile if
-// an IDL file contained nothing but an array definition, but only if
-// the Any insertion/extraction operators were generated. They
-// depended upon the definition of CORBA::SystemException (in
-// particular, CORBA::MARSHAL), but the array impl template file in
-// TAO (tao/AnyTypeCode/Any_Array_Impl_T.cpp) did not have an #include
-// for "tao/SystemException.h". Now it does.
-
-typedef char TEST_TYPE[10];
diff --git a/TAO/tests/IDL_Test/constants.idl b/TAO/tests/IDL_Test/constants.idl
deleted file mode 100644
index 4d95752d59e..00000000000
--- a/TAO/tests/IDL_Test/constants.idl
+++ /dev/null
@@ -1,114 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// constants.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-
-const string all_escape = "\n\t\v\b\r\f\a\\\?\'\"";
-
-const char tick = '\'';
-
-const char backslash = '\\';
-
-// The escape sequences will display differently
-// depending on whether the platform uses signed
-// or unsigned chars, but either should build w/o
-// errors.
-
-// octal escape sequences
-
-const char oct_nought = '\000';
-const char lucky = '\7';
-const char square = '4';
-const char blastoff = '\321';
-const char max_char_oct = '\377';
-
-// hex escape sequences
-
-const char hex_nought ='\x0';
-const char fingers = '\xA';
-const char fortnight = '\xe';
-const char fivebits = '\x32';
-const char maybe_minus = '\xAf';
-const char max_char_hex = '\xff';
-
-// const wstring wstr = L"wstr";
-
-// unsigned longs greater than LONG_MAX
-
-const unsigned long in_range = 3222111000;
-const unsigned long max_ulong_oct = 037777777777;
-const unsigned long max_ulong_hex = 0XFFFFFFFF;
-
-// various uncommon but legal formats for floats and doubles
-
-const float root_beer = .2;
-const double bogey = .2;
-const float trip = 2.;
-const double vision = .2e-4;
-const double take = 2e3;
-const double dip = 1.797693134862315E+308;
-const double trouble = 2.2250738585072014E-308;
-
-// The original Sun code for bitwise operators was broken.
-
-const unsigned short stuff = ~0;
-const unsigned long day = ~0;
-const unsigned long drink = 1000000000 << 2;
-
-// An enum of one type cannot be assigned to an constant of another
-// enum type, but it's ok if one is a typedef of the other.
-module m_a
-{
- enum enum_a { value_1, value_2, value_3, value_4, value_5 };
-};
-
-module m_b
-{
- typedef m_a::enum_a enum_b;
-};
-
-module problems
-{
- const m_b::enum_b bconst = m_a::value_2;
-};
-
-// In a class, string constants cannot be declared inline, but
-// arithmetic types can be.
-module ClassConstants
-{
- interface Iface
- {
- const long iface_long = 55;
- const string iface_str = "iface_str";
-// const wstring iface_wstr = L"iface_wstr";
- };
-
- valuetype Vt
- {
- const double vt_long = 66.66;
- const string vt_str = "vt_str";
-// const wstring vt_wstr = L"vt_wstr";
- };
-};
-
-
-
-
-
diff --git a/TAO/tests/IDL_Test/enum_in_struct.idl b/TAO/tests/IDL_Test/enum_in_struct.idl
deleted file mode 100644
index d3c41ce7781..00000000000
--- a/TAO/tests/IDL_Test/enum_in_struct.idl
+++ /dev/null
@@ -1,84 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// enum_in_struct.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// Tests for correct parsing and code generation for
-// both named and anonymous enums in a struct.
-
-enum UnNamed
- {
- UNNAMED_FIRST,
- UNNAMED_SECOND,
- UNNAMED_THIRD
- };
-
-struct HoldsEnum
-{
- enum Named
- {
- NAMED_FIRST,
- NAMED_SECOND,
- NAMED_THIRD
- } named_enum;
-
- UnNamed unnamed_enum;
-};
-
-// Test for anonymous arrays of member declarations
-
-struct decl_heavy_struct
-{
- enum str_en
- {
- a,
- b,
- c
- } m_en[10];
-
- struct st
- {
- long a;
- char b;
- } m_st[10];
-
- union un switch (long)
- {
- case 1: long a;
- case 2: char b;
- } m_un[10];
-};
-
-// Similar case for exception included here - no sense
-// in making a separte file for exceptions, which are
-// almost the same as structs.
-
-exception ErrorException
-{
- enum ReasonCode
- {
- RESOURCE,
- COMMUNICATION,
- ASSERTION,
- STATE,
- ALREADY,
- OTHER
- } reason;
-};
-
diff --git a/TAO/tests/IDL_Test/full.idl b/TAO/tests/IDL_Test/full.idl
deleted file mode 100644
index 6df0fdc4383..00000000000
--- a/TAO/tests/IDL_Test/full.idl
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// full.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// This file, along with its companion fwd.idl, test the
-// handling of forward interface declarations that are
-// not defined in the same IDL file. The two files have
-// mutually dependent interfaces. It is no longer necessary
-// for such ILD files to include each other, as long as
-// they are part of the same build.
-
-module scope_test
-{
- interface i_scope_test {};
-};
-
-module mod2
-{
- interface fwd;
- interface full;
-
- interface fwd
- {
- attribute string attr;
-
- union un switch (short)
- {
- case 0: full full_mem;
- };
-
- typedef sequence<full> full_seq;
-
- exception bar {};
-
- full op (inout full full_arg,
- inout un un_arg,
- inout full_seq full_seq_arg)
- raises (bar);
- };
-
- interface full;
- interface fwd;
-};
-
diff --git a/TAO/tests/IDL_Test/fwd.idl b/TAO/tests/IDL_Test/fwd.idl
deleted file mode 100644
index 519d5489f6e..00000000000
--- a/TAO/tests/IDL_Test/fwd.idl
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// fwd.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// This file, along with its companion full.idl, test the
-// handling of forward interface declarations that are
-// not defined in the same IDL file. The two files have
-// mutually dependent interfaces. It is no longer necessary
-// for such ILD files to include each other, as long as
-// they are part of the same build.
-
-module scope_test
-{
- interface i_scope_test;
-};
-
-module mod2
-{
- struct scope_struct
- {
- scope_test::i_scope_test ss_member;
- };
-
- interface fwd;
-
- exception exp
- {
- fwd fwd_mem;
- };
-
- typedef fwd td_fwd;
-
- interface full
- {
- fwd op (in fwd inarg,
- inout fwd inoutarg,
- out fwd outarg);
- };
-
- typedef sequence<full, 5> full_seq2;
-
- interface fwd;
-};
-
-// Tests a bug where code generation for an interface
-// which was forward declared, then fully defined with
-// both concrete and abstract parents caused the IDL
-// compiler to crash.
-module fwd_mixed_intf
-{
- interface mixed_parents;
-
- interface concrete_parent {};
-
- abstract interface abstract_parent {};
-
- interface mixed_abs_first : abstract_parent, concrete_parent {};
- interface mixed_conc_first : concrete_parent, abstract_parent {};
-};
-
diff --git a/TAO/tests/IDL_Test/generic_object.idl b/TAO/tests/IDL_Test/generic_object.idl
deleted file mode 100644
index d0a21cdec0e..00000000000
--- a/TAO/tests/IDL_Test/generic_object.idl
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// generic_object.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// The IDL compiler deals with these in a completely different way
-// that it deals with a derived object, i.e., an interface.
-
-enum ObjectType
-{
- OT_THIS,
- OT_THAT
-};
-
-union Selecter switch (ObjectType)
-{
- case OT_THIS: Object this_object;
- case OT_THAT: Object that_object;
-};
-
-// Test stub code for generic object parameters.
-interface generic
-{
- Object op (in Object inarg,
- inout Object inoutarg,
- out Object outarg);
-};
-
diff --git a/TAO/tests/IDL_Test/gperf.idl b/TAO/tests/IDL_Test/gperf.idl
deleted file mode 100644
index a26cb9f9f33..00000000000
--- a/TAO/tests/IDL_Test/gperf.idl
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// gperf.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// The examples below uncovered some bugs in gperf,
-// in the form of runtime errors when clients made
-// requests on some of the methods, for example
-
-// TAO_Perfect_Hash_Table:find failed
-// Bad operation <ackConfArchData>
-
-
-enum TestEnum
-{
- first,
- second,
- third
-};
-
-interface testlistitem
-{
- readonly attribute string name;
-};
-
-
-interface test
-{
- attribute string stest;
-#ifndef WITHOUT_CORBA_WSTRING
- attribute wstring wstest;
-#else
- attribute string wstest;
-#endif
-#ifndef WITHOUT_CORBA_LONGLONG
- attribute long long ltest;
-#else
- attribute long ltest;
-#endif
-#ifndef WITHOUT_CORBA_LONGDOUBLE
- attribute long double ldtest;
-#else
- attribute double ldtest;
-#endif
- attribute TestEnum etest;
-#ifndef WITHOUT_CORBA_WSTRING
- attribute wstring setest;
-#else
- attribute string setest;
-#endif
- attribute testlistitem tltest;
-
- testlistitem new_testlistitem (in string name);
-};
-
-interface Simple_Server
-{
- oneway void ackConfBasData ();
-
- oneway void ackConfMosData ();
- oneway void ackConfTwmData ();
- oneway void ackConfArchData ();
- oneway void ackConfVonData ();
- oneway void ackConfFftData ();
- oneway void ackConfSosData ();
- oneway void ackConfSscData ();
- oneway void ackConfCsData ();
-
- oneway void ackConfR10Data ();
- oneway void ackConfR11Data ();
- oneway void ackConfR12Data ();
- oneway void ackConfR13Data ();
- oneway void ackConfR14Data ();
- oneway void ackConfR15Data ();
-
- oneway void shutdown ();
-
- oneway void transferTriggerDb ();
- oneway void transferTriggerTdc ();
-};
-
-
diff --git a/TAO/tests/IDL_Test/included.idl b/TAO/tests/IDL_Test/included.idl
deleted file mode 100644
index a8da94acedc..00000000000
--- a/TAO/tests/IDL_Test/included.idl
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// included.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-#ifndef IDL_TEST_INCLUDED_IDL
-#define IDL_TEST_INCLUDED_IDL
-
-// Included in IDL file 'including.idl'.
-module Aok
-{
- typedef sequence<double> Seq1Type;
- typedef long Me;
-};
-
-enum Agog
-{
- Agog1,
- Agog2,
- Agog3
-};
-
-// This valuetype is used in a sequence in the including file,
-// and tests that Value_VarOut_T.h is included early enough.
-module VT_Def
-{
- valuetype VT {};
-};
-
-#endif /* IDL_TEST_INCLUDED_IDL */
diff --git a/TAO/tests/IDL_Test/including.idl b/TAO/tests/IDL_Test/including.idl
deleted file mode 100644
index 431f8903c9c..00000000000
--- a/TAO/tests/IDL_Test/including.idl
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// including.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-#ifndef IDL_TEST_INCLUDING_IDL
-#define IDL_TEST_INCLUDING_IDL
-
-#include "included.idl"
-
-enum choice
-{
- dog
-};
-
-union myUnion switch (choice)
-{
- // Typedef is in included file
- case dog: Aok::Seq1Type cat;
-};
-
-// Enum discriminator is in included file
-union Bog switch (Agog)
-{
- case Agog1: long bog1;
- case Agog2: long bog2;
- case Agog3: long bog3;
-};
-
-// We had a name clash with Me and ME, but the
-// rule that requires type defined in a scope
-// which is defined in an interface to be
-// added to the referenced types in the interface's
-// scope doesn't apply here, because Me is not
-// defined in the struct, only referenced.
-interface iface
-{
- enum postal
- {
- ME,
- TAO_FE // FE is #defined on HP-UX 10.20, so I prefix it with TAO
- };
-
- struct using_incl
- {
- Aok::Me field1;
- };
-};
-
-module VT_Test
-{
- typedef sequence<VT_Def::VT> VTSeq;
-};
-
-#endif /* IDL_TEST_INCLUDING_IDL */
-
diff --git a/TAO/tests/IDL_Test/interface.idl b/TAO/tests/IDL_Test/interface.idl
deleted file mode 100644
index 966a1fd80b9..00000000000
--- a/TAO/tests/IDL_Test/interface.idl
+++ /dev/null
@@ -1,193 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// interface.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-
-
-// Used to be a problem in the get() and set()
-// generated code.
-
-interface Base
-{
- attribute long value;
-};
-
-interface Derived : Base
-{
-};
-
-// The fact that the interface begins with 'foo' was causing
-// problems. The IDL compiler thought the interface was in
-// foo's scope.
-module foo_mod
-{
- struct date
- {
- short month;
- };
-};
-
-interface foostep
-{
- foo_mod::date getDate ();
-};
-
-// Only operations or attributes should cause a clash
-// in this type of situation.
-interface mother
-{
- struct member
- {
- long val;
- };
-};
-
-interface father
-{
- struct member
- {
- short ident;
- };
-};
-
-interface child : mother, father
-{
-};
-
-interface try
-{
-};
-
-// Definition below in file.
-interface later;
-
-typedef boolean Bool;
-
-interface later_user
-{
- later op (in later inarg,
- inout later inoutarg,
- out later outarg);
-
-
- // Not a clash with the C++ keyword because they are case sensitive,
- // but the Arg_Traits<> specialization parameter (ACE_InputCDR::to_boolean)
- // needs the unaliased type name to work.
- void op2 (in Bool inarg2);
-};
-
-struct later_holder
-{
- later member;
-};
-
-interface later {};
-
-// Previously, we could have found v if it
-// was inherited into Client, but not in
-// the case below, where it is inherited into
-// somewhere other than the scope where the
-// lookup starts.
-
-interface Begin
-{
- typedef long Value;
-};
-
-interface Middle : Begin
-{
-};
-
-interface End : Middle
-{
-};
-
-interface Client
-{
- attribute End::Value v;
-};
-
-// Tests arg_traits visitor for unaliased bounded (w)string
-// attributes.
-interface AttributeTester
-{
- attribute string a_su;
- attribute string<1> a_sb;
-};
-
-// All of the 'recursion' below is legal.
-module ParamMod
-{
- interface ParameterTester
- {
- exception object_excep_type
- {
- ParameterTester objref;
- };
-
- typedef sequence<ParameterTester> object_seq_type;
-
- typedef ParameterTester object_array_type[5];
-
- struct object_struct_type
- {
- octet o1;
- ParameterTester p1;
- long l1;
- };
-
- union object_union_type switch (long)
- {
- case 0: string str;
- case 1: ParameterTester pt;
- };
-
- object_seq_type parameter_tester_op (
- in object_struct_type inarg,
- inout object_array_type inoutarg,
- out object_union_type outarg
- )
- raises (object_excep_type);
- };
-};
-
-local interface testlocal
-{
-};
-
-interface A {
- union U switch(boolean)
- {
- case TRUE: A aa;
- };
-};
-
-module M
-{
- interface A;
-};
-
-module M
-{
- interface A;
-
- interface A {};
-};
-
diff --git a/TAO/tests/IDL_Test/keywords.idl b/TAO/tests/IDL_Test/keywords.idl
deleted file mode 100644
index f09b93ed87b..00000000000
--- a/TAO/tests/IDL_Test/keywords.idl
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// keywords.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// All these identifiers should be accepted, but
-// prepended with _cxx_.
-
-// 'private' and 'public' have been commented out because they are now, in
-// addition to being C++ keywords, IDL keywords, and thus are illegal
-// except when used as such.
-
-struct Keywords
-{
- unsigned short or;
- char or_eq;
-// octet private;
- boolean protected;
-// float public;
- double int;
-};
-
-interface Testing
-{
- void foo (in string namespace);
-};
-
diff --git a/TAO/tests/IDL_Test/main.cpp b/TAO/tests/IDL_Test/main.cpp
deleted file mode 100644
index 2c39344eabf..00000000000
--- a/TAO/tests/IDL_Test/main.cpp
+++ /dev/null
@@ -1,369 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// main.cpp
-//
-// = DESCRIPTION
-// The only things that needs to be tested in execution
-// are the pragma prefixes generated in pragma.idl, so
-// we check them here. The rest needs only to build cleanly
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "pragmaS.h"
-#include "unionC.h"
-#include "repo_id_modC.h"
-
-#include "nested_scopeS.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-#include "tao/AnyTypeCode/Any.h"
-
-class hello_i : public virtual POA_hello
-{
-};
-
-class goodbye_i : public virtual POA_goodbye
-{
-};
-
-class sayonara_i : public virtual POA_salutation::sayonara
-{
-};
-
-class ciao_i : public virtual POA_ciao
-{
-};
-
-class aloha_i : public virtual POA_aloha
-{
-};
-
-class schmooze_i : public virtual gleep::schmooze
-{
-};
-
-class schmeer_i : public virtual gleep::schmeer
-{
-};
-
-class schlemiel_i : public virtual gleep::schlemiel
-{
-};
-
-class spilkis_i : public virtual gleep::spilkis
-{
-};
-
-class schmuck_i : public virtual gleep::floop::schmuck
-{
-};
-
-class schmendrick_i : public virtual gleep::floop::schmendrick
-{
-};
-
-class schlemazel_i : public virtual gleep::floop::verklempt::schlemazel
-{
-};
-
-class schmegegging_i : public virtual gleep::schmegegging
-{
-};
-
-struct something_handler : public POA_bug_1985_c::d::AMI_somethingHandler
-{
-};
-
-int
-main (int argc , char *argv[])
-{
- int error_count = 0;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test of #pragma prefix behavior.
-
- CORBA::Object_var obj;
-
- hello_i h;
- obj = h._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (obj->_interface_repository_id (),
- "IDL:anvil.com/hello:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'hello'\n"));
- }
-
- goodbye_i g;
- obj = g._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (obj->_interface_repository_id (),
- "IDL:anvil.com/goodbye:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'goodbye'\n"));
- }
-
- sayonara_i s;
- obj = s._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (obj->_interface_repository_id (),
- "IDL:hammer.com/salutation/sayonara:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'sayonara'\n"));
- }
-
- ciao_i c;
- obj = c._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (obj->_interface_repository_id (),
- "IDL:anvil.com/ciao:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'ciao'\n"));
- }
-
- aloha_i a;
- obj = a._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (obj->_interface_repository_id (),
- "IDL:anvil.com/aloha:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'aloha'\n"));
- }
-
- // Test of typeprefix, typeid, and #pragma version behavior.
-
- schmooze_i s_schmooze;
-
- if (ACE_OS::strcmp (s_schmooze._interface_repository_id (),
- "IDL:gleep_prefix/gleep/schmooze:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'schmooze'\n"));
- }
-
- schmeer_i s_schmeer;
-
- if (ACE_OS::strcmp (s_schmeer._interface_repository_id (),
- "IDL:gleep_prefix/gleep/schmeer:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'schmeer'\n"));
- }
-
- schlemiel_i s_schlemiel;
-
- if (ACE_OS::strcmp (s_schlemiel._interface_repository_id (),
- "IDL:gleep_prefix/gleep/schlemiel:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'schlemiel'\n"));
- }
-
- spilkis_i s_spilkis;
-
- if (ACE_OS::strcmp (s_spilkis._interface_repository_id (),
- "IDL:gleep_prefix/gleep/spilkis:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'spilkis'\n"));
- }
-
- schmuck_i s_schmuck;
-
- if (ACE_OS::strcmp (s_schmuck._interface_repository_id (),
- "ABRA:cadabra/hocus/pocus:1.23"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'schmuck'\n"));
- }
-
- schmendrick_i s_schmendrick;
-
- if (ACE_OS::strcmp (s_schmendrick._interface_repository_id (),
- "IDL:floop_prefix/gleep/floop/schmendrick:524.23"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'schmendrick'\n"));
- }
-
- schlemazel_i s_schlemazel;
-
- if (ACE_OS::strcmp (
- s_schlemazel._interface_repository_id (),
- "IDL:verklempt_prefix/gleep/floop/verklempt/schlemazel:1.0"
- ))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'schlemazel'\n"));
- }
-
- schmegegging_i s_schmegegging;
-
- if (ACE_OS::strcmp (s_schmegegging._interface_repository_id (),
- "IDL:gleep_prefix/gleep/schmegegging:1.0"))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "pragma prefix error in object 'schmegegging'\n"));
- }
-
- {
- something_handler x;
- char const * base[] =
- {
- "IDL:bug_1985_c/d/AMI_somethingHandler:1.0",
- "IDL:bug_1985_a/b/AMI_somethingHandler:1.0",
- "IDL:omg.org/Messaging/ReplyHandler:1.0",
- "IDL:omg.org/CORBA/Object:1.0"
- };
-
- for (int i = 0; i != sizeof (base)/sizeof (base[0]); ++i)
- {
- if (!x._is_a (base[i]))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "something_handler::_is_a should return true for %s\n",
- base[i]));
- }
- }
-
- if (!dynamic_cast<POA_bug_1985_c::d::AMI_somethingHandler*> (&x))
- {
- ++error_count;
- ACE_DEBUG( (LM_DEBUG,
- "mismatch in downcast for %s\n",
- base[0]));
- }
-
- if (!dynamic_cast<POA_bug_1985_a::b::AMI_somethingHandler*> (&x))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "mismatch in downcast for %s\n",
- base[1]));
- }
-
- if (!dynamic_cast<POA_Messaging::ReplyHandler*> (&x))
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "mismatch in downcast for %s\n",
- base[2]));
- }
- }
-
- // Testing (de)marshaling of IDL union values
- // under duplicate and default case labels.
-
- Field field;
- field.value.strValue (
- CORBA::string_dup ("duplicate case label test string")
- );
- field.value._d (FTYPE_VARCHAR);
- CORBA::Any any1;
- any1 <<= field;
- Field *outfield;
-
- if ((any1 >>= outfield) == 0)
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "error in extraction of "
- "duplicate case label value\n"));
- }
-
- const char *str = outfield->value.strValue ();
-
- if (ACE_OS::strcmp (str, "duplicate case label test string") != 0)
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "error - corruption of "
- "duplicate case label value\n"));
- }
-
- field.value.defstr (CORBA::string_dup ("default case test string"));
- any1 <<= field;
-
- if ((any1 >>= outfield) == 0)
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "error in extraction of "
- "default case label value\n"));
- }
-
- str = outfield->value.defstr ();
-
- if (ACE_OS::strcmp (str, "default case test string") != 0)
- {
- ++error_count;
- ACE_DEBUG ((LM_DEBUG,
- "error - corruption of "
- "default case label value\n"));
- }
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception in main");
- return 1;
- }
- ACE_ENDTRY;
-
- return error_count;
-}
diff --git a/TAO/tests/IDL_Test/nested_scope.idl b/TAO/tests/IDL_Test/nested_scope.idl
deleted file mode 100644
index d0e3dc6d966..00000000000
--- a/TAO/tests/IDL_Test/nested_scope.idl
+++ /dev/null
@@ -1,192 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// nested_scope.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// Tests all the problem datatypes for repeating a scope
-// name after skipping one nesting level.
-
-module skip
-{
- module hump
- {
- struct skip {short s;};
- };
-};
-
-module u_skip
-{
- module u_hump
- {
- union u_skip switch (short)
- {
- case 0: short s;
- };
- };
-};
-
-module e_skip
-{
- module e_hump
- {
- exception e_skip {};
- };
-};
-
-module i_skip
-{
- module i_hump
- {
- interface i_skip {};
- };
-};
-
-module pre_u_skip
-{
- module pre_u_hump
- {
- typedef sequence<long> pre_u_skip;
- };
-};
-
-module pre_b_skip
-{
- module pre_b_hump
- {
- typedef sequence<long, 3> pre_b_skip;
- };
-};
-
-module str_u_skip
-{
- module str_u_hump
- {
- typedef sequence<string> str_u_skip;
- };
-};
-
-module str_b_skip
-{
- module str_b_hump
- {
- typedef sequence<string, 3> str_b_skip;
- };
-};
-
-module wstr_u_skip
-{
- module wstr_u_hump
- {
- typedef sequence<wstring> wstr_u_skip;
- };
-};
-
-module wstr_b_skip
-{
- module wstr_b_hump
- {
- typedef sequence<wstring, 3> wstr_b_skip;
- };
-};
-
-interface bloo {};
-
-module obj_u_skip
-{
- module obj_u_hump
- {
- typedef sequence<bloo> obj_u_skip;
- };
-};
-
-module obj_b_skip
-{
- module obj_b_hump
- {
- typedef sequence<bloo> obj_b_skip;
- };
-};
-
-module bug_1985_a
-{
- module b
- {
- interface something {};
- };
-};
-
-module bug_1985_c
-{
- module d
- {
- interface something : bug_1985_a::b::something {};
- };
-};
-
-// This one caused several problems - in the stub declaration of
-// the operation, and in the skeleton body's allocation of return type.
-module Negotiator
-{
- interface UAV_Negotiator {};
-
- interface UAV_Negotiator_Factory : ::Negotiator::UAV_Negotiator
- {
- ::Negotiator::UAV_Negotiator make_negotiator (in string bitrate_sc);
- };
-};
-
-// Caught some generation of arg helper template parameters not using
-// the qualifying '::' on scoped names.
-
-module bug_2125
-{
- module Bar
- {
- enum Stuff {ONE, TWO};
- };
-};
-
-module Wow
-{
- module bug_2125
- {
- interface MyInterface
- {
- void op1 (in bug_2125::Bar::Stuff fbs);
- void op2 (in ::bug_2125::Bar::Stuff fbs);
- };
- };
-};
-
-// This will ensure that we always put the '::'
-// before the 'CORBA' on predefined types.
-module Company
-{
- module CORBA
- {
- module Inner
- {
- struct Foo
- {
- boolean x;
- };
- };
- };
-};
-
diff --git a/TAO/tests/IDL_Test/params.idl b/TAO/tests/IDL_Test/params.idl
deleted file mode 100644
index 950c5472060..00000000000
--- a/TAO/tests/IDL_Test/params.idl
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// params.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// Compiling the generated code for the parameters of
-// getDate taught us to use the ACE_NESTED_CLASS macro
-// more judiciously in the header file. This file was
-// also initially a problem for lookups as well.
-
-module foo
-{
- struct theDate
- {
- short year;
- short month;
- short day;
- };
-
- module bar
- {
- struct theDate
- {
- short x;
- };
-
- interface fooBar
- {
- foo::theDate getDate (in foo::theDate a,
- inout foo::theDate b,
- out foo::theDate c);
- };
- };
-};
-
diff --git a/TAO/tests/IDL_Test/pragma.idl b/TAO/tests/IDL_Test/pragma.idl
deleted file mode 100644
index 561575695e1..00000000000
--- a/TAO/tests/IDL_Test/pragma.idl
+++ /dev/null
@@ -1,62 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// pragma.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-#pragma prefix "anvil.com"
-
-interface hello {};
-
-// These declarations all at one time caused the prefix above
-// to be dropped.
-
-typedef string FuBar;
-
-enum ClusterFu
- {
- CHAOS,
- MAYHEM
- };
-
-interface aloha;
-
-const long GangBa = -278;
-
-exception Riot {};
-
-interface goodbye {};
-
-module A
-{
- exception my_exception {};
-};
-
-module salutation
-{
-// This prefix applies only in this module
-# pragma prefix "hammer.com"
-
- interface sayonara {};
-};
-
-// 'anvil.com' returns
-interface ciao {};
-
-interface aloha {};
-
diff --git a/TAO/tests/IDL_Test/reopen_include1.idl b/TAO/tests/IDL_Test/reopen_include1.idl
deleted file mode 100644
index a0770bcc4de..00000000000
--- a/TAO/tests/IDL_Test/reopen_include1.idl
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// reopen_include1.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-#ifndef IDL_TEST_REOPEN_INCLUDE1_IDL
-#define IDL_TEST_REOPEN_INCLUDE1_IDL
-
-// First opening of a module included by a chain of
-// inclusions into reopened_modules.idl
-module frag
-{
- typedef sequence<double> dub_seq;
-};
-
-// These are in each file in the reopened_modules chain,
-// and in reopened_modules.idl, test interface parent lookup.
-module A
-{
- module B
- {
- interface X1
- {
- string getX1 ();
- };
- };
-};
-
-#endif /* IDL_TEST_REOPEN_INCLUDE1_IDL */
diff --git a/TAO/tests/IDL_Test/reopen_include2.idl b/TAO/tests/IDL_Test/reopen_include2.idl
deleted file mode 100644
index 19db6d6ff3a..00000000000
--- a/TAO/tests/IDL_Test/reopen_include2.idl
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// reopen_include2.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-#ifndef IDL_TEST_REOPEN_INCLUDE2_IDL
-#define IDL_TEST_REOPEN_INCLUDE2_IDL
-
-#include "reopen_include1.idl"
-
-// #included by reopened modules.idl along with
-// same module in reopen_include1.idl.
-module frag
-{
- struct pug {short leash;};
-};
-
-// These three are reopened in reopened_modules.idl.
-module XX
-{
- typedef long whah;
-};
-
-module A
-{
- module B
- {
- interface X2
- {
- string getX2 ();
- };
- };
-};
-
-#endif /* IDL_TEST_REOPEN_INCLUDE2_IDL */
diff --git a/TAO/tests/IDL_Test/reopened_modules.idl b/TAO/tests/IDL_Test/reopened_modules.idl
deleted file mode 100644
index 666e8116dcd..00000000000
--- a/TAO/tests/IDL_Test/reopened_modules.idl
+++ /dev/null
@@ -1,314 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// reopened_modules.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-// These examples test the lookup abilities of the
-// TAO IDL compiler, with reopened modules.
-
-// Tests lookup function when modules are reopened by
-// a chain of inclusions.
-#include "reopen_include2.idl"
-
-module AA
-{
- module BB
- {
- interface x1 {};
- };
-};
-
-module AA
-{
- module BB
- {
- module CC
- {
- interface x2
- {
- // 'A::B::' should be implicit
- void op1 (in x1 obj);
- // 'A::' should be implicit
- void op2 (in BB::x1 obj);
- // Just for reference
- void op3 (in AA::BB::x1 obj);
- };
- };
- };
-};
-
-// Each occurrence of Party and Person should be
-// recognized as being in the same scope as the
-// previous occurrence(s).
-
-module dot
-{
- interface Party;
-
- interface Person
- {
- attribute Party someParty;
- };
-};
-
-module dot
-{
- interface Party
- {
- attribute Person somePerson;
- };
-};
-
-// Should be no problem in lookup of all the
-// arguments in Operation.
-
-module Outside
-{
- module Reopened
- {
- typedef short Tricky;
- };
-
- typedef long Tricky;
-
- module Reopened
- {
- typedef float Newdef;
- };
-};
-
-interface OpHolder
- {
-
- void Operation (in ::Outside::Tricky p1,
- out ::Outside::Reopened::Tricky p2,
- inout ::Outside::Reopened::Newdef p3);
- };
-
-// This particular combination used to cause IDL compiler
-// to go into an infinite loop looking for return type to
-// getInfo(). Partial solution got rid of infinite loop,
-// but erroneously returned ::com from lookup.
-
-module com
-{
- module mr
- {
- typedef short info;
- };
-};
-
-module com
-{
- interface IFace
- {
- com::mr::info getInfo ();
- };
-};
-
-// Modules X and Y are also included from reopene_include2.idl.
-// There were problems with the lookup of Y::Z and X::Ex.
-
-module Y
-{
- interface Z {};
-};
-
-module X
-{
- exception Ex {};
-
- interface BI : Y::Z
- {
- void method () raises (X::Ex);
- };
-};
-
-// Reopened from reopen_include2.idl inclusion. There
-// was a problem with the inheritance lookup.
-
-module XX
-{
- interface blah_intfc;
-
- interface blah_intfc
- {
- void op1 ();
- };
-
- interface blah0 : blah_intfc
- {
- void op0 ();
- };
-};
-
-// Had lookup problems with the operation args and
-// return type.
-
-module frag
-{
- interface frag_iface {};
-};
-
-module frag
-{
- typedef long ret_long;
-};
-
-interface gather
-{
- frag::ret_long op (in frag::dub_seq inarg,
- inout frag::pug inoutarg,
- out frag::frag_iface outarg);
-};
-
-// Had problems with second opening of module using
-// types declared between the openings.
-
-module foo
-{
- typedef long longdef;
-};
-
-typedef long longdef2;
-
-struct bar {short s;};
-
-module foo
-{
- struct foo_struct
- {
- longdef longval;
- longdef2 longval2;
- };
-
- interface obj
- {
- void op (in bar inarg);
- };
-};
-
-module A
-{
- module B
- {
- typedef sequence<X2> X2Seq;
-
- interface X3 : X1, X2
- {
- X2Seq getSeqOfX2 ();
- string getX3 ();
- };
- };
-};
-
-// Interface B was not getting redefined, so
-// definition of C would cause an error.
-
-module mB
-{
- interface B;
-};
-
-module mA
-{
- interface A
- {
- attribute ::mB::B theB;
- };
-};
-
-module mB
-{
- interface B : ::mA::A
- {
- attribute ::mA::A theA;
- };
-};
-
-module mC
-{
- interface C : ::mB::B
- {
- };
-};
-
-// The example below uncovered errors in the logic of
-// AST_Module::fe_add_interface_fwd() and
-// AST_Module::add_to_previous() that were causing
-// AST_Module::look_in_previous() (and thus lookup_by_name)
-// to fail on the last line.
-module Schmoik
-{
- interface foo
- {
- typedef string foo_type;
- };
-};
-
-module Schmoik
-{
- interface foo;
-};
-
-module Schmoik
-{
- struct bar
- {
- foo::foo_type member;
- };
-};
-
-// Tests forward declared interface as element type.
-// Had to override visit_interface_fwd()
-// for the be_visitor_sequence_base_template_args
-// visitor to fix this. Also had to separate calls
-// to nested_type_name() into individual insertions
-// into the code generating stream, because of side
-// effects.
-module Thwoik
-{
- interface TestType;
-};
-
-module Thwoik
-{
- typedef sequence<TestType> ub_TestTypeSeq;
- typedef sequence<TestType, 3> bd_TestTypeSeq;
-};
-
-module Thwoik
-{
- interface TestType {};
-};
-
-// We had a problem with the inheritance list
-// in the declaration of A_mod::B_mod::Foo, in
-// both stub and skeleton files.
-module A_mod
-{
- interface Foo {};
-
- module B_mod
- {
- interface Foo : A_mod::Foo {};
- };
-};
-
-
diff --git a/TAO/tests/IDL_Test/repo_id_mod.idl b/TAO/tests/IDL_Test/repo_id_mod.idl
deleted file mode 100644
index 1f22fc9da96..00000000000
--- a/TAO/tests/IDL_Test/repo_id_mod.idl
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// repo_id_mod.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-module gleep
-{
- local interface schmooze {};
-};
-
-module gleep
-{
- local interface schmeer {};
-};
-
-module gleep
-{
- local interface schlemiel {};
-
- // This should propagate to all previous and subsequent
- // openings of this module.
- typeprefix gleep "gleep_prefix";
-};
-
-module gleep
-{
- local interface spilkis {};
-
- module floop
- {
- local interface schmuck {};
- local interface schmendrick;
-
-// Tests the handling of extra whitespace as well as the version setting.
-# pragma version gleep::floop::schmendrick 524.23
- local interface schmendrick {};
-
- module verklempt
- {
- local interface schlemazel {};
-
- // This will override the prefix directive for module floop at the end
- // of the file.
- typeprefix floop::verklempt "verklempt_prefix";
- };
- };
-
- local interface schmegegging {};
-};
-
-// This should override any existing prefix and disable any subsequent
-// attempts to set it, such as in the directive below.
-typeid gleep::floop::schmuck "ABRA:cadabra/hocus/pocus:1.23";
-
-// This will affect everything in floop's scope recursively, except items
-// which have a prefix that was applied to a narrower scope.
-typeprefix ::gleep::floop "floop_prefix";
-
diff --git a/TAO/tests/IDL_Test/run_test.pl b/TAO/tests/IDL_Test/run_test.pl
deleted file mode 100755
index 09a7de77eee..00000000000
--- a/TAO/tests/IDL_Test/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("main");
-}
-else {
- $T = new PerlACE::Process ("main");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/IDL_Test/sequence.idl b/TAO/tests/IDL_Test/sequence.idl
deleted file mode 100644
index 9c3b32da80e..00000000000
--- a/TAO/tests/IDL_Test/sequence.idl
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// sequence.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-#include "tao/OctetSeq.pidl"
-
-// This will produce a link error if a handcraft we have added to
-// tao/OctetSeqC.h is ever removed.
-typedef sequence<CORBA::OctetSeq> OctetSeqSeq;
-
-// Bounded string elements of a sequence,
-// require the use of CORBA_Any::to_char.
-
-interface seqTest
-{
- typedef sequence< string<12> > dozens;
-
- void send_dozen (inout dozens bouquets);
-};
-
-local interface seqLocal
-{
-};
-
-typedef sequence<seqLocal> seqLocalSeq;
-
-// Anonymous sequence members must be unique types even if the
-// sequence itself is not, so the member name has been
-// incorported into the sequence class name. #if !defined guards
-// are generated around code for the inner anonymous sequences.
-struct twinStruct
- {
- sequence<sequence<short> > and_;
- sequence<sequence<short> > or_;
- };
-
-// Nested sequences
-typedef sequence<sequence<short, 5> > outside;
-
-struct nestedSeqStruct
-{
- sequence<sequence<outside>, 7> inside;
-};
-
-// Tests deeply nested recursive type.
-module Deployment
-{
- struct ComponentPackageDescription;
-
- typedef sequence < ComponentPackageDescription > ComponentPackageDescriptions;
-
- struct ComponentAssemblyDescription {
- ComponentPackageDescriptions instance;
- };
-
- typedef sequence < ComponentAssemblyDescription > ComponentAssemblyDescriptions;
-
- struct NamedImplementationArtifact;
-
- typedef sequence < NamedImplementationArtifact > NamedImplementationArtifacts;
-
- struct NamedImplementationArtifact {
- string str;
- NamedImplementationArtifacts dependsOn;
- };
-
- struct MonolithicImplementationDescription {
- NamedImplementationArtifacts primaryArtifact;
- };
-
- typedef sequence < MonolithicImplementationDescription > MonolithicImplementationDescriptions;
-
- struct PackagedComponentImplementation {
- ComponentAssemblyDescriptions assemblyImpl;
- MonolithicImplementationDescriptions monolithicImpl;
- };
-
- typedef sequence < PackagedComponentImplementation > PackagedComponentImplementations;
-
- struct ComponentPackageDescription {
- string str;
- PackagedComponentImplementations implementation;
- };
-};
-
diff --git a/TAO/tests/IDL_Test/typedef.idl b/TAO/tests/IDL_Test/typedef.idl
deleted file mode 100644
index 95efd07bc91..00000000000
--- a/TAO/tests/IDL_Test/typedef.idl
+++ /dev/null
@@ -1,118 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// typedef.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-
-// Must keep unaliasing until all levels of typedef
-// are removed.
-
-// This is also a test of arrays of arrays. Once
-// upon a time, the generated CDR operators of such
-// animals wouldn't compile on all platforms.
-
-typedef char TAO_A5[5];
-
-typedef TAO_A5 TAO_C5;
-
-typedef TAO_C5 TAO_G5;
-
-typedef TAO_G5 TAO_J5;
-
-typedef TAO_J5 TAO_M5[5];
-
-typedef TAO_M5 TAO_R5;
-
-typedef TAO_R5 TAO_V5;
-
-typedef TAO_V5 TAO_Z5[5];
-
-// Need to make sure that the arg traits specializations for each
-// typedef has a unique #ifndef guard.
-module TestModule
-{
- typedef string<32> typedef_1;
- typedef string<32> typedef_2;
-
- interface TestInterface
- {
- void set_typedef_1 (in TestModule::typedef_1 typ1);
- void set_typedef_2 (in TestModule::typedef_2 typ2);
- };
-};
-
-// Caught failure of arg traits generation for the 2nd typedef.
-module bug_2124
-{
- typedef string<10> MyString;
- typedef MyString OtherString;
-
- interface Foo
- {
- void op1 (in MyString s);
- void op2 (in OtherString s);
- };
-};
-
-// Caught a case where the #ifdef guards were different, but the
-// generated string typename was the same.
-module bug_2122
-{
- module One
- {
- typedef string<40> MyString;
-
- interface Whatever
- {
- void someOp (in MyString s);
- };
- };
-
- module Two
- {
- typedef string<100> MyString; // Same name, different size!
-
- interface WhoCares
- {
- void someOp (in MyString s);
- };
- };
-
- module Three
- {
- typedef string<100> MyString; // Same name, same size!
-
- interface WhoCares
- {
- void someOp (in MyString s);
- };
- };
-};
-
-// An anonymous string of the same bound will be found in
-// another IDL file not included in this one (anonymous.idl).
-// The typecode for the anonymous string should not give us
-// 'already found' link errors.
-module First
-{
- typedef string<32> FirstString;
-};
-
-
-
diff --git a/TAO/tests/IDL_Test/typeprefix.idl b/TAO/tests/IDL_Test/typeprefix.idl
deleted file mode 100644
index 67e4d1ac709..00000000000
--- a/TAO/tests/IDL_Test/typeprefix.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-// $Id$
-
-// Test a construct with typeprefix which failed when TAO_IDL was build
-// with Intel C++ or Sun C++
-
-module A
-{
- typeprefix A "TAO";
- interface B {};
- interface C{
- void op (in B a);
- };
-};
-/*
-module A
-{
- typeprefix A "TAO";
- interface B{};
-};*/
-
diff --git a/TAO/tests/IDL_Test/union.idl b/TAO/tests/IDL_Test/union.idl
deleted file mode 100644
index 30064ac3360..00000000000
--- a/TAO/tests/IDL_Test/union.idl
+++ /dev/null
@@ -1,271 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// union.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
-//
-// ============================================================================
-
-
-// Implicit default case
-
-enum DataType
-{
- dtEmpty,
- dtLong,
- dtShort
-};
-
-union Data switch (DataType)
-{
- case dtLong: long longData;
- case dtShort: short shortData;
- // by default, empty union
-};
-
-// Explicit default case
-
-module Necessary
-{
- // It is important to have a module, in which
- // the following union is declared.
-
- typedef long Result;
-
- enum Kind
- {
- e_Result,
- e_Unused
- };
-
- union WhichResult switch (Kind )
- {
- case e_Result: Result m_Result;
- default: long m_Unused;
- };
-};
-
-// Make sure that CORBA_Any::to_* is used everywhere.
-module UnionDiscTest
- {
- union BooleanUnion switch (boolean)
- {
- case TRUE: string value;
- };
-
- union CharUnion switch (char)
- {
- case 'a': string value;
- };
- };
-
-
-// Nested unions
-
-enum disc1
-{
- one,
- two
-};
-
-enum disc2
-{
- a,
- b
-};
-
-enum disc_outer
-{
- out1,
- out2
-};
-
-union inner1 switch (disc1)
-{
- case one: short s;
- case two: long l;
-};
-
-union inner2 switch (disc2)
-{
- case a: char c;
- case b: long lng;
-};
-
-union outer switch (disc_outer)
-{
- case out1: inner1 first;
- case out2: inner2 second;
-};
-
-module UnionTest3
-{
- enum ValChoice
- {
- intVal,
- realVal
- };
-
- union ValType switch(ValChoice)
- {
- case intVal: long integerValue;
- case realVal: double realValue;
- };
-
- struct UpType
- {
- ValType high;
- ValType low;
- };
-
- struct DownType
- {
- ValType high;
- ValType low;
- };
-
- enum IndChoice
- {
- up_Level,
- down_Level
- };
-
- union IndType switch(IndChoice)
- {
- case up_Level: UpType up;
- case down_Level: DownType down;
- };
-};
-
-// Make sure inner union is generated in header file with
-// proper scoping (or lack thereof) in its name, depending
-// on the platform.
-enum XType
-{
- X_A
-};
-
-enum ZType
-{
- Z_A
-};
-
-union X switch (XType)
-{
- case X_A:
- struct Y
- {
- union Z switch (ZType)
- {
- case Z_A: long a;
- } u;
- } a;
-};
-
-// Example involving union members with multiple case labels.
-enum FieldType
-{
- FTYPE_CHAR,
- FTYPE_VARCHAR,
- FTYPE_DEFCHAR
-};
-
-union FieldValue switch (FieldType)
-{
- case FTYPE_CHAR:
- case FTYPE_VARCHAR:
- string strValue;
- default:
- string defstr;
-};
-
-
-struct Field
-{
- FieldValue value;
-};
-
-// Tricky case of lookup for a recursive union. When defined
-// inside another datatype like this, the union is referenced
-// inside itself before the closing brace is seen, but not
-// declared yet.
-struct Element
-{
- union ValueUnion switch (short)
- {
- case 0:
- long lvalue;
- case 1:
- sequence<ValueUnion> VUValue;
- } Value;
-};
-
-// A fix to the IDL compiler's typecoce generation created
-// a problem with unions that have more than one member,
-// where any member except the last is itself a scoped type.
-// This is the simplest example that will reproduce the problem,
-// if it ever reappears.
-enum TestOneEnum
-{
- TALL,
- SCHORT
-};
-
-enum TestTwoEnum
-{
- LIGHT,
- DARK
-};
-
-union TestUnion switch (short)
-{
- case 1: TestOneEnum oneEnum;
- case 2: TestTwoEnum twoEnum;
-};
-
-// Test for various kinds of declarations inside a union,
-// similar to the example in enum_in_struct.idl.
-
-union decl_heavy_union switch (short)
-{
- case 1:
- enum which
- {
- ZERO,
- ONE,
- TWO
- } m_which;
- case 2:
- enum en
- {
- a,
- b,
- c
- } m_en_arr[10];
- case 3:
- struct st
- {
- long a;
- char b;
- } m_st_arr[10];
- case 4:
- union un switch (long)
- {
- case 1: long a;
- case 2: char b;
- } m_un_arr[10];
-};
-
diff --git a/TAO/tests/IDL_Test/valuetype.idl b/TAO/tests/IDL_Test/valuetype.idl
deleted file mode 100644
index eb594ec23cf..00000000000
--- a/TAO/tests/IDL_Test/valuetype.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/IDL_Test
-//
-// = FILENAME
-// valuetype.idl
-//
-// = DESCRIPTION
-// This file contains examples of IDL code that has
-// caused problems in the past for the TAO IDL
-// compiler. This test is to make sure the problems
-// stay fixed.
-//
-// = AUTHORS
-// Gary Duzan <gduzan@bbn.com>
-// Jeff Parsons <j.parsons@vanderbilt.edu>
-//
-// ============================================================================
-
-// A valuetype factory can have exceptions, so the declaration must pull in
-// an #include of SystemException.h.
-valuetype MyValueType
-{
- public string my_string_value;
- factory make_one ();
-};
-
-// The original bug was caused by the default factory visitor
-// constructing a temporary arg of this field type. When the
-// arg was then destroyed, it called its base destroyer
-// AST_Field::destroy() which in turn destroyed the member
-// because it was anonymous. This declaration was copied from
-// an unautomated TAO/tests directory and authored by Simon McQueen
-// <sm@prismtechnologies>.
-valuetype RecValueType
-{
- private sequence<RecValueType> rec_value_types;
-};
-
diff --git a/TAO/tests/IORManipulation/.cvsignore b/TAO/tests/IORManipulation/.cvsignore
deleted file mode 100644
index 7fde61cf549..00000000000
--- a/TAO/tests/IORManipulation/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-IORTest
diff --git a/TAO/tests/IORManipulation/IORManipulation.mpc b/TAO/tests/IORManipulation/IORManipulation.mpc
deleted file mode 100644
index cdc8ea5c99f..00000000000
--- a/TAO/tests/IORManipulation/IORManipulation.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*IORTest) : taoexe, iormanip {
- exename = IORTest
-}
diff --git a/TAO/tests/IORManipulation/IORTest.cpp b/TAO/tests/IORManipulation/IORTest.cpp
deleted file mode 100644
index 29313aad9b1..00000000000
--- a/TAO/tests/IORManipulation/IORTest.cpp
+++ /dev/null
@@ -1,324 +0,0 @@
-// $Id$
-
-//========================================================================
-/**
- * @file IORTest.cpp
- *
- * This program tests the basic functionality of the IORManipulation
- * interface.
- *
- * @author Fred Kuhns
- */
-//=========================================================================
-
-
-#include "ace/Log_Msg.h"
-#include "tao/ORB.h"
-#include "tao/Environment.h"
-#include "tao/IORManipulation/IORManip_Loader.h"
-
-
-ACE_RCSID (IORManipluation,
- IORTest,
- "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- // The variable is declared volatile because, some compilers
- // optimizes this the wrong way. A case is point is the CC compiler
- // on IRIX.
- volatile int Status = 0;
-
- ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
- ACE_DEBUG ((LM_DEBUG, "Running the IORManipulation Tests.\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Retrieve the ORB.
- CORBA::ORB_var orb_ = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // **********************************************************************
-
- // Get an object reference for the ORBs IORManipulation object!
- CORBA::Object_var IORM =
- orb_->resolve_initial_references ("IORManipulation"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_IOP::TAO_IOR_Manipulation_var iorm =
- TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // **********************************************************************
-
- // Create a few fictitious IORs
- CORBA::Object_var name1 =
- orb_->string_to_object ("corbaloc:iiop:macarena.cs.wustl.edu:6060/xyz"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Object_var name2 =
- orb_->string_to_object ("corbaloc:iiop:tango.cs.wustl.edu:7070/xyz"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // **********************************************************************
-
- CORBA::String_var name1_ior =
- orb_->object_to_string (name1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "\tFirst made up IOR = %s\n", name1_ior.in ()));
-
- CORBA::String_var name2_ior =
- orb_->object_to_string (name2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "\tSecond made up IOR = %s\n", name2_ior.in ()));
-
- // **********************************************************************
-
- // Create IOR list for use with merge_iors.
- 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 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var merged_ior =
- orb_->object_to_string (merged.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong count1 = iorm->get_profile_count (iors [0] ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong count2 = iorm->get_profile_count (iors [1] ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong count = iorm->get_profile_count (merged.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count != (count1 + count2))
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (merge_profiles): "
- "Merged profile count incorrect!\n"));
-
- ACE_DEBUG ((LM_DEBUG, "\tMerged IOR(%d) = %s\n",
- count,
- merged_ior.in ()));
-
- // is_in_ior throws an exception if the intersection of the two
- // IORs is NULL.
- CORBA::ULong in_count = iorm->is_in_ior (merged.in (),
- name1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count1 != in_count)
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (merge_iors): name1 is_in_ior returned profile "
- "count bad (%d)!\n",
- in_count));
-
- in_count = iorm->is_in_ior (merged.in (),
- name2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count2 != in_count)
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (merge_iors): name2 is_in_ior returned profile "
- "count bad (%d)!\n",
- in_count));
-
- // **********************************************************************
-
- // Verify ability to remove profiles from an IOR
- // First remove the second IOR from the merged IOR
- CORBA::Object_var just1 =
- iorm->remove_profiles (merged.in (), name2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var just1_ior =
- orb_->object_to_string (just1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- count = iorm->get_profile_count (just1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count1 != count)
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (merge_profiles): "
- "removing last IOR after a merge_iors ()\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "\tJust 1 IOR(%d) = %s\n",
- count,
- just1_ior.in ()));
-
- in_count = iorm->is_in_ior (just1.in (), name1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count1 != in_count)
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (merge_profiles): incorrect count returned for "
- "is_in_ior"
- "\nafter removal (%d)\n",
- in_count));
- // **********************************************************************
-
- // Now try the add_profiles interface.
- CORBA::Object_var merged2 =
- iorm->add_profiles (just1.in (), name2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- count = iorm->get_profile_count (merged2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count != (count1 + count2))
- ACE_DEBUG ((LM_ERROR,
- "**ERROR: add_profile failed profile count test!\n"));
-
- CORBA::String_var merged2_ior =
- orb_->object_to_string (merged2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\tAdding 2 back in IOR(%d) = %s\n",
- count,
- merged2_ior.in ()));
-
- // is_in_ior throws an exception if the intersection of the two
- // IORs is NULL.
- in_count = iorm->is_in_ior (merged2.in (), name1. in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count1 != in_count)
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (add_profiles): is_in_ior returned profile "
- "count bad (%d)!\n",
- in_count));
-
- in_count = iorm->is_in_ior (merged2.in (), name2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count2 != in_count)
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (add_profiles): is_in_ior returned "
- "profile count bad!\n"));
-
- // **********************************************************************
-
- CORBA::Object_var just2 =
- iorm->remove_profiles (merged2.in (), name1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var just2_ior =
- orb_->object_to_string (just2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- count = iorm->get_profile_count (just2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count2 != count)
- ACE_DEBUG ((LM_ERROR,
- "ERROR removing last IOR after a merge_iors ()\n"));
-
- ACE_DEBUG ((LM_DEBUG, "\tJust 2 IOR(%d) = %s\n",
- count,
- just2_ior.in ()));
-
- in_count = iorm->is_in_ior (just2.in (), name2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count2 != in_count)
- ACE_DEBUG ((LM_ERROR,
- "**ERROR (add_profiles): incorrect count (%d) "
- "returned for is_in_ior after removal\n",
- in_count));
-
- // all the primary tests worked, set status to 1
- Status = 1;
- // Finally generate an exception and quit.
- // This will generate a NotFound exception.
- in_count = iorm->is_in_ior (just2.in (), name1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCH (TAO_IOP::EmptyProfileList, userex)
- {
- ACE_PRINT_EXCEPTION (userex,
- "Unexpected EmptyProfileList Exception!\n");
- return -1;
- }
- ACE_CATCH (TAO_IOP::NotFound, userex)
- {
- if (Status == 1)
- {
- Status = 2;
-
- // @@ Don't use ACE_PRINT_EXCEPTION here since it will print
- // "EXCEPTION" somewhere in the output which will make
- // our auto-compile/test scripts think that an unexpected
- // exception occurred. Instead, simply print the
- // exception ID.
- // -Ossama
- ACE_DEBUG ((LM_DEBUG,
- "Caught <TAO_IOP::TAO_IOR_Manipulation::NotFound> exception.\n"
- "This exception was expected.\n\n"));
- }
- else
- {
- ACE_PRINT_EXCEPTION (userex,
- "Unexpected NotFound Exception!\n");
- return -1;
- }
- }
- ACE_CATCH (TAO_IOP::Duplicate, userex)
- {
- ACE_PRINT_EXCEPTION (userex,
- "Unexpected Duplicate Exception!\n");
- return -1;
- }
- ACE_CATCH (TAO_IOP::Invalid_IOR, userex)
- {
- ACE_PRINT_EXCEPTION (userex,
- "Unexpected Invalid_IOR Exception!\n");
- return -1;
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex,
- "Unexpected system Exception!!\n");
- return -1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected ACE_CATCHANY Exception!\n");
- return -1;
- }
- ACE_ENDTRY;
-
- if (Status == 1)
- {
- // then exception didn't work!
- ACE_DEBUG ((LM_ERROR,
- "**ERROR: Unable to generate the NotFound exception!\n"));
- Status = 0;
- }
- if (Status == 0)
- ACE_DEBUG ((LM_DEBUG, "An ERROR occured during the tests!\n"));
- else
- ACE_DEBUG ((LM_DEBUG, "IORManipulation Tests Successfully Completed!\n"));
- ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
-
- return 0;
-}
diff --git a/TAO/tests/IORManipulation/README b/TAO/tests/IORManipulation/README
deleted file mode 100644
index 10fb424eccc..00000000000
--- a/TAO/tests/IORManipulation/README
+++ /dev/null
@@ -1,13 +0,0 @@
-This program test the basic operation of TAO's IORManipulation
-interface.
-
-Run the application as follows.
-
-% ./run_test.pl
-
-Comments:
-========
-
-- The various stages of the test are printed out. Each
- generated IOR and all error conditions. Currently
- the NotFound exception is tested for.
diff --git a/TAO/tests/IORManipulation/run_test.pl b/TAO/tests/IORManipulation/run_test.pl
deleted file mode 100755
index dcf092e17cd..00000000000
--- a/TAO/tests/IORManipulation/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("IORTest");
-}
-else {
- $T = new PerlACE::Process ("IORTest");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/IOR_Endpoint_Hostnames.mpc b/TAO/tests/IOR_Endpoint_Hostnames/IOR_Endpoint_Hostnames.mpc
deleted file mode 100644
index 5df1c80b09f..00000000000
--- a/TAO/tests/IOR_Endpoint_Hostnames/IOR_Endpoint_Hostnames.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// What I'd really like to have is a separate project
-// that is a library for the CORBA Object.
-//
-// $Id$
-
-project(list_interfaces) : aceexe {
- Source_Files {
- list_interfaces.cpp
- }
-}
-
-project(generate_ior) : taoserver {
- exename = generate_ior
- Source_Files {
- generate_ior.cpp
- bogus_i.cpp
- }
-}
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/bogus.idl b/TAO/tests/IOR_Endpoint_Hostnames/bogus.idl
deleted file mode 100644
index 48c3ef6ef34..00000000000
--- a/TAO/tests/IOR_Endpoint_Hostnames/bogus.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- interface bogus
- {
- void noop();
- };
-};
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/bogus_i.cpp b/TAO/tests/IOR_Endpoint_Hostnames/bogus_i.cpp
deleted file mode 100644
index 7e876ea57c8..00000000000
--- a/TAO/tests/IOR_Endpoint_Hostnames/bogus_i.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// $Id$
-
-#include "bogus_i.h"
-
-ACE_RCSID (IOR_Endpoint_Hostnames, bogus_i, "$Id$")
-
-bogus::bogus()
-{
-}
-
-bogus::~bogus()
-{
-}
-
-void
-bogus::noop (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/bogus_i.h b/TAO/tests/IOR_Endpoint_Hostnames/bogus_i.h
deleted file mode 100644
index 94a4961f8ff..00000000000
--- a/TAO/tests/IOR_Endpoint_Hostnames/bogus_i.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef bogus_h
-#define bogus_h
-#include /**/ "ace/pre.h"
-
-#include "bogusS.h"
-
-class bogus
- : public virtual POA_Test::bogus
-{
-public:
- bogus ();
- virtual ~bogus ();
-
- virtual void noop (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#include /**/ "ace/post.h"
-#endif //bogus_h
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp b/TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp
deleted file mode 100644
index b4058e4deef..00000000000
--- a/TAO/tests/IOR_Endpoint_Hostnames/generate_ior.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// This initializes an ORB, a POA, an Object within that POA, and
-// obtains and prints an IOR for that Object.
-//
-// $Id$
-
-#include "tao/corba.h"
-#include "tao/PortableServer/PortableServer.h"
-
-#include "bogus_i.h"
-
-ACE_RCSID (IOR_Endpoint_Hostnames, generate_ior, "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var rp =
- PortableServer::POA::_narrow(poa_object.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (CORBA::is_nil (rp.in()))
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) panic: nil root poa\n"), 1);
-
- bogus* bogus_impl = new bogus();
- PortableServer::ServantBase_var owner_transfer(bogus_impl);
- Test::bogus_var b = bogus_impl->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::String_var ior =
- orb->object_to_string (b.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- printf ("%s\n", ior.in());
-
- orb->shutdown();
- orb->destroy();
- }
- ACE_CATCH (CORBA::Exception, e)
- {
- ACE_PRINT_EXCEPTION (e, "Caught exception:");
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp b/TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp
deleted file mode 100644
index c6f463d08bf..00000000000
--- a/TAO/tests/IOR_Endpoint_Hostnames/list_interfaces.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// Extract the address for each network interface using EXACTLY
-// the same algorithm as TAO_IIOP_Acceptor, and then print
-// it. This is used by the run_test.pl to know how to set up
-// "expected results" for hostnames in IORs.
-//
-
-#include "ace/ACE.h"
-#include "ace/Auto_Ptr.h"
-#include "ace/INET_Addr.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (IOR_Endpoint_Hostnames, list_interfaces, "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- ACE_UNUSED_ARG (argc);
- ACE_UNUSED_ARG (argv);
-
- // network interfaces.
- ACE_INET_Addr *if_addrs = 0;
- size_t if_cnt = 0;
-
- unsigned long endpoint_count;
-
- if (ACE::get_ip_interfaces (if_cnt,
- if_addrs) != 0
- && errno != ENOTSUP)
- {
- // In the case where errno == ENOTSUP, if_cnt and if_addrs will
- // not be modified, and will each remain equal to zero. This
- // causes the default interface to be used.
- return -1;
- }
-
- if (if_cnt == 0 || if_addrs == 0)
- {
- ACE_DEBUG ((LM_WARNING,
- ACE_TEXT ("TAO (%P|%t) Unable to probe network ")
- ACE_TEXT ("interfaces. Using default.\n")));
-
- if_cnt = 1; // Force the network interface count to be one.
- delete [] if_addrs;
- if_addrs = new ACE_INET_Addr[if_cnt];
- }
-
- // Scan for the loopback interface since it shouldn't be included in
- // the list of cached hostnames unless it is the only interface.
- size_t lo_cnt = 0; // Loopback interface count
- for (size_t j = 0; j < if_cnt; ++j)
- if (if_addrs[j].get_ip_address () == INADDR_LOOPBACK)
- lo_cnt++;
-
- ACE_Auto_Basic_Array_Ptr<ACE_INET_Addr> safe_if_addrs (if_addrs);
-
- // If the loopback interface is the only interface then include it
- // in the list of interfaces to query for a hostname, otherwise
- // exclude it from the list.
- if (if_cnt == lo_cnt)
- endpoint_count = static_cast<unsigned long> (if_cnt);
- else
- endpoint_count = static_cast<unsigned long> (if_cnt - lo_cnt);
-
- // The number of hosts/interfaces we want to cache may not be the
- // same as the number of detected interfaces so keep a separate
- // count.
- size_t host_cnt = 0;
-
- for (size_t i = 0; i < if_cnt; ++i)
- {
- // Ignore any loopback interface if there are other
- // non-loopback interfaces.
- if (if_cnt != lo_cnt &&
- if_addrs[i].get_ip_address() == INADDR_LOOPBACK)
- continue;
-
- // Print the address as a string.
- printf ("%s\n", if_addrs[i].get_host_addr());
-
- host_cnt++;
- }
-
- return 0;
-}
diff --git a/TAO/tests/IOR_Endpoint_Hostnames/run_test.pl b/TAO/tests/IOR_Endpoint_Hostnames/run_test.pl
deleted file mode 100755
index e979bf853bc..00000000000
--- a/TAO/tests/IOR_Endpoint_Hostnames/run_test.pl
+++ /dev/null
@@ -1,256 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-#
-# This run_test.pl does not use the standard harness as used by other
-# run_test.pl. Since it is testing a behavior of TAO which is
-# affected by environmental influences, it uses perl features as well
-# as separate executables to obtain information about the environment
-# so that it can inspect the information inside IORs and decide if
-# that information is "correct" given the environment.
-#
-# At the end, it prints out a matrix of each permutation of the test
-# and indicates whether or not that permutation FAILed.
-#
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-use Sys::Hostname;
-
-# Add the current directory to our execution path
-use Env qw(@PATH);
-push @PATH, $PerlACE::Process::ExeSubDir;
-
-open STDERR, ">&STDOUT" or die "cannot dup STDERR to STDOUT: $!\n";
-
-open (INTERFACES, "list_interfaces|") || die "Unable to exec list_interfaces: $!\n";
-# We want this global...
-chomp(@IPADDRS = <INTERFACES>);
-close (INTERFACES);
-
-# Fill up the array of hostnames; can't use the hostname() from
-# Sys::Hostname because it's too good at figuring out that IP
-# addresses that aren't in a host table actually DO match to a host
-# name. So, we use gethostbyaddr().
-use Socket;
-@HOSTNAMES = map { (gethostbyaddr(inet_aton($_),AF_INET))[0] || $_ } @IPADDRS;
-
-$HN = hostname; # Shorthand so we do not have to use 'hostname' all over.
-
-#
-# $TEST_DATA is a reference to an anonymous hash that has
-# key: string representation/description of a test
-# value: ref to anonymous array consisting of
-# [0] = -ORBDottedDecimalAddresses value (must be 0 or 1)
-# [1] = -ORBendpoint hosname spec (undef if not provided)
-# [2] = -ORBendpoint "hostname_in_ior" value (undef if not provided)
-# [3] = ref to array containing profiles expected in IOR
-#
-
-$TEST_DATA = {
-
-#
-# This is kind of like a "truth table" for what should happen when
-# -ORBDottedDecimalAddresses (DDA) and the "hostname_in_ior" (HIOR)
-# option for -ORBListenEndpoints (nee -ORBEndpoint) interact. Note
-# that DDA's default value is "0", so there is no way to have an
-# unspecified value for DDA.
-#
-#
-#
-# | -ORBendpoint |
-# DDA | hostspec | HIOR | Profile(s) in IOR
-# --------------------------------------------------------------
-# 0 | unspec | unspec | One profile for each interface
-# discovered in
-# TAO_IIOP_Acceptor::probe_interfaces(),
-# where the host's name is that
-# returned from a reverse lookup of
-# the interface's address from
-# whatever facility is doing
-# name<->address translations for
-# that host.
-
-"0:unspec:unspec" => [ 0, undef, undef, \@HOSTNAMES ],
-
-# 1 | unspec | unspec | One profile for each interface
-# discovered in
-# TAO_IIOP_Acceptor::probe_interfaces(),
-# where the host's name is the IP
-# address associated with the
-# interface.
-
-"1:unspec:unspec" => [ 1, undef, undef, \@IPADDRS ],
-
-# 0 | "foo" | unspec | Exactly one profile where the
-# host's name is "foo".
-
-"0:$HN:unspec" => [ 0, $HN, undef, [$HN] ],
-
-# 1 | "foo" | unspec | Exactly one profile where the
-# host's name is the IP address
-# from the name<->address
-# translation for the host.
-
-"1:$HN:unspec" => [ 1, $HN, undef, [ inet_ntoa((gethostbyname(hostname))[4]) ] ],
-
-# X | unspec | "bar" | Exactly one profile where the
-# host's name is "bar".
-#"d/c:unspec:".$HN."_blech" => [ undef, undef, $HN."_blech", [$HN."_blech"] ],
-#"d/c:unspec:blech" => [ undef, undef, "blech", ["blech"] ],
-"0:unspec:blech" => [ 0, undef, "blech", ["blech"] ],
-"1:unspec:blech" => [ 1, undef, "blech", ["blech"] ],
-#
-# X | "foo" | "bar" | Exactly one profile where the
-# host's name is "bar".
-#"d/c:$HN:".$HN."_blech" => [ undef, $HN, $HN."_blech", [$HN."_blech"] ],
-#"d/c:$HN:blech" => [ undef, $HN, "blech", ["blech"] ],
-"0:$HN:blech" => [ 0, $HN, "blech", ["blech"] ],
-"1:$HN:blech" => [ 1, $HN, "blech", ["blech"] ],
-};
-
-
-sub do_test {
- # pass in undef for 'unspec' in the table
- my ($dda, $endpointhost, $hior) = @_;
- $dda = 0 if (!defined($dda));
- $endpointhost = '' if (!defined($endpointhost));
- $hior_opt = ($hior ne '') ? "/hostname_in_ior=$hior" : '';
-
- my $command = "generate_ior " .
- "-ORBDottedDecimalAddresses $dda " .
- "-ORBendpoint iiop://$endpointhost".$hior_opt;
-
- my @profiles;
- my $line;
-# print "$command\n";
- open (PIOR, "$command | catior -x 2>&1 |")
- || die "Unable to exec generate_ior: $!\n";
-# print "XXX: $_" while (<PIOR>);
- while ($line = <PIOR>) {
- # Need to look for the following lines:
- # Host Name: <ipaddr_or_host>
- # and
- # endpoint: <ipaddr_or_host>:<portnum>
- chomp $line;
- my $x;
-# print "Looking at $line\n";
- if ($line =~ /.*Host Name:\s+(.+)$/) {
- chomp($x = $1);
-# print "HN pushing $x\n";
- push @profiles, $x;
- }
- elsif ($line =~ /.*endpoint: ([^:]+):.*/) {
- chomp($x = $1);
-# print "EP pushing $x\n";
- push @profiles, $x;
- }
- }
- close (PIOR);
-
- return @profiles;
-}
-
-
-# Usage:
-# $are_equal = compare_arrays(\@frogs, \@toads);
-sub compare_arrays {
- my ($first, $second) = @_;
- no warnings; # silence spurious -w undef complaints
- return 0 unless @$first == @$second;
- @sorted_first = sort @$first;
- @sorted_second = sort @$second;
- $first = \@sorted_first;
- $second = \@sorted_second;
- for (my $i = 0; $i < @$first; $i++) {
- return 0 if $first->[$i] ne $second->[$i];
- }
- return 1;
-}
-
-
-sub print_profiles {
- my ($test_info, $profiles_a) = @_;
-
- print "$test_info: ", join(' ', @$profiles_a), "\n";
-}
-
-sub check_profiles {
- my ($test_info, $found_profiles, $expected_profiles) = @_;
-# &print_profiles($test_info, $profiles);
-
- my $failinfo = [];
- # Do number of found profiles match expected?
- if ($#$found_profiles != $#$expected_profiles) {
- push @$failinfo, "(num IOR profiles[$#$found_profiles] != expected[$#$expected_profiles]";
- }
-
- # Really need to compare these as hashes to avoid ordering issues.
- if (compare_arrays ($found_profiles, $expected_profiles) == 0) {
- push @$failinfo, "(profiles in IOR != profiles expected)";
- push @$failinfo, "Found profiles (".join(',', @$found_profiles).")";
- }
-
- return $failinfo;
-}
-
-# Brute force implementation of each of the lines in the table above
-
-format STDOUT_TOP =
- | | -ORBendpoint | | Expected
-FAIL? | DDA | hostspec | hostname_in_ior | Profile(s) in IOR
-===============================================================================
-.
-format STDOUT =
-@<<< | @|| | @<<<<<<<<<<<<<<<<<< | @<<<<<<<<<<<<<<<<<<< | ^<<<<<<<<<<<<<<<<<<<
-$pf, $dda, $endpointhost, $hior, $expected_prof_in_ior
-~~ | | | | ^<<<<<<<<<<<<<<<<<<<
- $expected_prof_in_ior
-~ | Details: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $detail
-~~ | | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $detail
- +-----+---------------------+----------------------+---------------------
-.
-
-$: = ', ';
-for $test (sort keys %$TEST_DATA) {
- my $testargs = $TEST_DATA->{$test};
- my @p = &do_test ($testargs->[0], $testargs->[1], $testargs->[2]);
- my $failinfo = &check_profiles ($test, \@p, $TEST_DATA->{$test}[3]);
-
- # Set up all the global vars so we can write our output
- ($dda, $endpointhost, $hior) = split(':', $test);
- $expected_prof_in_ior = join(',', @{$TEST_DATA->{$test}[3]});
- if ($#$failinfo != -1) {
- $pf = 'FAIL';
- $detail = join("\r", @$failinfo);
- }
- else {
- $pf = $detail = '';
- }
-
- write;
-}
-exit;
-@p = &do_test(0, undef, undef);
-&check_profiles("0 unspec unspec", \@p, \@HOSTNAMES);
-
-@p = &do_test(1, undef, undef);
-&check_profiles("1 unspec unspec", \@p, \@IPADDRS);
-
-@p = &do_test(0, hostname, undef);
-&check_profiles("0 ".hostname." undef", \@p, [hostname]);
-
-@p = &do_test(1, hostname, undef);
-&check_profiles("1 ".hostname." undef", \@p, [ inet_ntoa((gethostbyname(hostname))[4]) ] );
-
-@p = &do_test(undef, undef, hostname . "_blech");
-&check_profiles("undef undef ".hostname."_blech", \@p, [hostname."_blech"]);
-
-@p = &do_test(undef, hostname, hostname."_blech");
-&check_profiles("undef ".hostname." ".hostname."_blech", \@p, [hostname."_blech"]);
diff --git a/TAO/tests/IPV6/Hello.cpp b/TAO/tests/IPV6/Hello.cpp
deleted file mode 100644
index 70af3ea8a11..00000000000
--- a/TAO/tests/IPV6/Hello.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/IPV6/Hello.h b/TAO/tests/IPV6/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/IPV6/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/IPV6/IPV6_Hello.mpc b/TAO/tests/IPV6/IPV6_Hello.mpc
deleted file mode 100644
index 9a1892855d9..00000000000
--- a/TAO/tests/IPV6/IPV6_Hello.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/IPV6/README b/TAO/tests/IPV6/README
deleted file mode 100644
index 656145f5902..00000000000
--- a/TAO/tests/IPV6/README
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
-
-@page IPV6 Test README File
-
- This test is designed to test a list of IPV6 specific
- connection conditions.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/IPV6/Test.idl b/TAO/tests/IPV6/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/IPV6/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/IPV6/client.cpp b/TAO/tests/IPV6/client.cpp
deleted file mode 100644
index 77a6ec4190b..00000000000
--- a/TAO/tests/IPV6/client.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-#include "ace/SString.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-bool expect_error = false;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'x':
- expect_error = true;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- if (expect_error)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - expected exception occurred!\n%s\n",
- ACE_ANY_EXCEPTION._info().c_str()));
-
- return 0;
- }
- else
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- }
- ACE_ENDTRY;
-
- if (expect_error)
- {
- ACE_DEBUG ((LM_ERROR, "(%P|%t) client - expected error did not occur!\n"));
-
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/IPV6/run_test.pl b/TAO/tests/IPV6/run_test.pl
deleted file mode 100755
index 82d3ef36246..00000000000
--- a/TAO/tests/IPV6/run_test.pl
+++ /dev/null
@@ -1,177 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $srv_arg = "-o server.ior ";
-}
-else {
- $srv_arg = "-o $iorfile ";
-}
-$clt_arg = "-k file://$iorfile ";
-
-@configurations =
- (
- {
- description => "Testing server with '-ORBConnectIPV6Only 1'.\n",
- server => "$srv_arg -ORBConnectIPV6Only 1",
- client => "$clt_arg",
- error => 0,
- url => 0,
- url_address => "",
- },
- {
- description => "Testing client with '-ORBPreferIPV6Interfaces 1'.\n",
- server => "$srv_arg ",
- client => "$clt_arg -ORBPreferIPV6Interfaces 1",
- error => 0,
- url => 0,
- url_address => "",
- },
- {
- description => "Testing IPV4 server with client with '-ORBConnectIPV6Only 1'.\n",
- server => "$srv_arg -ORBListenEndpoints iiop://127.0.0.1",
- client => "$clt_arg -x -ORBConnectIPV6Only 1",
- error => 1,
- url => 0,
- url_address => "",
- },
- {
- description => "Testing IPV4 server with client and URL-style IOR",
- server => "$srv_arg -ORBListenEndpoints iiop://0.0.0.0 -ORBObjRefStyle url",
- client => "$clt_arg",
- error => 0,
- url => 0,
- url_address => "",
- },
- {
- description => "Testing IPV4 server with client and IPV6-forced URL",
- server => "$srv_arg -ORBListenEndpoints iiop://0.0.0.0 -ORBObjRefStyle url",
- client => "-x",
- error => 1,
- url => 1,
- url_address => "corbaloc:iiop:1.2\@[::1]:",
- },
- {
- description => "Testing IPV6 server with client and IPV4-forced URL",
- server => "$srv_arg -ORBListenEndpoints iiop://[::1] -ORBObjRefStyle url",
- client => "-x",
- error => 1,
- url => 1,
- url_address => "corbaloc:iiop:1.2\@127.0.0.1:",
- },
- {
- description => "Testing IPV6Only server with client and IPV4-forced URL",
- server => "$srv_arg -ORBConnectIPV6Only 1 -ORBObjRefStyle url",
- client => "-x",
- error => 1,
- url => 1,
- url_address => "corbaloc:iiop:1.2\@127.0.0.1:",
- },
- {
- description => "Testing server with client and IPV4-forced URL",
- server => "$srv_arg -ORBObjRefStyle url",
- client => "",
- error => 0,
- url => 1,
- url_address => "corbaloc:iiop:1.2\@127.0.0.1:",
- },
- );
-
-
-sub run_test_
-{
- my $srvargs = @_[0]->{server};
- my $cltargs = @_[0]->{client};
- my $error = @_[0]->{error};
- my $stat = 0;
-
- print STDERR "\n******************************************************\n";
- print @_[0]->{description};
-
- print "\nRunning server with the following args:\n$srvargs\n\n";
-
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", $srvargs);
- }
- else {
- $SV = new PerlACE::Process ("server", $srvargs);
- }
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- return 1;
- }
-
- if (@_[0]->{url}) {
- my $fh;
- open $fh, $iorfile;
- my $url = <$fh>;
- close $fh;
-
- print "Changing corbaloc url from:\n$url\nto\n";
-
- my $url_addr = @_[0]->{url_address};
- if ($url =~ /corbaloc:iiop:1.[01234]\@[\[].*[\]]\:.*/) {
- $url =~ s/(corbaloc:iiop:1.[01234]\@[\[].*[\]]\:)(.*)/$url_addr$2/;
- }
- else {
- $url =~ s/(corbaloc:iiop:1.[01234]\@[^:]*\:)(.*)/$url_addr$2/;
- }
- print $url . "\n";
-
- $cltargs .= " -k \"$url\"";
- }
-
- print "\nRunning client with the following args:\n$cltargs\n\n";
-
- $CL = new PerlACE::Process ("client", $cltargs);
-
- $client = $CL->SpawnWaitKill (300);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $stat = 1;
- }
-
- if ($error) {
- $server = $SV->TerminateWaitKill (10);
- }
- else {
- $server = $SV->WaitKill (10);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $stat = 1;
- }
- }
-
- return $stat;
-}
-
-
-for $test (@configurations)
-{
- if (run_test_($test) != 0) {
- $status = 1;
- }
-
- unlink $iorfile;
-}
-
-exit $status;
diff --git a/TAO/tests/IPV6/server.cpp b/TAO/tests/IPV6/server.cpp
deleted file mode 100644
index 177aad4d1d8..00000000000
--- a/TAO/tests/IPV6/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/InterOp-Naming/.cvsignore b/TAO/tests/InterOp-Naming/.cvsignore
deleted file mode 100644
index aa5c0fd4566..00000000000
--- a/TAO/tests/InterOp-Naming/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-INS_test_client
-INS_test_server
diff --git a/TAO/tests/InterOp-Naming/INS.idl b/TAO/tests/InterOp-Naming/INS.idl
deleted file mode 100644
index 7af7e68c8df..00000000000
--- a/TAO/tests/InterOp-Naming/INS.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-//$Id$
-
-#ifndef INS_TEST_IDL
-#define INS_TEST_IDL
-
-interface INS
-{
- string test_ins ();
-};
-
-#endif /* INS_TEST_IDL */
diff --git a/TAO/tests/InterOp-Naming/INS_i.cpp b/TAO/tests/InterOp-Naming/INS_i.cpp
deleted file mode 100644
index a3c0b51e25a..00000000000
--- a/TAO/tests/InterOp-Naming/INS_i.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id$
-
-#include "INS_i.h"
-
-// Constructor
-
-INS_i::INS_i (void)
-{
- // no-op
-}
-
-// Destructor
-
-INS_i::~INS_i (void)
-{
-}
-
-// Set the ORB pointer.
-
-void
-INS_i::orb (CORBA::ORB_ptr o)
-{
- this->orb_ = CORBA::ORB::_duplicate (o);
-}
-
-char *
-INS_i::test_ins (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-ACE_THROW_SPEC (( CORBA::SystemException ))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Inside Operation\n"));
- return CORBA::string_dup ("Success");
-}
diff --git a/TAO/tests/InterOp-Naming/INS_i.h b/TAO/tests/InterOp-Naming/INS_i.h
deleted file mode 100644
index 38687ea246c..00000000000
--- a/TAO/tests/InterOp-Naming/INS_i.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/InterOp-Naming
-//
-// = FILENAME
-// INS_i.h
-//
-// = DESCRIPTION
-// This class implements the INS interface.
-//
-// = AUTHOR
-// Vishal Kachroo <vishal@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef INS_I_H
-#define INS_I_H
-
-#include "INSS.h"
-
-class INS_i : public POA_INS
-{
-
-public:
- // = Initialization and termination methods.
- INS_i (void);
- // Constructor.
-
- ~INS_i (void);
- // Destructor.
-
- char * test_ins (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC (( CORBA::SystemException ));
- // test the INS.
-
- void orb (CORBA::ORB_ptr o);
- // Set the ORB pointer.
-
-private:
- CORBA::ORB_var orb_;
- // ORB pointer.
-
-};
-
-#endif /* INS_I_H */
-
-
diff --git a/TAO/tests/InterOp-Naming/INS_test_client.cpp b/TAO/tests/InterOp-Naming/INS_test_client.cpp
deleted file mode 100644
index 0e4ac57360f..00000000000
--- a/TAO/tests/InterOp-Naming/INS_test_client.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-
-#include "INSC.h"
-
-#include "tao/ObjectIdListC.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-int
-main (int argc, char *argv[])
-{
- int i = 0;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Retrieve a reference to the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (argc < 2)
- {
- ACE_DEBUG ((LM_DEBUG,
- "No Name specified to be resolved\n"));
- return -1;
- }
-
- CORBA::Object_var objref;
-
- for (i = 1; i < argc; ++i)
- {
- if (ACE_OS::strcmp (argv[i], "-l") == 0)
- {
- // List initial services
- CORBA::ORB::ObjectIdList_var list =
- orb->list_initial_services (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- size_t length = list->length ();
-
- if (length > 0)
- {
- ACE_DEBUG ((LM_INFO,
- "Listing initial references...\n"));
-
- for (size_t n = 0; n < length; ++n)
- {
- ACE_DEBUG ((LM_DEBUG,
- " Reference %u: %s\n",
- n,
- static_cast<char const*>(list[n])));
- }
- }
- else
- {
- // We should at least get TAO's initial references,
- // such as "RootPOA", "NameService", etc.
- ACE_ERROR_RETURN ((LM_ERROR,
- "\n"
- "No initial references. "
- "This condition shouldn't happen.\n"),
- -1);
- }
- }
- else
- {
- objref = orb->resolve_initial_references (argv[i] ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (objref.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to resolve the "
- "given name.\n"),
- -1);
-
- INS_var server = INS::_narrow (objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var iorstr =
- orb->object_to_string (server.in ());
- ACE_DEBUG ((LM_DEBUG,
- "Resolved IOR for %s : %s\n",
- argv[i],
- iorstr.in()));
-
- CORBA::String_var test_ins_result =
- server->test_ins (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\nResult of Remote Call : %s\n",
- test_ins_result.in ()));
- }
- }
- }
- ACE_CATCH (CORBA::ORB::InvalidName, name)
- {
- ACE_DEBUG ((LM_DEBUG, "Cannot resolve <%s>\n", argv[i]));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception:");
- }
-
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/InterOp-Naming/INS_test_server.cpp b/TAO/tests/InterOp-Naming/INS_test_server.cpp
deleted file mode 100644
index c45f732a26f..00000000000
--- a/TAO/tests/InterOp-Naming/INS_test_server.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id$
-#include "Server_i.h"
-#include "INS_i.h"
-
-// This is the main driver program for the INS test server.
-
-int
-main (int argc, char *argv[])
-{
-
- Server_i server;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n\tINS test server\n\n"));
-
- ACE_TRY_NEW_ENV
- {
- if (server.init (argc,
- argv
- ACE_ENV_ARG_PARAMETER) == -1)
- return 1;
- else
- {
- server.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/InterOp-Naming/InterOp-Naming.mpc b/TAO/tests/InterOp-Naming/InterOp-Naming.mpc
deleted file mode 100644
index 163fd3de1c3..00000000000
--- a/TAO/tests/InterOp-Naming/InterOp-Naming.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, utils, iortable {
- exename = INS_test_server
- Source_Files {
- INS_i.cpp
- Server_i.cpp
- INS_test_server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- exename = INS_test_client
- after += *Server
- Source_Files {
- INSC.cpp
- INS_test_client.cpp
- }
-}
-
diff --git a/TAO/tests/InterOp-Naming/README b/TAO/tests/InterOp-Naming/README
deleted file mode 100644
index 296e8b9cd5a..00000000000
--- a/TAO/tests/InterOp-Naming/README
+++ /dev/null
@@ -1,68 +0,0 @@
-CORBA InterOperable Naming Service :
--------------------------------------
-
-This service allows the ORB to be administratively configured to return
-object references from CORBA::ORB::resolve_initial_references () for
-non-locality constrained objects.
-
-For more information on the service please see :
-
-$(TAO_ROOT)/docs/releasenotes/#nservices
-$(TAO_ROOT)/docs/Options.html
-
-The InterOp_test :
-
-The test server adds the argument specified with the -i option and the
-IOR of the INS_i servant to the IOR table. The test client calls
-resolve_initial_references on argv[1].
-
-TEST 1: Single Profile corbalocs using -ORBInitRef
-
-InterOp-Naming> INS_test_server -i ins -nd -ORBObjRefStyle URL
- // -i Adds the ins:IOR mapping to
- // the ORB table.
- // -n Use the Naming Service.
-
-InterOp-Naming> INS_test_client arbit_service \
- -ORBInitRef "arbit_service=corbaloc:iiop:<host-name>:<port>/ins"
-
-
-TEST 2: Multiple Profile corbalocs using -ORBInitRef
-
-InterOp-Naming> INS_test_server -i ins -nd -ORBobjrefstyle url
-
- // -i Adds the ins:IOR mapping to
- // the ORB table.
- // -n Use the Naming Service.
-
-InterOp-Naming> INS_test_client arbit_service \
- -ORBInitRef "arbit_service=corbaloc:1.0@<host-name>:<port>/ins,
- 1.0@<host-name2>:<port2>/key,
- ...
- 1.0@<host-namen>:<portN>/key"
-
-TEST 3: Single Profile corbaloc using -ORBDefautlInitRef
-
-InterOp-Naming> INS_test_server -i ins -nd -ORBObjRefStyle URL
-
- // -i Adds the ins:IOR mapping to
- // the ORB table.
- // -n Use the Naming Service.
-
-InterOp-Naming> INS_test_client ins \
- -ORBDefaultInitRef "corbaloc::1.0@<host-name>:<port>"
-
-TEST 4: Multiple Profile corbaloc using -ORBDefaultInitRef
-
-InterOp-Naming> INS_test_server -i ins -nd -ORBobjrefstyle url
-
- // -i Adds the ins:IOR mapping to
- // the ORB table.
- // -n Use the Naming Service.
-
-InterOp-Naming> INS_test_client \
- -ORBDefaultInitRef "corbaloc::1.0@<host-name>:<port>,
- 1.0@<host-name2>:<port2>,
- ...
- 1.0@<host-namen>:<portN>"
-
diff --git a/TAO/tests/InterOp-Naming/Server_i.cpp b/TAO/tests/InterOp-Naming/Server_i.cpp
deleted file mode 100644
index ec60caff7ea..00000000000
--- a/TAO/tests/InterOp-Naming/Server_i.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-//$Id$
-
-#include "Server_i.h"
-#include "tao/debug.h"
-#include "tao/IORTable/IORTable.h"
-#include "ace/OS_NS_stdio.h"
-
-// Constructor.
-
-Server_i::Server_i (void)
- : ior_output_file_ (0),
- ins_ (0)
-{
- // no-op.
-}
-
-// Destructor.
-
-Server_i::~Server_i (void)
-{
-}
-
-// Parse the command-line arguments and set options.
-
-int
-Server_i::parse_args (void)
-{
- ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:ni:");
- int c = 0;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
- if (this->ior_output_file_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- get_opts.opt_arg ()), -1);
- break;
-
- case 'i': // For Testing the InterOperable Naming Service.
- this->ins_ = CORBA::string_dup (get_opts.opt_arg ());
- break;
-
- case '?': // display help for use of the server.
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-o] <ior_output_file>"
- " [-n] "
- "\n",
- argv_ [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-// Add the ObjectID:IOR mapping to the IOR table of
-// the ORB.
-
-int
-Server_i::add_IOR_to_table (CORBA::String_var ior)
-{
- ACE_TRY_NEW_ENV
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Adding (KEY:IOR) %s:%s\n",
- this->ins_,
- ior.in ()));
-
- CORBA::Object_var table_object =
- this->orb_manager_.orb ()->resolve_initial_references (
- "IORTable"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- adapter->bind (this->ins_, ior.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Exception caugh in add_IOR_to_table");
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// Initialize the server.
-int
-Server_i::init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
-{
- // Call the init of <TAO_ORB_Manager> to initialize the ORB and
- // create a child POA under the root POA.
- int result = this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (result == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "init_child_poa"),
- -1);
-
- this->argc_ = argc;
- this->argv_ = argv;
-
- int retval = this->parse_args ();
-
- if (retval != 0)
- return retval;
-
- CORBA::ORB_var orb = this->orb_manager_.orb ();
-
- // Stash our ORB pointer for later reference.
- this->servant_.orb (orb.in ());
-
- ACE_TRY
- {
- CORBA::String_var str =
- this->orb_manager_.activate_under_child_poa ("INS_servant",
- &this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "The IOR is: <%s>\n",
- str.in ()));
-
- if (this->ins_)
- if (this->add_IOR_to_table (str) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "test_for_ins (): failed\n"),
- -1);
-
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- str.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "\tException in activation of POA");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-Server_i::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Run the main event loop for the ORB.
- int result = this->orb_manager_.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (result == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Server_i::run"),
- -1);
-
- return 0;
-}
diff --git a/TAO/tests/InterOp-Naming/Server_i.h b/TAO/tests/InterOp-Naming/Server_i.h
deleted file mode 100644
index 7df2f070c41..00000000000
--- a/TAO/tests/InterOp-Naming/Server_i.h
+++ /dev/null
@@ -1,75 +0,0 @@
-//$Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/InterOp-Naming
-//
-// = FILENAME
-// Server_i.h
-//
-// = DESCRIPTION
-// The class is the driver for the INS test server.
-//
-// = AUTHOR
-// Vishal Kachroo <vishal@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef SERVER_I_H
-#define SERVER_I_H
-
-#include "tao/Utils/ORB_Manager.h"
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "INS_i.h"
-
-class Server_i
-{
-
-public:
- // = Initialization and termination methods.
-
- Server_i (void);
- // Constructor.
-
- ~Server_i (void);
- // Destructor.
-
- int init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL);
- // Initialize the Server state - parsing arguments and waiting.
-
- int add_IOR_to_table (CORBA::String_var ior);
- // Add an IOR to the ORB-IOR table.
-
- int run (ACE_ENV_SINGLE_ARG_DECL);
- // Run the orb.
-
-protected:
-
- INS_i servant_;
- // Servant class
-
- int parse_args (void);
- // Parses the commandline arguments.
-
- TAO_ORB_Manager orb_manager_;
- // The ORB manager - a helper class for accessing the POA and
- // registering objects.
-
- FILE *ior_output_file_;
- // File where the IOR of the server object is stored.
-
- char * ins_;
- // Used test the INS.
-
- int argc_;
- // Number of command line arguments.
-
- char **argv_;
- // The command line arguments.
-};
-
-#endif /* SERVER_I_H */
diff --git a/TAO/tests/InterOp-Naming/run_test.pl b/TAO/tests/InterOp-Naming/run_test.pl
deleted file mode 100755
index 25be880b026..00000000000
--- a/TAO/tests/InterOp-Naming/run_test.pl
+++ /dev/null
@@ -1,165 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$TARGETHOSTNAME = "localhost";
-
-$file = PerlACE::LocalFile ("test.ior");
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-
-$status = 0;
-
-print STDERR "\n\n==== InitRef test\n";
-
-unlink $file;
-if (PerlACE::is_vxworks_test()) {
- $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGT_HOST'};
- $SV = new PerlACE::ProcessVX ("INS_test_server",
- "-ORBEndpoint iiop://1.0@"."$TARGETHOSTNAME:$port "
- . " -i object_name -o test.ior -ORBDottedDecimalAddresses 1");
-}
-else {
- $SV = new PerlACE::Process ("INS_test_server",
- "-ORBEndpoint iiop://1.0@"."$TARGETHOSTNAME:$port "
- . " -i object_name -o $file -ORBDottedDecimalAddresses 1");
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 10) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL = new PerlACE::Process ("INS_test_client",
- "random_service "
- ."-ORBInitRef random_service="
- ."corbaloc::1.1@"."$TARGETHOSTNAME:$port/object_name");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== InvalidName test\n";
-
-$CL = new PerlACE::Process ("INS_test_client",
- " not_a_service "
- ."-ORBInitRef random_service="
- ."corbaloc:iiop:1.0@"."$TARGETHOSTNAME:$port/object_name");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== DefaultInitRef test\n";
-
-$CL = new PerlACE::Process ("INS_test_client",
- " object_name "
- . "-ORBDefaultInitRef"
- ." corbaloc:iiop:1.0@"."$TARGETHOSTNAME:$port/");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== Multi endpoint test\n";
-
-$port1 = $port + 1;
-$port2 = $port + 2;
-
-$CL = new PerlACE::Process ("INS_test_client",
- " random_service "
- . "-ORBInitRef random_service="
- ."corbaloc:"
- ."iiop:1.0@"."$TARGETHOSTNAME:$port1,"
- .":1.0@"."$TARGETHOSTNAME:$port2,"
- ."iiop:1.0@"."$TARGETHOSTNAME:$port"
- ."/object_name");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== Multi endpoint test with CORBA::ORB::list_initial_services ()\n";
-
-$port1 = $port + 1;
-$port2 = $port + 2;
-
-$CL = new PerlACE::Process ("INS_test_client",
- " random_service "
- . " -l "
- . "-ORBInitRef random_service="
- . "corbaloc:"
- . "iiop:1.0@"."$TARGETHOSTNAME:$port1,"
- . "iiop:1.0@"."$TARGETHOSTNAME:$port2,"
- . "iiop:1.0@"."$TARGETHOSTNAME:$port"
- . "/object_name");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== Multi endpoint default ref test\n";
-
-$CL = new PerlACE::Process ("INS_test_client",
- " object_name "
- . "-ORBDefaultInitRef "
- ."corbaloc:"
- ."iiop:1.0@"."$TARGETHOSTNAME:$port1,"
- ."iiop:1.0@"."$TARGETHOSTNAME:$port2,"
- ."iiop:1.0@"."$TARGETHOSTNAME:$port/");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== Default ref with final '/'\n";
-
-$CL = new PerlACE::Process ("INS_test_client",
- " object_name "
- . "-ORBDefaultInitRef "
- ."corbaloc:"
- ."iiop:1.0@"."$TARGETHOSTNAME:$port/");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Leader_Followers/.cvsignore b/TAO/tests/Leader_Followers/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Leader_Followers/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Leader_Followers/Leader_Followers.mpc b/TAO/tests/Leader_Followers/Leader_Followers.mpc
deleted file mode 100644
index a3b794ac88f..00000000000
--- a/TAO/tests/Leader_Followers/Leader_Followers.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, strategies {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, strategies {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Leader_Followers/README b/TAO/tests/Leader_Followers/README
deleted file mode 100644
index 725c92f1ad0..00000000000
--- a/TAO/tests/Leader_Followers/README
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Id$
-
-Description:
-
-This is a test for server applications that have client threads
-(threads making remote calls) starting before event loop threads
-(threads running the event loop).
-
-Expected output:
-
-The event loop threads should wait for the client threads that become
-leaders to give up leadership before continuing.
-
-How to run:
-
-You can use the run_test.pl script to run it or:
-
-$ server
-$ client
diff --git a/TAO/tests/Leader_Followers/client.cpp b/TAO/tests/Leader_Followers/client.cpp
deleted file mode 100644
index 1711b12b175..00000000000
--- a/TAO/tests/Leader_Followers/client.cpp
+++ /dev/null
@@ -1,311 +0,0 @@
-// $Id$
-
-// ================================================================
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// See README.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ================================================================
-
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
-#include "testC.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Leader_Followers, client, "$Id$")
-
-// Name of file contains ior.
-static const char *IOR = "file://ior";
-
-// Number of client threads.
-static int number_of_client_threads = 3;
-
-// Number of event loop threads.
-static int number_of_event_loop_threads = 1;
-
-// Amount of remote work (in milli seconds).
-static u_long remote_work = 5000;
-
-// Run event loop for this much time (in milli seconds).
-static u_long event_loop_timeout = 7000;
-
-// Flag indicates whether to shutdown remote server or not upon client
-// shutdown.
-static int shutdown_server = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:c:e:w:t:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- IOR = get_opts.opt_arg ();
- break;
-
- case 'c':
- number_of_client_threads = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'e':
- number_of_event_loop_threads = ::atoi (get_opts.opt_arg ());
- break;
-
- case 't':
- event_loop_timeout = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'w':
- remote_work = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k IOR "
- "-c number of client threads "
- "-e number of event loop threads "
- "-t event loop timeout "
- "-w remote work "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- if (IOR == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify the IOR for the servant\n"), -1);
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-class Client_Task : public ACE_Task_Base
-{
-public:
- Client_Task (test_ptr t)
- : test_ (test::_duplicate (t)),
- work_so_far_ (0),
- sleep_ (0)
- {
- }
-
- int svc (void)
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- u_long work_from_this_thread = 0;
- ACE_Time_Value sleep_for_this_thread;
-
- {
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, -1);
-
- this->work_so_far_ += remote_work / number_of_client_threads;
- work_from_this_thread = this->work_so_far_;
-
- sleep_for_this_thread.msec (this->sleep_);
- this->sleep_ += 1000 / number_of_client_threads;
- }
-
- // Small pause to avoid overrunning the server.
- ACE_OS::sleep (sleep_for_this_thread);
-
- // Invoke the method.
- ACE_DEBUG ((LM_DEBUG,
- "Client: Invoking server from thread %t for time %d @ %T\n",
- work_from_this_thread));
-
- CORBA::ULong result = this->test_->method (work_from_this_thread
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (work_from_this_thread != result)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Client: result is %d\n", result));
- ACE_ASSERT (work_from_this_thread == result);
- }
-
- ACE_DEBUG ((LM_DEBUG, "Client: client loop finished for thread %t @ %T\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in thread:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
-
- return 0;
- }
-
-private:
- // server reference.
- test_var test_;
-
- // Work counter.
- u_long work_so_far_;
-
- // Lock for work counter.
- TAO_SYNCH_MUTEX lock_;
-
- // Small pause to avoid overrunning the server.
- long sleep_;
-};
-
-class Event_Loop_Task : public ACE_Task_Base
-{
-public:
- Event_Loop_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- event_loop_timeout_so_far_ (0)
- {
- }
-
- int svc (void)
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- u_long event_loop_timeout_for_this_thread = 0;
-
- {
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, -1);
-
- this->event_loop_timeout_so_far_ += event_loop_timeout / number_of_event_loop_threads;
- event_loop_timeout_for_this_thread = this->event_loop_timeout_so_far_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Client: Event loop thread %t starting event loop for %d milli seconds @ %T\n",
- event_loop_timeout_for_this_thread));
-
- ACE_Time_Value timeout (0,
- event_loop_timeout_for_this_thread * 1000);
-
- this->orb_->run (timeout ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Client: Event loop finished for thread %t @ %T\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in thread:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
-
- return 0;
- }
-
-private:
- // ORB reference.
- CORBA::ORB_var orb_;
-
- // Event loop timeout counter.
- u_long event_loop_timeout_so_far_;
-
- // Lock for event loop timeout counter.
- TAO_SYNCH_MUTEX lock_;
-};
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
- if (parse_args_result != 0)
- return parse_args_result;
-
- // Get an object reference from the argument string.
- CORBA::Object_var object =
- orb->string_to_object (IOR ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Try to narrow the object reference to a <server> reference.
- test_var server = test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (server.in ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE,
- number_of_client_threads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- -1);
-
- // Make sure to give the client threads enough time to become
- // leaders.
- ACE_OS::sleep (4);
-
- Event_Loop_Task event_loop_task (orb.in ());
-
- if (event_loop_task.activate (THR_NEW_LWP | THR_JOINABLE,
- number_of_event_loop_threads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate event_loop threads\n"),
- -1);
-
- event_loop_task.thr_mgr ()->wait ();
- client_task.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Client: All threads finished @ %T\n"));
-
- // Shutdown server.
- if (shutdown_server)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Leader_Followers/run_test.pl b/TAO/tests/Leader_Followers/run_test.pl
deleted file mode 100755
index d083e09d241..00000000000
--- a/TAO/tests/Leader_Followers/run_test.pl
+++ /dev/null
@@ -1,172 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("lf.ior");
-$tpool_reactor_directive = "-ORBsvcconfdirective \"static Advanced_Resource_Factory '-ORBreactortype tp'\"";
-$select_reactor_directive = "-ORBsvcconfdirective \"static Advanced_Resource_Factory '-ORBreactortype select_mt'\"";
-
-if (PerlACE::is_vxworks_test()) {
- $sv_iorfile = "lf.ior";
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $sv_iorfile = $iorfile;
- $SV = new PerlACE::Process ("server");
-}
-$CL = new PerlACE::Process ("client");
-
-sub run_client ($)
-{
- my $args = shift;
-
- $CL->Arguments ("-k file://$iorfile " . $args);
-
- my $client = $CL->SpawnWaitKill (200);
-
- if ($client != 0) {
- $time = localtime;
- print STDERR "ERROR: client returned $client at $time\n";
- $status = 1;
- }
-}
-
-sub run_clients ()
-{
- print STDERR "\n\n*** No event loop threads ***\n\n\n";
-
- print STDERR "\nSelect Reactor\n\n";
-
- run_client ("$select_reactor_directive -e 0");
-
- print STDERR "\nTP Reactor\n\n";
-
- run_client ("$tpool_reactor_directive -e 0");
-
- print STDERR "\n\n*** Single-threaded client event loop: Select Reactor ***\n\n\n";
-
- print STDERR "\nSingle-threaded client running event loop for 3 seconds\n\n";
-
- run_client ("$select_reactor_directive -e 1 -t 3000");
-
- print STDERR "\nSingle-threaded client running event loop for 10 seconds\n\n";
-
- run_client ("$select_reactor_directive -e 1 -t 10000");
-
- print STDERR "\nSingle-threaded client running event loop for 20 seconds\n\n";
-
- run_client ("$select_reactor_directive -e 1 -t 20000");
-
- print STDERR "\n\n*** Single-threaded client event loop: TP Reactor ***\n\n\n";
-
- print STDERR "\nSingle-threaded client running event loop for 3 seconds\n\n";
-
- run_client ("$tpool_reactor_directive -e 1 -t 3000");
-
- print STDERR "\nSingle-threaded client running event loop for 10 seconds\n\n";
-
- run_client ("$tpool_reactor_directive -e 1 -t 10000");
-
- print STDERR "\nSingle-threaded client running event loop for 20 seconds\n\n";
-
- run_client ("$tpool_reactor_directive -e 1 -t 20000");
-
- print STDERR "\n\n*** Multi-threaded client event loop: TP Reactor ***\n\n\n";
-
- print STDERR "\nMulti-threaded client running event loop for 3 seconds\n\n";
-
- run_client ("$tpool_reactor_directive -e 5 -t 3000");
-
- print STDERR "\nMulti-threaded client running event loop for 10 seconds\n\n";
-
- run_client ("$tpool_reactor_directive -e 5 -t 10000");
-
- print STDERR "\nMulti-threaded client running event loop for 20 seconds\n\n";
-
- run_client ("$tpool_reactor_directive -e 5 -t 20000 -x");
-}
-
-$single = 1;
-$multi = 0;
-
-for ($i = 0; $i <= $#ARGV; $i++) {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
- print "run_test [-m] -[a]\n";
- print "\n";
- print "-m -- tests the multithreaded server (default is single)\n";
- print "-a -- tests both multi and single threaded servers\n";
- exit 0;
- }
- elsif ($ARGV[$i] eq "-m") {
- $multi = 1;
- $single = 0;
- }
- elsif ($ARGV[$i] eq "-a") {
- $multi = 1;
- $single = 1;
- }
-}
-
-if ($single == 1) {
- unlink $iorfile;
-
- print STDERR "\n\n*** Single threaded server ***\n\n\n";
-
- $SV->Arguments ("-o $sv_iorfile $select_reactor_directive");
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
- }
-
- run_clients ();
-
- $server = $SV->WaitKill (100);
- if ($server != 0) {
- $time = localtime;
- print STDERR "ERROR: server returned $server at $time\n";
- $status = 1;
- }
-
- unlink $iorfile;
-}
-
-if ($multi == 1) {
- unlink $iorfile;
-
- print STDERR "\n\n*** Thread-Pool server ***\n\n\n";
-
- $SV->Arguments ("-o $sv_iorfile -e 5 $tpool_reactor_directive");
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
- }
-
- run_clients ();
-
- $server = $SV->WaitKill (10);
-
- if ($server != 0) {
- $time = localtime;
- print STDERR "ERROR: server returned $server at $time\n";
- $SV->Kill ();
- }
-
- unlink $iorfile;
-}
-
-exit $status;
diff --git a/TAO/tests/Leader_Followers/run_test_mt.pl b/TAO/tests/Leader_Followers/run_test_mt.pl
deleted file mode 100755
index 9e4c112b115..00000000000
--- a/TAO/tests/Leader_Followers/run_test_mt.pl
+++ /dev/null
@@ -1,10 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-system 'perl run_test.pl -m ' . join ' ', @ARGV;
-
-
diff --git a/TAO/tests/Leader_Followers/server.cpp b/TAO/tests/Leader_Followers/server.cpp
deleted file mode 100644
index 42575677363..00000000000
--- a/TAO/tests/Leader_Followers/server.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "test_i.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Leader_Followers, server, "$Id$")
-
-const char *ior_output_file = "ior";
-
-int number_of_event_loop_threads = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "e:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'e':
- number_of_event_loop_threads = ::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-e <number of event loop threads> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Event_Loop_Task : public ACE_Task_Base
-{
-public:
- Event_Loop_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
- {
- }
-
- int svc (void)
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in thread:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
-
- return 0;
- }
-
-private:
- CORBA::ORB_var orb_;
- // ORB reference.
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- test_i servant (orb.in ());
-
- test_var server =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- Event_Loop_Task event_loop_task (orb.in ());
-
- if (event_loop_task.activate (THR_NEW_LWP | THR_JOINABLE,
- number_of_event_loop_threads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate event_loop threads\n"),
- -1);
-
- event_loop_task.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Server: Event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Leader_Followers/test.idl b/TAO/tests/Leader_Followers/test.idl
deleted file mode 100644
index c90404d1910..00000000000
--- a/TAO/tests/Leader_Followers/test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- unsigned long method (in unsigned long work);
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Leader_Followers/test_i.cpp b/TAO/tests/Leader_Followers/test_i.cpp
deleted file mode 100644
index 38f3459b07a..00000000000
--- a/TAO/tests/Leader_Followers/test_i.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Leader_Followers, test_i, "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
-
-CORBA::ULong
-test_i::method (CORBA::ULong work
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Server: Working for %d milli seconds @ %T\n",
- work));
-
- // Time required to process this request. <work> is time units in
- // milli seconds.
- ACE_Time_Value work_time (0,
- work * 1000);
-
- ACE_OS::sleep (work_time);
-
- return work;
-}
diff --git a/TAO/tests/Leader_Followers/test_i.h b/TAO/tests/Leader_Followers/test_i.h
deleted file mode 100644
index b884d8b517f..00000000000
--- a/TAO/tests/Leader_Followers/test_i.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Leader_Followers/
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#include "testS.h"
-
-class test_i : public POA_test
-{
- // = TITLE
- // Simple test implementation.
- //
-public:
- test_i (CORBA::ORB_ptr orb);
- // ctor.
-
- // = The test interface methods.
- CORBA::ULong method (CORBA::ULong work
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB.
-};
diff --git a/TAO/tests/LongUpcalls/.cvsignore b/TAO/tests/LongUpcalls/.cvsignore
deleted file mode 100644
index 263d5e84f49..00000000000
--- a/TAO/tests/LongUpcalls/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-ami_client
-ami_server
-blocking_client
-blocking_server
diff --git a/TAO/tests/LongUpcalls/AMI_Manager.cpp b/TAO/tests/LongUpcalls/AMI_Manager.cpp
deleted file mode 100644
index 01b2d58bb9e..00000000000
--- a/TAO/tests/LongUpcalls/AMI_Manager.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-//
-// $Id$
-//
-
-#include "AMI_Manager.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID (LongUpcalls,
- AMI_Manager,
- "$Id$")
-
-static void
-validate_connection (Test::Controller_ptr controller
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- ACE_TRY
- {
-#if (TAO_HAS_CORBA_MESSAGING == 1)
- CORBA::PolicyList_var unused;
- controller->_validate_connection (unused
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#else
- controller->_is_a ("Not_an_IDL_Type"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-}
-
-AMI_Manager::AMI_Manager (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-AMI_Manager::start_workers (CORBA::Short worker_count,
- CORBA::Long milliseconds,
- Test::Controller_ptr controller
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_Thread_Manager thread_manager;
-
- validate_connection(controller
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "Starting %d workers\n", worker_count));
- Worker worker (&thread_manager,
- controller, milliseconds,
- this->orb_.in ());
-
- worker.activate (THR_NEW_LWP | THR_JOINABLE, worker_count);
-
- thread_manager.wait ();
-}
-
-void
-AMI_Manager::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-// ****************************************************************
-
-Worker::Worker (ACE_Thread_Manager *thr_mgr,
- Test::Controller_ptr controller,
- CORBA::Long milliseconds,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (thr_mgr)
- , controller_ (Test::Controller::_duplicate (controller))
- , milliseconds_ (milliseconds)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker::svc (void)
-{
- // ACE_DEBUG ((LM_DEBUG, "Worker starts\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- TAO_SYNCH_MUTEX mutex;
- int pending_requests = 2;
- Test::AMI_ControllerHandler_var handler;
-
- {
- Controller_Handler *handler_impl;
- ACE_NEW_RETURN (handler_impl,
- Controller_Handler (&mutex,
- &pending_requests),
- -1);
-
- PortableServer::ServantBase_var auto_destroy (handler_impl);
- handler = handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- validate_connection(this->controller_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->controller_->sendc_worker_started (handler.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "Worker start reported\n"));
-
- ACE_Time_Value tv (0, 1000 * this->milliseconds_);
- ACE_OS::sleep (tv);
-
- this->controller_->sendc_worker_finished (handler.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "Worker completion reported\n"));
-
- for (;;)
- {
- ACE_Time_Value tv (0, 1000 * this->milliseconds_);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, mutex, -1);
- if (pending_requests == 0)
- break;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in svc() method\n");
- }
- ACE_ENDTRY;
- return 0;
-}
-
-// ****************************************************************
-
-Controller_Handler::Controller_Handler (TAO_SYNCH_MUTEX *mutex,
- int *pending_replies)
- : mutex_ (mutex)
- , pending_replies_ (pending_replies)
-{
-}
-
-void
-Controller_Handler::worker_started (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, *this->mutex_);
- (*this->pending_replies_)--;
-}
-
-void
-Controller_Handler::worker_started_excep
- (::Messaging::ExceptionHolder* h
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- h->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Controller_Handler exception raised in"
- " worker_started");
- }
- ACE_ENDTRY;
-}
-
-void
-Controller_Handler::worker_finished (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, *this->mutex_);
- (*this->pending_replies_)--;
-}
-
-void
-Controller_Handler::worker_finished_excep
- (::Messaging::ExceptionHolder *h
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- h->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Controller_Handler exception raised in"
- " worker_finished");
- }
- ACE_ENDTRY;
-}
diff --git a/TAO/tests/LongUpcalls/AMI_Manager.h b/TAO/tests/LongUpcalls/AMI_Manager.h
deleted file mode 100644
index 5d7d6a82eec..00000000000
--- a/TAO/tests/LongUpcalls/AMI_Manager.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// $Id$
-
-#ifndef LONGUPCALLS_AMI_MANAGER_H
-#define LONGUPCALLS_AMI_MANAGER_H
-
-#include "TestS.h"
-#include "ace/Task.h"
-
-class AMI_Manager
- : public virtual POA_Test::Manager
-{
-public:
- AMI_Manager (CORBA::ORB_ptr orb);
- // Constructor
-
- // = The skeleton methods
- virtual void start_workers (CORBA::Short worker_count,
- CORBA::Long milliseconds,
- Test::Controller_ptr controller
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB, to shutdown
-};
-
-// ****************************************************************
-
-class Worker : public ACE_Task_Base
-{
-public:
- Worker (ACE_Thread_Manager *thr_mgr,
- Test::Controller_ptr controller,
- CORBA::Long milliseconds,
- CORBA::ORB_ptr orb);
-
- virtual int svc (void);
- // The service method
-
-private:
- Test::Controller_var controller_;
- // The controller pointer
-
- CORBA::Long milliseconds_;
- // The number of milliseconds.
-
- CORBA::ORB_var orb_;
- // The orb
-};
-
-// ****************************************************************
-
-class Controller_Handler
- : public virtual POA_Test::AMI_ControllerHandler
-{
-public:
- Controller_Handler (TAO_SYNCH_MUTEX *mutex,
- int *pending_replies);
- // Constructor
-
- virtual void worker_started (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void worker_started_excep (::Messaging::ExceptionHolder*
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void worker_finished (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void worker_finished_excep (::Messaging::ExceptionHolder*
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- TAO_SYNCH_MUTEX *mutex_;
- int *pending_replies_;
- // The pending replies is decremented each time a reply is
- // received.
- // The mutex is used to protect the access to the flag.
-};
-
-#endif /* LONGUPCALLS_AMI_MANAGER_H */
diff --git a/TAO/tests/LongUpcalls/Controller.cpp b/TAO/tests/LongUpcalls/Controller.cpp
deleted file mode 100644
index 94008f0a364..00000000000
--- a/TAO/tests/LongUpcalls/Controller.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// $Id$
-//
-#include "Controller.h"
-
-ACE_RCSID(LongUpcalls, Controller, "$Id$")
-
-Controller::Controller (void)
- : start_count_ (0)
- , finish_count_ (0)
-{
-}
-
-void
-Controller::dump_results ()
-{
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- if (this->start_count_ != this->finish_count_)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR - mismatched count! (%d,%d)\n",
- this->start_count_, this->finish_count_));
- }
-}
-
-void
-Controller::worker_started (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- this->start_count_++;
-
- // ACE_DEBUG ((LM_DEBUG, "Received worker start report\n"));
-}
-
-void
-Controller::worker_finished (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
- this->finish_count_++;
-
- // ACE_DEBUG ((LM_DEBUG, "Received worker completion report\n"));
-}
diff --git a/TAO/tests/LongUpcalls/Controller.h b/TAO/tests/LongUpcalls/Controller.h
deleted file mode 100644
index a3992eb5c59..00000000000
--- a/TAO/tests/LongUpcalls/Controller.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-#ifndef LONGUPCALLS_CONTROLLER_H
-#define LONGUPCALLS_CONTROLLER_H
-
-#include "TestS.h"
-
-class Controller
- : public virtual POA_Test::Controller
-{
-public:
- Controller (void);
- // Constructor
-
- void dump_results (void);
- // Print out the results and any errors
-
- // = The skeleton methods
- virtual void worker_started (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void worker_finished (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- TAO_SYNCH_MUTEX mutex_;
- CORBA::ULong start_count_;
- CORBA::ULong finish_count_;
-};
-
-#endif /* LONGUPCALLS_CONTROLLER_H */
diff --git a/TAO/tests/LongUpcalls/LongUpcalls.mpc b/TAO/tests/LongUpcalls/LongUpcalls.mpc
deleted file mode 100644
index 13a0c026057..00000000000
--- a/TAO/tests/LongUpcalls/LongUpcalls.mpc
+++ /dev/null
@@ -1,37 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging, ami {
- exename = blocking_server
- Source_Files {
- Manager.cpp
- blocking_server.cpp
- }
-}
-
-project(*Client): messaging, taoexe, portableserver, ami {
- after += *Server
- Source_Files {
- Controller.cpp
- blocking_client.cpp
- }
-}
-
-project(*AMI_Server): taoserver, messaging, ami {
- exename = ami_server
- after += *Client
- Source_Files {
- AMI_Manager.cpp
- ami_server.cpp
- }
-}
-
-project(*AMI_Client): messaging, taoexe, portableserver, ami {
- after += *AMI_Server
- Source_Files {
- Controller.cpp
- Manager_Handler.cpp
- ami_client.cpp
- }
-}
-
diff --git a/TAO/tests/LongUpcalls/Manager.cpp b/TAO/tests/LongUpcalls/Manager.cpp
deleted file mode 100644
index 562ff8f262c..00000000000
--- a/TAO/tests/LongUpcalls/Manager.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// $Id$
-//
-
-#include "Manager.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID (LongUpcalls,
- Manager,
- "$Id$")
-
-static void
-validate_connection (Test::Controller_ptr controller
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (())
-{
- ACE_TRY
- {
-#if (TAO_HAS_CORBA_MESSAGING == 1)
- CORBA::PolicyList_var unused;
- controller->_validate_connection (unused
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#else
- controller->_is_a ("Not_an_IDL_Type"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-}
-
-Manager::Manager (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Manager::start_workers (CORBA::Short worker_count,
- CORBA::Long milliseconds,
- Test::Controller_ptr controller
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_Thread_Manager thread_manager;
-
- validate_connection(controller
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "Starting %d workers\n", worker_count));
- Worker worker (&thread_manager,
- controller, milliseconds);
-
- worker.activate (THR_NEW_LWP | THR_JOINABLE, worker_count);
-
- thread_manager.wait ();
-}
-
-void
-Manager::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-
-// ****************************************************************
-
-Worker::Worker (ACE_Thread_Manager *thr_mgr,
- Test::Controller_ptr controller,
- CORBA::Long milliseconds)
- : ACE_Task_Base (thr_mgr)
- , controller_ (Test::Controller::_duplicate (controller))
- , milliseconds_ (milliseconds)
-{
-}
-
-int
-Worker::svc (void)
-{
- // ACE_DEBUG ((LM_DEBUG, "Worker starts\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- validate_connection(this->controller_.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->controller_->worker_started (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "Worker start reported\n"));
-
- ACE_Time_Value tv (0, 1000 * this->milliseconds_);
- ACE_OS::sleep (tv);
-
- this->controller_->worker_finished (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "Worker completion reported\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in svc() method\n");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/LongUpcalls/Manager.h b/TAO/tests/LongUpcalls/Manager.h
deleted file mode 100644
index 65e7934f00c..00000000000
--- a/TAO/tests/LongUpcalls/Manager.h
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef LONGUPCALLS_MANAGER_H
-#define LONGUPCALLS_MANAGER_H
-
-#include "TestS.h"
-#include "ace/Task.h"
-
-class Manager
- : public virtual POA_Test::Manager
-{
-public:
- Manager (CORBA::ORB_ptr orb);
- // Constructor
-
- // = The skeleton methods
- virtual void start_workers (CORBA::Short worker_count,
- CORBA::Long milliseconds,
- Test::Controller_ptr controller
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB, to shutdown
-};
-
-// ****************************************************************
-
-class Worker : public ACE_Task_Base
-{
-public:
- Worker (ACE_Thread_Manager *thr_mgr,
- Test::Controller_ptr controller,
- CORBA::Long milliseconds);
-
- virtual int svc (void);
- // The service method
-
-private:
- Test::Controller_var controller_;
- // The controller pointer
-
- CORBA::Long milliseconds_;
- // The number of milliseconds.
-};
-
-#endif /* LONGUPCALLS_MANAGER_H */
diff --git a/TAO/tests/LongUpcalls/Manager_Handler.cpp b/TAO/tests/LongUpcalls/Manager_Handler.cpp
deleted file mode 100644
index c1532a2eb86..00000000000
--- a/TAO/tests/LongUpcalls/Manager_Handler.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// $Id$
-//
-
-#include "Manager_Handler.h"
-
-ACE_RCSID(LongUpcalls, Manager_Handler, "$Id$")
-
-Manager_Handler::Manager_Handler (Test::Manager_ptr manager,
- Test::Controller_ptr controller)
- : manager_ (Test::Manager::_duplicate (manager))
- , controller_ (Test::Controller::_duplicate (controller))
-{
-}
-
-void
-Manager_Handler::start_workers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- this->manager_->start_workers (CORBA::Short(10),
- CORBA::Long(1000),
- this->controller_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception raised in nested start workers: ");
- }
- ACE_ENDTRY;
-}
-
-void
-Manager_Handler::start_workers_excep (::Messaging::ExceptionHolder * holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception raised in asynch start workers: ");
- }
- ACE_ENDTRY;
-}
-
diff --git a/TAO/tests/LongUpcalls/Manager_Handler.h b/TAO/tests/LongUpcalls/Manager_Handler.h
deleted file mode 100644
index 8ee1d472c2e..00000000000
--- a/TAO/tests/LongUpcalls/Manager_Handler.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef LONGUPCALLS_MANAGER_HANDLER_H
-#define LONGUPCALLS_MANAGER_HANDLER_H
-
-#include "TestS.h"
-#include "ace/Task.h"
-
-class Manager_Handler
- : public virtual POA_Test::AMI_ManagerHandler
-{
-public:
- Manager_Handler (Test::Manager_ptr manager,
- Test::Controller_ptr controller);
- // Constructor
-
- // = The skeleton methods
- virtual void start_workers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void start_workers_excep (::Messaging::ExceptionHolder *holder
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- Test::Manager_var manager_;
- // The manager to reissue the request from the context of the
- // upcall
-
- Test::Controller_var controller_;
- // The controller
-};
-
-#endif /* LONGUPCALLS_MANAGER_HANDLER_H */
diff --git a/TAO/tests/LongUpcalls/README b/TAO/tests/LongUpcalls/README
deleted file mode 100644
index 3e7e6a576b1..00000000000
--- a/TAO/tests/LongUpcalls/README
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
-
-@page Long Upcalls Test README File
-
- Verify that the ORB does not dead-lock, even in the presence
-of very long or unbounded upcalls. This is a regression test for:
-
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=175
-
- In the old days the leader thread would not allow any
-followers to take over while a long upcall or reply handler
-was running. This could produce deadlocks as in some cases the upcall
-may want for follower threads before returning.
-
- To execute the test simply run
-
-$ ./run_test.pl
-
- The test returns 0 on success.
-
-@section Known problems
-
- This test can also be used to verify that bug
-
-http://ace.cs.wustl.edu/bugzilla/show_bug.cgi?id=575
-
- is still unresolved, all you need to do is run the following
-programs:
-
-$ ./ami_server -ORBSvcConf svc.conf -o test.ior
-
-$ ./ami_client -ORBSvcConf svc.conf -k file://test.ior
-
- the client will deadlock.
-
-*/
diff --git a/TAO/tests/LongUpcalls/Test.idl b/TAO/tests/LongUpcalls/Test.idl
deleted file mode 100644
index 047bd3bde5f..00000000000
--- a/TAO/tests/LongUpcalls/Test.idl
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-module Test
-{
- interface Controller {
- void worker_started ();
- // A worker has started
-
- void worker_finished ();
- // A worker has finished
- };
-
- interface Manager {
- void start_workers (in short worker_count,
- in long milliseconds,
- in Controller the_controller);
- // Start <worker_count> workers, each one runs for the pescribed
- // number of milliseconds, and report progress to <the_controller>
-
- oneway void shutdown ();
- // Shutdown the Manager's ORB, just for cleanup purposes
- };
-};
diff --git a/TAO/tests/LongUpcalls/ami_client.cpp b/TAO/tests/LongUpcalls/ami_client.cpp
deleted file mode 100644
index e22153a203d..00000000000
--- a/TAO/tests/LongUpcalls/ami_client.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Controller.h"
-#include "Manager_Handler.h"
-
-ACE_RCSID(LongUpcalls, ami_client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Controller controller_impl;
-
- Test::Controller_var controller =
- controller_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Manager_var manager =
- Test::Manager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (manager.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Manager is nil\n"),
- 1);
-
- Manager_Handler handler_impl (manager.in (),
- controller.in ());
- Test::AMI_ManagerHandler_var handler =
- handler_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const CORBA::Short worker_count = 10;
- manager->sendc_start_workers (handler.in (),
- worker_count,
- CORBA::Long (1000),
- controller.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (30, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- controller_impl.dump_results ();
-
- manager->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/LongUpcalls/ami_server.cpp b/TAO/tests/LongUpcalls/ami_server.cpp
deleted file mode 100644
index ed7307129f9..00000000000
--- a/TAO/tests/LongUpcalls/ami_server.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "AMI_Manager.h"
-
-ACE_RCSID(LongUpcalls, ami_server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- AMI_Manager manager_impl (orb.in ());
-
- Test::Manager_var manager =
- manager_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (manager.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/LongUpcalls/blocking_client.cpp b/TAO/tests/LongUpcalls/blocking_client.cpp
deleted file mode 100644
index b914c957950..00000000000
--- a/TAO/tests/LongUpcalls/blocking_client.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Controller.h"
-
-ACE_RCSID(LongUpcalls, blocking_client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Controller controller_impl;
-
- Test::Controller_var controller =
- controller_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Manager_var manager =
- Test::Manager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (manager.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Manager is nil\n"),
- 1);
-
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const CORBA::Short worker_count = 10;
- manager->start_workers (worker_count,
- CORBA::Long (1000),
- controller.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- controller_impl.dump_results ();
-
- manager->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/LongUpcalls/blocking_server.cpp b/TAO/tests/LongUpcalls/blocking_server.cpp
deleted file mode 100644
index eb5c55c3bf0..00000000000
--- a/TAO/tests/LongUpcalls/blocking_server.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Manager.h"
-
-ACE_RCSID(LongUpcalls, blocking_server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Manager manager_impl (orb.in ());
-
- Test::Manager_var manager =
- manager_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (manager.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/LongUpcalls/run_test.pl b/TAO/tests/LongUpcalls/run_test.pl
deleted file mode 100755
index c02f3c6b708..00000000000
--- a/TAO/tests/LongUpcalls/run_test.pl
+++ /dev/null
@@ -1,128 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-$svcfile = PerlACE::LocalFile ("svc$PerlACE::svcconf_ext");
-
-$BSV = new PerlACE::Process ("blocking_server",
- "-ORBSvcConf $svcfile -o $iorfile");
-$ASV = new PerlACE::Process ("ami_server",
- "-ORBSvcConf $svcfile -o $iorfile");
-$BCL = new PerlACE::Process ("blocking_client",
- "-ORBSvcConf $svcfile -k file://$iorfile");
-$ACL = new PerlACE::Process ("ami_client",
- "-ORBSvcConf $svcfile -k file://$iorfile");
-
-print STDERR "==== Server upcall waits for operations on other threads\n";
-
-unlink $iorfile;
-
-$BSV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $BSV->Kill ();
- exit 1;
-}
-
-$client = $BCL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $BSV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-print STDERR "==== Server upcall waits for AMI operations on other threads\n";
-
-unlink $iorfile;
-$ASV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $ASV->Kill ();
- exit 1;
-}
-
-$client = $BCL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $ASV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-print STDERR "==== AMI Client, Server upcall waits for operations on other threads\n";
-
-unlink $iorfile;
-$BSV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $BSV->Kill ();
- exit 1;
-}
-
-$client = $ACL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $BSV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-print STDERR "==== AMI Client, Server upcall waits AMI operations\n";
-
-unlink $iorfile;
-$ASV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $ASV->Kill ();
- exit 1;
-}
-
-$client = $ACL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $ASV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/LongUpcalls/svc.conf b/TAO/tests/LongUpcalls/svc.conf
deleted file mode 100644
index f04d979d03e..00000000000
--- a/TAO/tests/LongUpcalls/svc.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# $Id$
-#
-static Resource_Factory "-ORBFlushingStrategy blocking"
-static Client_Strategy_Factory "-ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED"
diff --git a/TAO/tests/LongUpcalls/svc.conf.xml b/TAO/tests/LongUpcalls/svc.conf.xml
deleted file mode 100644
index 8fb8581c2a0..00000000000
--- a/TAO/tests/LongUpcalls/svc.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/LongUpcalls/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="Resource_Factory" params="-ORBFlushingStrategy blocking"/>
- <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/MProfile/.cvsignore b/TAO/tests/MProfile/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/MProfile/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/MProfile/MProfile.mpc b/TAO/tests/MProfile/MProfile.mpc
deleted file mode 100644
index e48d767fd5c..00000000000
--- a/TAO/tests/MProfile/MProfile.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iormanip {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, iormanip {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/MProfile/README b/TAO/tests/MProfile/README
deleted file mode 100644
index cb231703e4f..00000000000
--- a/TAO/tests/MProfile/README
+++ /dev/null
@@ -1,29 +0,0 @@
-This program tests fundamentals of TAO's ORB fault tolerance by
-merging multiple profiles in a single object reference.
-
-Run the application as follows.
-
-$ server -o (file_name1) -ORBEndpoint iiop://localhost:10007
-$ server -o (file_name2) -ORBEndpoint iiop://localhost:10008
-$ client -k file://file_name1 -m file://file_name2
-(When a message "Kill primray " appears on screen, kill the server
-exhibiting the IOR in file with name "file_name1". )
-
-Test purpose:
-
-This is a test to see whether we generate exceptions as per the
-spec. When we loose connection with a connected server, the ORB would
-throw a COMM_FAILURE exception. This is platform dependent. One
-wouldn't see this on NT. The reason for this is the way TCP has been
-been implemented on NT & Solaris. I am not going in to the details for
-this behaviour. TRANSIENT exceptions are thrown when the ORB has
-tried all the object references it has and is not able to establish
-connection with any of them (TRANSIENT exceptions are also thrown for
-few other cases, but here the test is for the case that has been
-mentioned above).
-
-Comments:
-========
-
-- The run exhibits different behaviours on SUN and NT
-
diff --git a/TAO/tests/MProfile/client.cpp b/TAO/tests/MProfile/client.cpp
deleted file mode 100644
index b25b828894c..00000000000
--- a/TAO/tests/MProfile/client.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-// $Id$
-
-#include "tao/IORManipulation/IORManip_Loader.h"
-#include "ace/SString.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "testC.h"
-
-ACE_RCSID(MT_Server, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int do_shutdown = 0;
-
-const char *name = "file://amba.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:m:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'm':
- name = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-void
-run_test (Simple_Server_ptr server
- ACE_ENV_ARG_DECL);
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Primary server
- CORBA::Object_var object_primary =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- //Secondary server
- CORBA::Object_var object_secondary =
- orb->string_to_object (name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get an object reference for the ORBs IORManipultion object!
- CORBA::Object_ptr IORM =
- orb->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_IOP::TAO_IOR_Manipulation_ptr iorm =
- TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
- iors.length(2);
- iors [0] = object_primary;
- iors [1] = object_secondary;
-
- CORBA::Object_var merged = iorm->merge_iors (iors ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Combined IOR stuff
- Simple_Server_var server =
- Simple_Server::_narrow (merged.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught an exception \n");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-void run_test (Simple_Server_ptr server
- ACE_ENV_ARG_DECL)
-{
- for (int loop = 0; loop < 10; loop++)
- {
- ACE_TRY
- {
- // Make a remote call
- CORBA::Long ret =
- server->remote_call (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_UNUSED_ARG (ret);
-
- ACE_OS::sleep (25);
- }
- ACE_CATCH (CORBA::TRANSIENT, t)
- {
- if (t.completed () != CORBA::COMPLETED_NO)
- {
- ACE_PRINT_EXCEPTION (t, "Unexpected kind of TRANSIENT");
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "The completed status %d\n", t.completed ()));
- ACE_DEBUG ((LM_DEBUG,
- "Automagically re-issuing request on TRANSIENT\n"));
- ACE_OS::sleep (1);
- }
- }
- ACE_CATCH (CORBA::COMM_FAILURE, f)
- {
- ACE_PRINT_EXCEPTION (f, "A (sort of) expected COMM_FAILURE");
- ACE_DEBUG ((LM_DEBUG,
- "Automagically re-issuing request on COMM_FAILURE\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception");
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-}
diff --git a/TAO/tests/MProfile/server.cpp b/TAO/tests/MProfile/server.cpp
deleted file mode 100644
index 12aea589a09..00000000000
--- a/TAO/tests/MProfile/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(MT_Client, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_OS::sleep (5);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MProfile/test.idl b/TAO/tests/MProfile/test.idl
deleted file mode 100644
index a87da7f07d6..00000000000
--- a/TAO/tests/MProfile/test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * $Id$
- */
-
-interface Simple_Server
-{
- long remote_call ();
- oneway void shutdown ();
-};
diff --git a/TAO/tests/MProfile/test_i.cpp b/TAO/tests/MProfile/test_i.cpp
deleted file mode 100644
index 8135b51217d..00000000000
--- a/TAO/tests/MProfile/test_i.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID(MT_Client, test_i, "$Id$")
-
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- val_ (1)
-{
-}
-
-Simple_Server_i::Simple_Server_i (void)
- : orb_ (0)
-{
- // no-op
-}
-
-CORBA::Long
-Simple_Server_i::remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Print out from process id (%P) hosting the servant \n"));
-
- return this->val_++;
-}
-
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/MProfile/test_i.h b/TAO/tests/MProfile/test_i.h
deleted file mode 100644
index f6d4df6ebee..00000000000
--- a/TAO/tests/MProfile/test_i.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Mprofile
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_MPROFILE_TEST_I_H
-#define TAO_MPROFILE_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- Simple_Server_i (void);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
- CORBA::Long val_;
-
-};
-
-#endif /* TAO_MPROFILE_TEST_I_H */
diff --git a/TAO/tests/MProfile_Connection_Timeout/.cvsignore b/TAO/tests/MProfile_Connection_Timeout/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc b/TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc
deleted file mode 100644
index e4abfd734d6..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/MProfile_Connection_Timeout.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging, iormanip {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging, iormanip {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/MProfile_Connection_Timeout/README b/TAO/tests/MProfile_Connection_Timeout/README
deleted file mode 100644
index 85dc6e4d7ed..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/README
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
-
-@page MProfile_Connection_Tiemout Test README File
-
- The simplest possible test for connection timeouts across
-multiple profiles aka BUGID 1284. The aim of this test is to
-see whether TAO client fails over to the next profile if a connection
-timeout policy is set. If connection_timeout policy is set and if the
-client is not anle to establish connection using one of the profiles,
-the client should fail over to the next profile seamlessly. The test
-has been constructed to check for this feature.
-
- Please refrain from "improving", extending or expanding this
-test.
-
-@todo: We need to write a MT test for this feature.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/MProfile_Connection_Timeout/client.cpp b/TAO/tests/MProfile_Connection_Timeout/client.cpp
deleted file mode 100644
index 5425b2e0ddd..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/client.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// $Id$
-
-#include "tao/IORManipulation/IORManip_Loader.h"
-#include "ace/SString.h"
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "tao/TimeBaseC.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(MProfile_Connection_Timeout,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-int do_shutdown = 0;
-
-const char *name = "file://amba.ior";
-TimeBase::TimeT timeout_period = 1000000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:m:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'm':
- name = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-CORBA::ULongLong
-run_test (Simple_Server_ptr server
- ACE_ENV_ARG_DECL);
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Primary server
- CORBA::Object_var object_primary =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- //Secondary server
- CORBA::Object_var object_secondary =
- orb->string_to_object (name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get an object reference for the ORBs IORManipultion object!
- CORBA::Object_ptr IORM =
- orb->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_IOP::TAO_IOR_Manipulation_ptr iorm =
- TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
- iors.length(2);
- iors [0] = object_primary;
- iors [1] = object_secondary;
-
- CORBA::Object_var merged = iorm->merge_iors (iors ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- CORBA::Any timeout_as_any;
- timeout_as_any <<= timeout_period;
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
-
- policy_list[0] =
- orb->create_policy (TAO::CONNECTION_TIMEOUT_POLICY_TYPE,
- timeout_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- for (CORBA::ULong l = 0;
- l != policy_list.length ();
- ++l)
- {
- policy_list[l]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Combined IOR stuff
- Simple_Server_var server =
- Simple_Server::_narrow (merged.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- CORBA::ULongLong freq =
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (freq != 919263)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) ERROR in the test \n")));
-
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Shutting server down \n")));
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught an exception \n");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-CORBA::ULongLong
-run_test (Simple_Server_ptr server
- ACE_ENV_ARG_DECL)
-{
- return server->remote_call (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
diff --git a/TAO/tests/MProfile_Connection_Timeout/run_test.pl b/TAO/tests/MProfile_Connection_Timeout/run_test.pl
deleted file mode 100755
index b0eaed5b425..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/run_test.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile1 = PerlACE::LocalFile ("server1.ior");
-$iorfile2 = PerlACE::LocalFile ("server2.ior");
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV1 = new PerlACE::ProcessVX ("server", "-o server1.ior");
-}
-else {
- $SV1 = new PerlACE::Process ("server", "-o $iorfile1");
-}
-$SV2 = new PerlACE::Process ("server", "-o $iorfile2 -r");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile1 -m file://$iorfile2");
-
-$SV1->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile1,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile1>\n";
- $SV1->Kill (); $SV1->TimedWait (1);
- exit 1;
-}
-
-$SV2->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile2,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV2->Kill (); $SV2->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server1 = $SV1->WaitKill (10);
-
-$server2 = $SV2->WaitKill (10);
-if ($server2 != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-unlink $iorfile1;
-unlink $iorfile2;
-
-exit $status;
diff --git a/TAO/tests/MProfile_Connection_Timeout/server.cpp b/TAO/tests/MProfile_Connection_Timeout/server.cpp
deleted file mode 100644
index 9daac4d75f7..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/server.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(MProfile_Connection_Timeout,
- server,
- "$Id$")
-
-const char *ior_output_file = 0;
-int orb_run = 0;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:r");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case 'r':
- orb_run = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
-
- // RUn the event loop if needed
- if (orb_run)
- {
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MProfile_Connection_Timeout/test.idl b/TAO/tests/MProfile_Connection_Timeout/test.idl
deleted file mode 100644
index bcb13ea9378..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * $Id$
- */
-
-interface Simple_Server
-{
- unsigned long long remote_call ();
- oneway void shutdown ();
-};
diff --git a/TAO/tests/MProfile_Connection_Timeout/test_i.cpp b/TAO/tests/MProfile_Connection_Timeout/test_i.cpp
deleted file mode 100644
index a2fccc999ef..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/test_i.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID(MProfile_Connection_Timeout,
- test_i,
- "$Id$")
-
-// part of the famous caesium 133 atom transition for a
-// second. Cannot represent the last part since the value gets out of
-// range.
-const CORBA::ULong freq = 919263;
-
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- val_ (1)
-{
-}
-
-Simple_Server_i::Simple_Server_i (void)
- : orb_ (0)
-{
- // no-op
-}
-
-CORBA::ULongLong
-Simple_Server_i::remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Print out from process id (%P) hosting the servant \n"));
-
- return freq;
-}
-
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/MProfile_Connection_Timeout/test_i.h b/TAO/tests/MProfile_Connection_Timeout/test_i.h
deleted file mode 100644
index b9ce049710b..00000000000
--- a/TAO/tests/MProfile_Connection_Timeout/test_i.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/MProfile_Connection_Timeout
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-//
-// ============================================================================
-
-#ifndef TAO_MPROFILE_CONNECTION_TIMEOUT_TEST_I_H
-#define TAO_MPROFILE_CONNECTION_TIMEOUT_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- Simple_Server_i (void);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::ULongLong remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
- CORBA::Long val_;
-
-};
-
-#endif /* TAO_MPROFILE_CONNECTION_TIMEOUT_TEST_I_H */
diff --git a/TAO/tests/MProfile_Forwarding/.cvsignore b/TAO/tests/MProfile_Forwarding/.cvsignore
deleted file mode 100644
index 74e19e1c1de..00000000000
--- a/TAO/tests/MProfile_Forwarding/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Manager
-client
-server
diff --git a/TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc b/TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc
deleted file mode 100644
index d6f4df5acc4..00000000000
--- a/TAO/tests/MProfile_Forwarding/MProfile_Forwarding.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, minimum_corba {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode, minimum_corba {
- exename = client
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
-project(*Manager): taoserver, minimum_corba, iormanip {
- exename = manager
- after += *Client
- Source_Files {
- testC.cpp
- Servant_Locator.cpp
- Manager.cpp
- }
-}
diff --git a/TAO/tests/MProfile_Forwarding/Manager.cpp b/TAO/tests/MProfile_Forwarding/Manager.cpp
deleted file mode 100644
index 7336bc42523..00000000000
--- a/TAO/tests/MProfile_Forwarding/Manager.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-//$Id$
-#include "Manager.h"
-
-#include "tao/IORManipulation/IORManip_Loader.h"
-
-#include "ace/SString.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-const char *first_ior = 0;
-const char *second_ior = 0;
-const char *third_ior = 0;
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "a:b:c:d:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'a':
- first_ior = get_opts.opt_arg ();
- break;
- case 'b':
- second_ior = get_opts.opt_arg ();
- break;
- case 'c':
- third_ior = get_opts.opt_arg ();
- break;
- case 'd':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-a <iorfile>"
- "-b <iorfile>"
- "-c <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int
-main (int argc,
- char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- Manager manager;
-
- ACE_TRY
- {
- // Initilaize the ORB, POA etc.
- manager.init (argc,
- argv
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) == -1)
- return -1;
-
- manager.activate_servant (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- manager.make_iors_register (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- manager.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-Manager::Manager (void)
- :orb_ (0),
- new_poa_var_ (0)
-{
- //no-op
-}
-
-int
-Manager::init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Obtain the RootPOA.
- CORBA::Object_var obj_var =
- this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa_var =
- PortableServer::POA::_narrow (obj_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager_var =
- root_poa_var->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- poa_manager_var->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (4);
- policies.length (4);
-
- // The next two policies are common to both
- // Id Assignment Policy
- policies[0] =
- root_poa_var->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Lifespan policy
- policies[1] =
- root_poa_var->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Tell the POA to use a servant manager
- policies[2] =
- root_poa_var->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Servant Retention Policy -> Use a locator
- policies[3] =
- root_poa_var->create_servant_retention_policy (PortableServer::NON_RETAIN
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_CString name = "newPOA";
-
- new_poa_var_ =
- root_poa_var->create_POA (name.c_str (),
- poa_manager_var.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Creation of childPOAs is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- CORBA::Policy_ptr policy = policies[i];
- policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- return 0;
-}
-
-
-int
-Manager::activate_servant (ACE_ENV_SINGLE_ARG_DECL)
-{
-
- ACE_NEW_THROW_EX (this->servant_locator_,
- Servant_Locator (this->orb_.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (-1);
-
- this->servant_locator_var_ = this->servant_locator_;
-
- // Set ServantLocator object as the servant Manager of
- // secondPOA.
- this->new_poa_var_->set_servant_manager (this->servant_locator_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Try to create a reference with user created ID in new_poa
- // which uses ServantLocator.
-
- PortableServer::ObjectId_var second_foo_oid_var =
- PortableServer::string_to_ObjectId ("Simple_Server");
-
- this->new_manager_ior_ =
- new_poa_var_->create_reference_with_id (second_foo_oid_var.in (),
- "IDL:Simple_Server:1.0" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-
-int
-Manager::make_iors_register (ACE_ENV_SINGLE_ARG_DECL)
-{
- // First server
- CORBA::Object_var object_primary =
- this->orb_->string_to_object (first_ior
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- //Second server
- CORBA::Object_var object_secondary =
- this->orb_->string_to_object (second_ior
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (third_ior == 0)
- ACE_DEBUG ((LM_DEBUG,
- "Here is the culprit \n"));
- // Third Server
- CORBA::Object_var object_tertiary =
- this->orb_->string_to_object (third_ior
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get an object reference for the ORBs IORManipultion object!
- CORBA::Object_ptr IORM =
- this->orb_->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO_IOP::TAO_IOR_Manipulation_ptr iorm =
- TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-
- // Create the list
- TAO_IOP::TAO_IOR_Manipulation::IORList iors (3);
- iors.length(3);
- iors [0] = CORBA::Object::_duplicate (object_primary.in ());
- iors [1] = CORBA::Object::_duplicate (object_secondary.in ());
- iors [2] = CORBA::Object::_duplicate (this->new_manager_ior_.in ());
-
- // Create a merged set 1;
- CORBA::Object_var merged_set1 =
- iorm->merge_iors (iors ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (object_secondary.in () == 0)
- ACE_DEBUG ((LM_DEBUG,
- " There is a problem 1 "));
-
- if (object_tertiary.in () == 0)
- ACE_DEBUG ((LM_DEBUG,
- " There is a problem \n"));
-
- TAO_IOP::TAO_IOR_Manipulation::IORList iors_again (3);
- iors_again.length(3);
- iors_again [0] = CORBA::Object::_duplicate (object_secondary.in ());
- iors_again [1] = CORBA::Object::_duplicate (object_tertiary.in ());
- iors_again [2] = CORBA::Object::_duplicate (this->new_manager_ior_.in ());
-
- // Create merged set 2
- CORBA::Object_var merged_set2 =
- iorm->merge_iors (iors_again ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::String_var iorref1 =
- this->orb_->object_to_string (merged_set1.in ());
-
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", iorref1.in ());
- ACE_OS::fclose (output_file);
- }
-
- this->servant_locator_->set (merged_set2);
-
- return 0;
-}
-
-
-int
-Manager::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/MProfile_Forwarding/Manager.h b/TAO/tests/MProfile_Forwarding/Manager.h
deleted file mode 100644
index 6f14588b3a3..00000000000
--- a/TAO/tests/MProfile_Forwarding/Manager.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//$Id$
-#ifndef _MANAGER_H_
-#define _MANAGER_H_
-
-#include "Servant_Locator.h"
-
-class Manager
-{
- public:
-
- Manager (void);
-
- // Ctor
-
- int init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL);
-
- // Initialize the ORB, POA etc.
-
- int init_register_name_service (ACE_ENV_SINGLE_ARG_DECL);
- // Initialize the Name service, tegister the combined IOR with it
-
- int activate_servant (ACE_ENV_SINGLE_ARG_DECL);
- // Activate the servant etc.
-
- int make_iors_register (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
-
- int run (ACE_ENV_SINGLE_ARG_DECL);
- // Run the ORB event loop..
- private:
- CORBA::ORB_var orb_;
- // Our ORB
-
- PortableServer::POA_var new_poa_var_;
- // The new poa that is created..
-
- Servant_Locator *servant_locator_;
- // Our servant locator
-
- PortableServer::ServantLocator_var servant_locator_var_;
- // Our servant locator var
-
- CORBA::Object_var new_manager_ior_;
-};
-#endif /*_MANAGER_H_ */
diff --git a/TAO/tests/MProfile_Forwarding/README b/TAO/tests/MProfile_Forwarding/README
deleted file mode 100644
index 518d6d7ec14..00000000000
--- a/TAO/tests/MProfile_Forwarding/README
+++ /dev/null
@@ -1,56 +0,0 @@
-This test evalutes ORB fault tolerance support, based on one of the
-problems that was reported by the DOORS team at Lucent. The test is
-aimed at testing the following scenario.
-
-1. We will have three copies of the same server running. Let me call
- them as ref1, ref2 & ref3.
-
-2. We will have a manager application which does the following. Hosts
- a POA with the policies set for a Servant_Locator. Then it creates
- the reference on that and does the following
-
- a. A merged IOR with ref1, ref2 & the reference of the manager
- b. A merged IOR with ref2, ref3 & the reference of the manager.
-
- It publishes/writes the merged IOR from 'a.' in to a file. It uses the IOR
- created out of 'b' to throw a ForwardRequest exception.
-
-3. The client starts by reading the IOR written to a file by the
- Manager, that was created by 2a. The client basically makes a remote
- call and a shutdown call on the remote objects in a loop ie. multiple times.
-
- a. When the first call is made, the call is responded by the server who published
- ref1. He is then shutdown.
- b. On the second call, the call is answered by the server who published ref2. he
- is also shutdown next.
- c. On the third call, the call first comes to the preinvoke () method in the
- Locator class who throws the ForwardRequest exception with the IOR created in
- 2b.
- d. After the exception is thrown the calls get resolved on the server
- who published ref3. He is also shutdown next.
-
-The above sequence SHOULD be seen to consider the test as being
-succesfull.
-
-To run the test
----------------
-
-* Start three copies of the server like this
-
- $ ./server -o file1.ior
- $ ./server -o file2.ior
- $ ./server -o file3.ior
-
-* Then start the Manager like this
-
- $ ./Manager -a file://file1.ior -b file://file2.ior -c \
- file://file3.ior -d file4.ior
-
- (The above should be on the same line in the command prompt. The
- file4.ior is for publishing the first merged IOR (refer step 2.a).
-
-* The start the client like this
-
- $ ./client -o file://file4.ior
-
-
diff --git a/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp b/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp
deleted file mode 100755
index fc690fa5cf4..00000000000
--- a/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Forwarding/Servant_Locator
-//
-// = FILENAME
-// Servant_Locator.cpp
-//
-// = DESCRIPTION
-// Implementation of MyFooServantLocator class , used with a POA
-// having a NON_RETAIN policy.
-//
-// = AUTHOR
-// Irfan Pyarali
-// Michael Kircher
-//
-// ============================================================================
-
-#include "Servant_Locator.h"
-#include "ace/Log_Msg.h"
-#include "testC.h"
-#include "ace/OS_NS_string.h"
-
-
-ACE_RCSID(Forwarding, Servant_Locator, "$Id$")
-
-Servant_Locator::Servant_Locator (CORBA::ORB_ptr orb_ptr)
-
- : orb_var_ (CORBA::ORB::_duplicate (orb_ptr))
-{
- // no-op
-}
-
-Servant_Locator::~Servant_Locator ()
-{
- //delete servant_ptr_;
-}
-
-
-PortableServer::Servant
-Servant_Locator::preinvoke (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr /* poa_ptr */,
- const char * /*operation*/,
- PortableServer::ServantLocator::Cookie & /* cookie */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest))
-{
-
- CORBA::String_var s = PortableServer::ObjectId_to_string (oid);
-
- ACE_DEBUG ((LM_DEBUG,
- "The OID is <%s> \n", s.in ()));
- if (ACE_OS::strstr (s.in (), "Simple_Server") == 0)
- {
- ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0);
- }
-
- // Combined IOR stuff
- Simple_Server_var server =
- Simple_Server::_narrow (this->objref_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- ACE_DEBUG ((LM_DEBUG,
- "Got the narrowed secondary server too... \n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "About to throw exception.. \n"));
-
- ACE_THROW_RETURN (PortableServer::ForwardRequest (
- CORBA::Object::_duplicate (server.in ())),
- 0);
-
-}
-
-void
-Servant_Locator::postinvoke (const PortableServer::ObjectId &,
- PortableServer::POA_ptr ,
- const char *,
- PortableServer::ServantLocator::Cookie ,
- PortableServer::Servant
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Servant_Locator::set (CORBA::Object_var objref)
-{
- this->objref_ = CORBA::Object::_duplicate (objref.in ());
-}
diff --git a/TAO/tests/MProfile_Forwarding/Servant_Locator.h b/TAO/tests/MProfile_Forwarding/Servant_Locator.h
deleted file mode 100755
index ac226fda180..00000000000
--- a/TAO/tests/MProfile_Forwarding/Servant_Locator.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id$
-
-// ================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Forwarding/Servant_Locator
-//
-// = FILENAME
-// Servant_Locator.h
-//
-// = DESCRIPTION
-// Defines a MyFooServantLocator class , used with a POA having
-// a NON_RETAIN policy
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ================================================================
-
-#ifndef _SERVANT_LOCATOR_H_
-#define _SERVANT_LOCATOR_H_
-
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/PortableServer/ServantLocatorC.h"
-#include "tao/ORB.h"
-
-class Servant_Locator : public PortableServer::ServantLocator
-{
- // = TITLE
- // This class is used by a POA with USE_SERVANT_MANAGER and
- // NON_RETAIN policy.
-public:
- Servant_Locator (CORBA::ORB_ptr orb_ptr);
-
- // constructor
-
- ~Servant_Locator ();
-
- virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr adapter,
- const char *operation,
- PortableServer::ServantLocator::Cookie &the_cookie
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest));
- // This method is invoked by a POA whenever it receives a request
- // for MyFoo object that is not currently active.
-
- virtual void postinvoke (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr adapter,
- const char *operation,
- PortableServer::ServantLocator::Cookie the_cookie,
- PortableServer::Servant the_servant
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // This method is invoked whenever a MyFooServant completes a
- // request.
-
- void set (CORBA::Object_var obj);
- // To be removed..
-
- private:
- CORBA::ORB_var orb_var_;
-
- CORBA::Object_var objref_;
- // To be removed
-};
-
-#endif /* _SERVANT_LOCATOR_H */
diff --git a/TAO/tests/MProfile_Forwarding/client.cpp b/TAO/tests/MProfile_Forwarding/client.cpp
deleted file mode 100644
index 610899838a9..00000000000
--- a/TAO/tests/MProfile_Forwarding/client.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// $Id$
-
-#include "ace/SString.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "testC.h"
-
-ACE_RCSID(MT_Server, client, "$Id$")
-
-const char *ior_input_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_input_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-void
-run_test (Simple_Server_ptr server
- ACE_ENV_ARG_DECL);
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) == -1)
- return -1;
-
- CORBA::Object_var objref =
- orb->string_to_object (ior_input_file);
- ACE_TRY_CHECK;
-
- if (objref.in () == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "The received objref is NULL \n"),
- -1);
- }
-
- Simple_Server_var server =
- Simple_Server::_narrow (objref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference is nil\n"),
- -1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught an exception \n");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-void run_test (Simple_Server_ptr server
- ACE_ENV_ARG_DECL)
-{
- for (int loop = 0; loop < 10; loop++)
- {
- ACE_TRY
- {
- ACE_DEBUG ((LM_DEBUG,
- "About to make remote call \n"));
- ACE_OS::sleep (2);
-
- // Make a remote call
- server->remote_call (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /*ACE_DEBUG ((LM_DEBUG,
- "Kill the primary . . . "));
- ACE_OS::sleep (25);
- ACE_DEBUG ((LM_DEBUG, " hope you did\n")); */
- ACE_DEBUG ((LM_DEBUG,
- "I am going to shutdown \n"));
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_OS::sleep (23);
- }
- ACE_CATCH (CORBA::UserException, x)
- {
- ACE_PRINT_EXCEPTION (x, "Caught an ");
- }
- ACE_CATCH (CORBA::TRANSIENT, t)
- {
- ACE_PRINT_EXCEPTION (t, "Caught Exception");
- }
- ACE_CATCH (CORBA::COMM_FAILURE, f)
- {
- ACE_PRINT_EXCEPTION (f, "A (sort of) expected COMM_FAILURE");
- ACE_DEBUG ((LM_DEBUG,
- "Automagically re-issuing request on COMM_FAILURE\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception");
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-}
diff --git a/TAO/tests/MProfile_Forwarding/server.cpp b/TAO/tests/MProfile_Forwarding/server.cpp
deleted file mode 100755
index 04c27ae739f..00000000000
--- a/TAO/tests/MProfile_Forwarding/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(MT_Client, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_OS::sleep (5);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MProfile_Forwarding/test.idl b/TAO/tests/MProfile_Forwarding/test.idl
deleted file mode 100755
index 1f1e6389faf..00000000000
--- a/TAO/tests/MProfile_Forwarding/test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * $Id$
- */
-
-interface Simple_Server
-{
- void remote_call ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/MProfile_Forwarding/test_i.cpp b/TAO/tests/MProfile_Forwarding/test_i.cpp
deleted file mode 100644
index 2cd5a649db2..00000000000
--- a/TAO/tests/MProfile_Forwarding/test_i.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(MT_Client, test_i, "$Id$")
-
-Simple_Server_i::Simple_Server_i (void)
- :orb_ (0)
-{
- // no-op
-}
-
-void
-Simple_Server_i::remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Print out from process id (%P) hosting the servant \n"));
-}
-
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/MProfile_Forwarding/test_i.h b/TAO/tests/MProfile_Forwarding/test_i.h
deleted file mode 100644
index 8c13fba4b4e..00000000000
--- a/TAO/tests/MProfile_Forwarding/test_i.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Balachandran Natarajan
-//
-// ============================================================================
-
-#ifndef MPROFILE_FORWARDING_TEST_I_H
-#define MPROFILE_FORWARDING_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
-
- // ctor
-
- Simple_Server_i (void);
- // ctor
-
- // = The Simple_Server methods.
- void remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
- CORBA::ORB_var orb_;
-
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_MT_CLIENT_TEST_I_H */
diff --git a/TAO/tests/MProfile_Forwarding/test_i.i b/TAO/tests/MProfile_Forwarding/test_i.i
deleted file mode 100755
index b11bb431e1f..00000000000
--- a/TAO/tests/MProfile_Forwarding/test_i.i
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
-
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/MT_BiDir/.cvsignore b/TAO/tests/MT_BiDir/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/MT_BiDir/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/MT_BiDir/Client_Task.cpp b/TAO/tests/MT_BiDir/Client_Task.cpp
deleted file mode 100644
index 58b598b90e1..00000000000
--- a/TAO/tests/MT_BiDir/Client_Task.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Muxing, Client_Task, "Client_Task.cpp,v 1.1 2001/03/10 23:37:42 coryan Exp")
-
-Client_Task::Client_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
- {
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- // Wait for 2 minutes...
- ACE_Time_Value tv (60,0);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "(%P|%t) Client_Task::svc exception!!!\n");
-
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/MT_BiDir/Client_Task.h b/TAO/tests/MT_BiDir/Client_Task.h
deleted file mode 100644
index 4b8f586e00a..00000000000
--- a/TAO/tests/MT_BiDir/Client_Task.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef MT_BIDIR__CLIENT_TASK_H
-#define MT_BIDIR_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 experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* MT_BIDIR_CLIENT_TASK_H */
diff --git a/TAO/tests/MT_BiDir/MT_BiDir.mpc b/TAO/tests/MT_BiDir/MT_BiDir.mpc
deleted file mode 100644
index ab023c419a3..00000000000
--- a/TAO/tests/MT_BiDir/MT_BiDir.mpc
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver, minimum_corba, bidir_giop {
- Source_Files {
- ReceiverC.cpp
- SenderC.cpp
- SenderS.cpp
- Sender_i.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver, minimum_corba, bidir_giop {
- after += *Server
- Source_Files {
- ReceiverC.cpp
- ReceiverS.cpp
- SenderC.cpp
- Client_Task.cpp
- Receiver_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/MT_BiDir/README b/TAO/tests/MT_BiDir/README
deleted file mode 100644
index d836ac886ec..00000000000
--- a/TAO/tests/MT_BiDir/README
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
-
-@page MT_BiDir Test README File
-
- This is a stress test that exercises the birectional GIOP
-connection implementation with multiple threads in TAO.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
-
-
-
diff --git a/TAO/tests/MT_BiDir/Receiver.idl b/TAO/tests/MT_BiDir/Receiver.idl
deleted file mode 100644
index b8e7383670e..00000000000
--- a/TAO/tests/MT_BiDir/Receiver.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// $Id$
-//
-
-interface Receiver
-{
- typedef sequence<octet> Payload;
-
- /// A simple remote call
- void receive_payload (in Receiver::Payload pay);
-};
diff --git a/TAO/tests/MT_BiDir/Receiver_i.cpp b/TAO/tests/MT_BiDir/Receiver_i.cpp
deleted file mode 100644
index 5a3909f7a26..00000000000
--- a/TAO/tests/MT_BiDir/Receiver_i.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// $Id$
-//
-#include "Receiver_i.h"
-
-ACE_RCSID(MT_BiDir,
- Receiver_i,
- "$Id$")
-
-Receiver_i::Receiver_i (void)
- : message_count_ (0)
- , byte_count_ (0)
-{
-}
-
-
-void
-Receiver_i::receive_payload (const Receiver::Payload &payload
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- this->message_count_++;
- this->byte_count_ += payload.length ();
-}
-
-CORBA::Long
-Receiver_i::get_event_count (void)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
- return this->message_count_;
-}
diff --git a/TAO/tests/MT_BiDir/Receiver_i.h b/TAO/tests/MT_BiDir/Receiver_i.h
deleted file mode 100644
index 189191d7861..00000000000
--- a/TAO/tests/MT_BiDir/Receiver_i.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef MT_BIDIR_RECEIVER_I_H
-#define MT_BIDIR_RECEIVER_I_H
-#include /**/ "ace/pre.h"
-
-#include "ReceiverS.h"
-
-/**
- * Simply print count how many bytes were received.
- */
-class Receiver_i
- : public virtual POA_Receiver
-{
-public:
- /// Constructor
- Receiver_i (void);
-
-
- /// Get the number of events that have been received, local method
- CORBA::Long get_event_count (void);
-
- // = The skeleton methods
- virtual void receive_payload (const Receiver::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- TAO_SYNCH_MUTEX mutex_;
- CORBA::ULong message_count_;
- CORBA::ULong byte_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* MUXING_RECEIVER_H */
diff --git a/TAO/tests/MT_BiDir/Sender.idl b/TAO/tests/MT_BiDir/Sender.idl
deleted file mode 100644
index 9aa036f3327..00000000000
--- a/TAO/tests/MT_BiDir/Sender.idl
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// $Id$
-//
-#include "Receiver.idl"
-
-interface Sender
-{
-
- exception Table_Full {};
-
- /// Receive the Receiver object and return a id for the object.
- long receiver_object (in Receiver recv)
- raises (Table_Full);
-};
diff --git a/TAO/tests/MT_BiDir/Sender_i.cpp b/TAO/tests/MT_BiDir/Sender_i.cpp
deleted file mode 100644
index 780f39d18ad..00000000000
--- a/TAO/tests/MT_BiDir/Sender_i.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "Sender_i.h"
-#include "ace/Manual_Event.h"
-
-
-ACE_RCSID(MT_BiDir,
- Sender_i,
- "$Id$")
-
-
-Sender_i::Sender_i (int no_clients,
- ACE_Manual_Event &event)
- : event_ (event)
- , receivers_ (0)
- , no_clients_ (no_clients)
- , last_index_ (0)
- , payload_ (32768)
-{
- this->receivers_ =
- new Receiver *[no_clients * sizeof (Receiver_ptr)];
- /*ACE_NEW (this->receivers_,
- Receiver ** [no_clients * sizeof Receiver *]);*/
-
- // Okay to have a magic number...
- this->payload_.length (32768);
-
- for (CORBA::ULong j = 0; j != this->payload_.length (); ++j)
- this->payload_[j] = (j % 256);
-}
-
-
-CORBA::Long
-Sender_i::receiver_object (Receiver_ptr recv
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Sender::Table_Full))
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
- ace_mon,
- this->mutex_,-1);
-
- if (this->no_clients_ == this->last_index_)
- ACE_THROW_RETURN (Sender::Table_Full (),
- -1);
-
- this->receivers_[this->last_index_] =
- Receiver::_duplicate (recv);
-
- ++this->last_index_;
-
- if (this->last_index_ == this->no_clients_)
- {
- this->event_.signal ();
- }
-
- return this->last_index_;
-}
-
-
-void
-Sender_i::send_message (ACE_ENV_SINGLE_ARG_DECL)
-{
- // NOTE:No synchronization with purpose. Synchrnozing this is
- // going to spoil the whole purpose of this test.
- int send_to =
- ACE_OS::rand () % this->no_clients_;
-
- this->receivers_[send_to]->receive_payload (this->payload_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/MT_BiDir/Sender_i.h b/TAO/tests/MT_BiDir/Sender_i.h
deleted file mode 100644
index 91b4b729db0..00000000000
--- a/TAO/tests/MT_BiDir/Sender_i.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef MT_BIDIR_RECEIVER_H
-#define MT_BIDIR_RECEIVER_H
-#include /**/ "ace/pre.h"
-
-#include "SenderS.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/**
- * Simply print count how many bytes were received.
- */
-class Sender_i
- : public virtual POA_Sender
-{
-public:
- /// Constructor
- Sender_i (int no_clients,
- ACE_Manual_Event &event);
-
- // = The skeleton methods
- virtual CORBA::Long receiver_object (Receiver *recv
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Sender::Table_Full));
-
- /// Public method defined locally
- void send_message (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// Synchronizing acces to this class
- TAO_SYNCH_MUTEX mutex_;
-
- /// An event for waking other threads
- ACE_Manual_Event &event_;
-
- /// An array of receiver pointers
- Receiver **receivers_;
-
- /// Size of the <this->receivers_> array
- int no_clients_;
-
- /// Receiver index
- int last_index_;
-
- /// Payload that is being sent
- Receiver::Payload payload_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* MUXING_RECEIVER_H */
diff --git a/TAO/tests/MT_BiDir/Server_Task.cpp b/TAO/tests/MT_BiDir/Server_Task.cpp
deleted file mode 100644
index f01ddfd5518..00000000000
--- a/TAO/tests/MT_BiDir/Server_Task.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// $Id$
-//
-
-#include "Server_Task.h"
-#include "Sender_i.h"
-#include "tao/ORB_Core.h"
-#include "tao/Thread_Lane_Resources.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "ace/Manual_Event.h"
-
-
-ACE_RCSID (MT_BiDir,
- Server_Task,
- "Server_Task.cpp,v 1.1 2001/03/10 23:37:42 coryan Exp")
-
-
-Server_Task::Server_Task (Sender_i *sender,
- ACE_Manual_Event &event,
- int no_iterations,
- CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , sender_ (sender)
- , event_ (event)
- , no_iterations_ (no_iterations)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Wait for the Event\n"));
-
- /// Wait on the event
- /// Yes, wait on event twice. One for making sure that we have got
- /// all the clients come and register with us.
- this->event_.wait ();
-
-
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Start doing some work....\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Before start
- CORBA::ULong connection_no =
- this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size ();
-
- for (int i = 0; i != this->no_iterations_; ++i)
- {
- if (i%50 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Sending message ....\n"));
-
- this->sender_->send_message (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Sanity check for connections..
- if (connection_no <
- this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size ())
- {
- // Get the latest and the greatest..
- connection_no =
- this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size ();
- ACE_ERROR ((LM_DEBUG,
- "(%P|%t) ERROR: New connections have been created \n"));
- ACE_ERROR ((LM_DEBUG,
- "(%P|%t) ERROR: We will crash now... \n"));
- ACE_OS::abort ();
- }
-
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in iteration \n");
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MT_BiDir/Server_Task.h b/TAO/tests/MT_BiDir/Server_Task.h
deleted file mode 100644
index 42686741b21..00000000000
--- a/TAO/tests/MT_BiDir/Server_Task.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef MT_BIDIR_SERVER_TASK_H
-#define MT_BIDIR_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"
-
-class Sender_i;
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Manual_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (Sender_i *s,
- ACE_Manual_Event &event,
- int no_iterations,
- CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// The sender object
- Sender_i *sender_;
-
- /// The synchronizer
- ACE_Manual_Event &event_;
-
- /// Number of messages that needs to be sent
- int no_iterations_;
-
- /// The ORB on which we run..
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* MT_BIDIR_SERVER_TASK_H */
diff --git a/TAO/tests/MT_BiDir/client.cpp b/TAO/tests/MT_BiDir/client.cpp
deleted file mode 100644
index 23566a7d242..00000000000
--- a/TAO/tests/MT_BiDir/client.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Receiver_i.h"
-#include "SenderC.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "Client_Task.h"
-
-ACE_RCSID(BiDirectional, client, "client.cpp,v 1.6 2001/03/30 20:11:05 bala Exp")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.optarg;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Sender_var sender =
- Sender::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (sender.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
-
- Receiver_i *receiver;
- ACE_NEW_RETURN (receiver,
- Receiver_i (),
- -1);
-
- PortableServer::ServantBase_var owner_transfer (receiver);
-
- Receiver_var receiver_obj =
- receiver->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Send the calback object to the server
- sender->receiver_object (receiver_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Threads that will handle the call backs
- Client_Task client_task (orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::Long count =
- receiver->get_event_count ();
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Number of events received.. [%d] \n",
- count));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Catched exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MT_BiDir/run_test.pl b/TAO/tests/MT_BiDir/run_test.pl
deleted file mode 100755
index 7187d34fcb9..00000000000
--- a/TAO/tests/MT_BiDir/run_test.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBsvcconf server$PerlACE::svcconf_ext -o test.ior -c 3 -i 100");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBSvcConf server$PerlACE::svcconf_ext -o $iorfile -c 3 -i 100");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL1->Spawn (60);
-$CL2->Spawn (60);
-$CL3->Spawn (60);
-
-$client1 = $CL1->WaitKill (75);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-$client2 = $CL2->WaitKill (75);
-
-if ($client2 != 0) {
- print STDERR "ERROR: client 2 returned $client2\n";
- $status = 1;
-}
-
-$client3 = $CL3->WaitKill (75);
-
-if ($client3 != 0) {
- print STDERR "ERROR: client 3 returned $client3\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (20);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/MT_BiDir/server.conf b/TAO/tests/MT_BiDir/server.conf
deleted file mode 100644
index 64c64d81212..00000000000
--- a/TAO/tests/MT_BiDir/server.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Resource_Factory "-ORBMuxedConnectionMax 1"
diff --git a/TAO/tests/MT_BiDir/server.conf.xml b/TAO/tests/MT_BiDir/server.conf.xml
deleted file mode 100644
index 462e723c4c5..00000000000
--- a/TAO/tests/MT_BiDir/server.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/MT_BiDir/server.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Resource_Factory" params="-ORBMuxedConnectionMax 1"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/MT_BiDir/server.cpp b/TAO/tests/MT_BiDir/server.cpp
deleted file mode 100644
index 7aeeeecdbc8..00000000000
--- a/TAO/tests/MT_BiDir/server.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Sender_i.h"
-#include "tao/BiDir_GIOP/BiDirGIOP.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "Server_Task.h"
-#include "tao/ORB_Core.h"
-#include "tao/Thread_Lane_Resources.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "ace/Manual_Event.h"
-
-
-ACE_RCSID (MT_BirDir,
- server,
- "$Id$")
-
-
-const char *ior_output_file = 0;
-static int no_iterations = 10;
-static int no_clients = 2;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:i:c:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.optarg;
- break;
- case 'c':
- no_clients = ACE_OS::atoi (get_opts.optarg);
- break;
- case 'i':
- no_iterations = ACE_OS::atoi (get_opts.optarg);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "-c <no_clients>"
- "-i <no_iterations>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the childPOA to be created.
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- CORBA::Any pol;
- pol <<= BiDirPolicy::BOTH;
- policies[0] =
- orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA as child of RootPOA with the above policies. This POA
- // will receive request in the same connection in which it sent
- // the request
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of childPOA is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event manual_event;
-
- Sender_i *sender = 0;
- ACE_NEW_RETURN (sender,
- Sender_i (no_clients,
- manual_event),
- -1);
-
- PortableServer::ServantBase_var owner_transfer (sender);
-
- PortableServer::ObjectId_var id =
- child_poa->activate_object (sender
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- child_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
-
- // Get the main thread id..
- ACE_thread_t thr_id = ACE_Thread::self ();
-
- Server_Task server_task (sender,
- manual_event,
- no_iterations,
- orb.in (),
- ACE_Thread_Manager::instance ());
-
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- // Only the main thread gets to run the ORB
- if (thr_id == ACE_Thread::self ())
- {
- // run the ORB for at most 60 seconds...
- ACE_Time_Value tv (60, 0);
-
- // Call the ORB run from the main thread
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) event loop finished\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MT_Client/.cvsignore b/TAO/tests/MT_Client/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/MT_Client/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/MT_Client/MT_Client.mpc b/TAO/tests/MT_Client/MT_Client.mpc
deleted file mode 100644
index 1974ade69bd..00000000000
--- a/TAO/tests/MT_Client/MT_Client.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/MT_Client/README b/TAO/tests/MT_Client/README
deleted file mode 100644
index 64e499a3524..00000000000
--- a/TAO/tests/MT_Client/README
+++ /dev/null
@@ -1,18 +0,0 @@
-
-# $Id$
-
-Description:
-
- This is a simple test for multi-threaded clients; it just
-creates a simple server process and runs a client with multiple thread
-sharing the same object reference.
-
-Expected output:
- The server prints out the IOR of the object it serves. The
-client shouldn't print out anything, it returns 0 on success.
-
-How to run:
- You can use the run_test.pl script to run it or:
-
-$ server -o test.ior
-$ client -k file://test.ior -n 4 -i 1000
diff --git a/TAO/tests/MT_Client/client.conf b/TAO/tests/MT_Client/client.conf
deleted file mode 100644
index 73d9e3ccee4..00000000000
--- a/TAO/tests/MT_Client/client.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-
-static Client_Strategy_Factory "-ORBClientConnectionHandler RW"
diff --git a/TAO/tests/MT_Client/client.conf.xml b/TAO/tests/MT_Client/client.conf.xml
deleted file mode 100644
index df1fe9c2c4d..00000000000
--- a/TAO/tests/MT_Client/client.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/MT_Client/client.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <static id="Client_Strategy_Factory" params="-ORBClientConnectionHandler RW"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/MT_Client/client.cpp b/TAO/tests/MT_Client/client.cpp
deleted file mode 100644
index aaab6575632..00000000000
--- a/TAO/tests/MT_Client/client.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(MT_Client, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int nthreads = 5;
-int niterations = 5;
-int server_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:n:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'x':
- server_shutdown = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-n <nthreads> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Client : public ACE_Task_Base
-{
- // = TITLE
- // Run the client thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run the client threads.
- //
-public:
- Client (Simple_Server_ptr server, int niterations);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // Validate the connection
-
-private:
- Simple_Server_var server_;
- // The server.
-
- int niterations_;
- // The number of iterations on each client thread.
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Client client (server.in (), niterations);
- if (client.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- client.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "threads finished\n"));
-
- if (server_shutdown)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Client::Client (Simple_Server_ptr server,
- int niterations)
- : server_ (Simple_Server::_duplicate (server)),
- niterations_ (niterations)
-{
-}
-
-void
-Client::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Ping the object 100 times, ignoring all exceptions.
- // It would be better to use validate_connection() but the test must
- // run on minimum CORBA builds too!
- for (int j = 0; j != 100; ++j)
- {
- ACE_TRY
- {
- this->server_->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- }
-}
-
-int
-Client::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i < this->niterations_; ++i)
- {
- this->server_->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n",
- i));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_Client: exception raised");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/MT_Client/client_muxed.conf b/TAO/tests/MT_Client/client_muxed.conf
deleted file mode 100644
index 05145bd0896..00000000000
--- a/TAO/tests/MT_Client/client_muxed.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-
-static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED"
diff --git a/TAO/tests/MT_Client/client_muxed.conf.xml b/TAO/tests/MT_Client/client_muxed.conf.xml
deleted file mode 100644
index ba4727350fc..00000000000
--- a/TAO/tests/MT_Client/client_muxed.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/MT_Client/client_muxed.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler MT -ORBTransportMuxStrategy MUXED"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/MT_Client/orb_creation.cpp b/TAO/tests/MT_Client/orb_creation.cpp
deleted file mode 100644
index 6a6f1db233d..00000000000
--- a/TAO/tests/MT_Client/orb_creation.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(MT_Client, orb_creation, "$Id$")
-
-const char *ior = "file://test.ior";
-int nthreads = 5;
-int niterations = 5;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:n:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-n <nthreads> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Client : public ACE_Task_Base
-{
- // = TITLE
- // Run the client thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run the client threads.
- //
-public:
- Client (int niterations,
- const char* ior);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- int niterations_;
- // The number of iterations on each client thread.
-
- const char* ior_;
- // The IOR that we should use.
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Client client (niterations, ior);
- if (client.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- client.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "threads finished\n"));
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Client::Client (int niterations,
- const char* ior)
- : niterations_ (niterations),
- ior_ (ior)
-{
-}
-
-int
-Client::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- for (int i = 0; i < this->niterations_; ++i)
- {
- // If we are using a global ORB this is a nop, otherwise it
- // initializes the ORB resources for this thread.
- int argc = 0;
- CORBA::String_var argv0 = CORBA::string_dup ("dummy_argv");
- char* argv[1] = { argv0.inout () };
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->string_to_object (this->ior_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- server->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_Client: exception raised");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/MT_Client/run_test.pl b/TAO/tests/MT_Client/run_test.pl
deleted file mode 100755
index faf34e8312e..00000000000
--- a/TAO/tests/MT_Client/run_test.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$client_conf = PerlACE::LocalFile ("client.global$PerlACE::svcconf_ext");
-$server_conf = PerlACE::LocalFile ("server$PerlACE::svcconf_ext");
-$client_process = "client";
-$debug_level = '0';
-$threads = '4';
-$status = 0;
-
-foreach $i (@ARGV) {
- if ($i eq '-tss') {
- $client_conf = PerlACE::LocalFile ("client.tss$PerlACE::svcconf_ext");
- } elsif ($i eq '-debug') {
- $debug_level = '1';
- } elsif ($i eq '-creation') {
- $client_process = 'orb_creation';
- }
-}
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBsvcconf server$PerlACE::svcconf_ext -ORBdebuglevel $debug_level -o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBsvcconf $server_conf -ORBdebuglevel $debug_level -o $iorfile");
-}
-$CL = new PerlACE::Process ($client_process,
- "-ORBdebuglevel $debug_level "
- . "-k file://$iorfile "
- . "-n $threads -i 1000 -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (240);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/MT_Client/server.conf b/TAO/tests/MT_Client/server.conf
deleted file mode 100644
index faf9c6c874b..00000000000
--- a/TAO/tests/MT_Client/server.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Server_Strategy_Factory "-ORBconcurrency thread-per-connection"
diff --git a/TAO/tests/MT_Client/server.conf.xml b/TAO/tests/MT_Client/server.conf.xml
deleted file mode 100644
index d233dd6213f..00000000000
--- a/TAO/tests/MT_Client/server.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/MT_Client/server.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Server_Strategy_Factory" params="-ORBconcurrency thread-per-connection"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/MT_Client/server.cpp b/TAO/tests/MT_Client/server.cpp
deleted file mode 100644
index bf5e6312642..00000000000
--- a/TAO/tests/MT_Client/server.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(MT_Client, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MT_Client/test.idl b/TAO/tests/MT_Client/test.idl
deleted file mode 100644
index cbb8054de28..00000000000
--- a/TAO/tests/MT_Client/test.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * $Id$
- */
-
-/// A simple interface to test the ORB
-interface Simple_Server
-{
- /// This method is a noop, and it is used just to exercise the
- /// critical path
- void test_method ();
-
- /// Shutdown the server
- /**
- * Provide a simple way to cleanup the test when it finishes
- */
- oneway void shutdown ();
-};
diff --git a/TAO/tests/MT_Client/test_i.cpp b/TAO/tests/MT_Client/test_i.cpp
deleted file mode 100644
index 61e2bf25496..00000000000
--- a/TAO/tests/MT_Client/test_i.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(MT_Client, test_i, "$Id$")
-
-void
-Simple_Server_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/MT_Client/test_i.h b/TAO/tests/MT_Client/test_i.h
deleted file mode 100644
index 8e9f0794f76..00000000000
--- a/TAO/tests/MT_Client/test_i.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/MT_Client
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_MT_CLIENT_TEST_I_H
-#define TAO_MT_CLIENT_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- void test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_MT_CLIENT_TEST_I_H */
diff --git a/TAO/tests/MT_Client/test_i.i b/TAO/tests/MT_Client/test_i.i
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/MT_Client/test_i.i
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/MT_Server/.cvsignore b/TAO/tests/MT_Server/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/MT_Server/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/MT_Server/MT_Server.mpc b/TAO/tests/MT_Server/MT_Server.mpc
deleted file mode 100644
index bfb96e8b536..00000000000
--- a/TAO/tests/MT_Server/MT_Server.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/MT_Server/README b/TAO/tests/MT_Server/README
deleted file mode 100644
index 7820727a22f..00000000000
--- a/TAO/tests/MT_Server/README
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Id$
-
-Description:
-
- This is a simple test for a thread-pool server. It creates a
-server process with a variable number of threads, multiple clients can
-send requests to it, the requests are handled in different threads.
-
-Expected output:
- The server prints out the IOR of the object it serves and the
-thread that handles each request.
-
-How to run:
- You can use the run_test.pl script to run it or:
-
-$ server -o test.ior -n 4 -ORBSvcConf server.conf
-$ client -k file://test.ior -i 1000
-$ client -k file://test.ior -i 1000
-$ client -k file://test.ior -i 1000
diff --git a/TAO/tests/MT_Server/client.cpp b/TAO/tests/MT_Server/client.cpp
deleted file mode 100644
index 3948231f376..00000000000
--- a/TAO/tests/MT_Server/client.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "testC.h"
-
-ACE_RCSID(MT_Server, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 5;
-int do_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- do_shutdown = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- for (int i = 0; i != niterations; ++i)
- {
- CORBA::Long r =
- server->test_method (i ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r != i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d for %d",
- r, i));
- }
- }
-
- if (do_shutdown)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/MT_Server/run_test.pl b/TAO/tests/MT_Server/run_test.pl
deleted file mode 100755
index f806a1750f7..00000000000
--- a/TAO/tests/MT_Server/run_test.pl
+++ /dev/null
@@ -1,78 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$threads = '8';
-$iorfile = PerlACE::LocalFile ("test.ior");
-$sv_conf = PerlACE::LocalFile ("server$PerlACE::svcconf_ext");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBsvcconf server$PerlACE::svcconf_ext -o test.ior -n $threads");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBsvcconf $sv_conf -o $iorfile -n $threads");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile -i 100");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile -i 100");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile -i 100");
-$CLS = new PerlACE::Process ("client", "-k file://$iorfile -i 100 -x ");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$CL1->Spawn ();
-$CL2->Spawn ();
-$CL3->Spawn ();
-
-$client = $CL1->WaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-$client = $CL2->WaitKill (30);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$client = $CL3->WaitKill (30);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$client = $CLS->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status
diff --git a/TAO/tests/MT_Server/server.conf b/TAO/tests/MT_Server/server.conf
deleted file mode 100644
index 0bd3f27be15..00000000000
--- a/TAO/tests/MT_Server/server.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# $Id$
-#
diff --git a/TAO/tests/MT_Server/server.conf.xml b/TAO/tests/MT_Server/server.conf.xml
deleted file mode 100644
index 9c53575413f..00000000000
--- a/TAO/tests/MT_Server/server.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/MT_Server/server.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/MT_Server/server.cpp b/TAO/tests/MT_Server/server.cpp
deleted file mode 100644
index 982fc2cbc28..00000000000
--- a/TAO/tests/MT_Server/server.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(MT_Server, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int nthreads = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Worker : public ACE_Task_Base
-{
- // = TITLE
- // Run a server thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run server threads
- //
-public:
- Worker (CORBA::ORB_ptr orb);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- CORBA::ORB_var orb_;
- // The orb
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Worker worker (orb.in ());
- if (worker.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- worker.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Worker::Worker (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/MT_Server/test.idl b/TAO/tests/MT_Server/test.idl
deleted file mode 100644
index aa227c3b110..00000000000
--- a/TAO/tests/MT_Server/test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server
-{
- long test_method (in long x);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/MT_Server/test_i.cpp b/TAO/tests/MT_Server/test_i.cpp
deleted file mode 100644
index b3bd0d017d6..00000000000
--- a/TAO/tests/MT_Server/test_i.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_unistd.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(MT_Server, test_i, "$Id$")
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n"));
- ACE_Time_Value tv (0, 15000);
- ACE_OS::sleep (tv);
- return x;
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/MT_Server/test_i.h b/TAO/tests/MT_Server/test_i.h
deleted file mode 100644
index 65fa40ed8b2..00000000000
--- a/TAO/tests/MT_Server/test_i.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/MT_Server
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_MT_SERVER_TEST_I_H
-#define TAO_MT_SERVER_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_MT_SERVER_TEST_I_H */
diff --git a/TAO/tests/MT_Server/test_i.i b/TAO/tests/MT_Server/test_i.i
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/MT_Server/test_i.i
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/MT_Timeout/.cvsignore b/TAO/tests/MT_Timeout/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/MT_Timeout/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/MT_Timeout/Client_Task.cpp b/TAO/tests/MT_Timeout/Client_Task.cpp
deleted file mode 100644
index 29bb6e0502d..00000000000
--- a/TAO/tests/MT_Timeout/Client_Task.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/TimeBaseC.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-
-ACE_RCSID(MT_Timeout, Client_Task, "$Id$")
-
-Client_Task::Client_Task (CORBA::ORB_ptr orb,
- Test::Sleep_Service_ptr sleep_service,
- int iterations,
- CORBA::ULong sleep_time,
- CORBA::ULong timeout)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , sleep_service_ (Test::Sleep_Service::_duplicate (sleep_service))
- , iterations_ (iterations)
- , sleep_time_ (sleep_time)
- , timeout_ (timeout)
- , successful_calls_ (0)
- , timed_out_calls_ (0)
- , too_big_difference_ (0)
-{
-}
-
-int
-Client_Task::successful_calls (void) const
-{
- return this->successful_calls_;
-}
-
-int
-Client_Task::timed_out_calls (void) const
-{
- return this->timed_out_calls_;
-}
-
-int
-Client_Task::too_big_difference_calls (void) const
-{
- return this->too_big_difference_;
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- int successful_calls = 0;
- int timed_out_calls = 0;
-
- ACE_TRY
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TimeBase::TimeT timeout_period = 10 * this->timeout_;
-
- CORBA::Any timeout_as_any;
- timeout_as_any <<= timeout_period;
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
- policy_list[0] =
- this->orb_->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- timeout_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i != this->iterations_; ++i)
- {
- int retval = this->one_iteration (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (retval == 1)
- successful_calls++;
- else if (retval == 0)
- timed_out_calls++;
-
-#if 0
- if (i % 50 == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) - Client_Task::svc %d / %d iterations\n",
- i, this->iterations_));
- }
-#endif /* 0 */
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
- this->successful_calls_ += successful_calls;
- this->timed_out_calls_ += timed_out_calls;
-
- return 0;
-}
-
-void
-Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_TRY
- {
- for (int i = 0; i != 100; ++i)
- {
- (void) this->sleep_service_->go_to_sleep (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::TRANSIENT, ex)
- {
- // Ignore transient exceptions
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-Client_Task::one_iteration (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_TRY
- {
- ACE_Time_Value start = ACE_OS::gettimeofday ();
-
- this->sleep_service_->go_to_sleep (this->sleep_time_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value end = ACE_OS::gettimeofday ();
-
- if (this->sleep_time_ > this->timeout_)
- {
- // If we don't sleep then the next request will also
- // timeout:
- // The server is already sleeping, the client sends a new
- // request, but the server cannot process it until the
- // previous sleep completes. The sleep times for multiple
- // requests accumulate, and the client always fails.
- CORBA::ULong remainder =
- this->sleep_time_ - this->timeout_;
- ACE_Time_Value tv (0, remainder);
- ACE_OS::sleep (tv);
- }
-
- if (this->timeout_ > 0)
- {
- CORBA::ULong max_milliseconds = this->timeout_ / 1000;
-
- ACE_Time_Value elapsed = end - start;
- CORBA::ULong elapsed_milliseconds = elapsed.msec ();
-
- if (elapsed_milliseconds > max_milliseconds)
- {
- CORBA::ULong difference =
- elapsed_milliseconds - max_milliseconds;
-
- // If the different is more than 10 milliseconds we are
- // *way* off, this is an error.
- if (difference > 10)
- {
- this->too_big_difference_++;
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Elapsed time = %d, expected %d\n",
- elapsed_milliseconds, max_milliseconds));
- }
- }
- }
-
- return 1;
- }
- ACE_CATCH(CORBA::TIMEOUT, to_exp)
- {
- // Ignore this exception, it is usually caused by a transient
- // condition
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- }
- ACE_ENDTRY;
-
- return -1;
-}
diff --git a/TAO/tests/MT_Timeout/Client_Task.h b/TAO/tests/MT_Timeout/Client_Task.h
deleted file mode 100644
index e3affca8bfa..00000000000
--- a/TAO/tests/MT_Timeout/Client_Task.h
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef MT_TIMEOUT_CLIENT_TASK_H
-#define MT_TIMEOUT_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- /**
- * Each Client_Task runs the test for a certain number of
- * iterations, using pre-configured timeouts and sleep times.
- * The test can be made to timeout on each request by using a
- * timeout value smaller than the sleep time.
- *
- * @param orb A reference to the ORB, used to get the PolicyCurrent
- * interface
- * @param sleep_service The object reference used for this test.
- * @param iterations Number of times the go_to_sleep() method is
- * invoked, in microseconds
- * @param sleep_time The sleep time passed on each test, in
- * microseconds
- * @param timeout The timeout set for the thread
- *
- */
- Client_Task (CORBA::ORB_ptr orb,
- Test::Sleep_Service_ptr sleep_service,
- int iterations,
- CORBA::ULong sleep_time,
- CORBA::ULong timeout);
-
- /// Return the total number of sucessful calls
- int successful_calls (void) const;
-
- /// Return the total number of timed out calls
- int timed_out_calls (void) const;
-
- /// Return the number of calls with a too huge difference in
- /// timeout versus actual response arrival.
- int too_big_difference_calls (void) const;
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Run one iteration of the test
- int one_iteration (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Make sure that the thread has a connection available
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// A reference to the ORB
- CORBA::ORB_var orb_;
-
- /// Reference to the test interface
- Test::Sleep_Service_var sleep_service_;
-
- /// Total number of processes created by each thread
- int iterations_;
-
- /// Sleep time for each request, in microseconds
- CORBA::ULong sleep_time_;
-
- /// Timeout period, in microseconds
- CORBA::ULong timeout_;
-
- /// Count how many calls were successful
- int successful_calls_;
-
- /// Count how many calls timed out
- int timed_out_calls_;
-
- int too_big_difference_;
-
- /// Implement the Monitor Object Pattern.
- TAO_SYNCH_MUTEX mutex_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* MT_TIMEOUT_CLIENT_TASK_H */
diff --git a/TAO/tests/MT_Timeout/MT_Timeout.mpc b/TAO/tests/MT_Timeout/MT_Timeout.mpc
deleted file mode 100644
index 634030e4814..00000000000
--- a/TAO/tests/MT_Timeout/MT_Timeout.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): messaging, taoserver {
- Source_Files {
- Sleep_Service.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): messaging, taoexe, portableserver {
- after += *Server
- Source_Files {
- TestC.cpp
- Client_Task.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/MT_Timeout/README b/TAO/tests/MT_Timeout/README
deleted file mode 100644
index 2a14e349105..00000000000
--- a/TAO/tests/MT_Timeout/README
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
-
-@page MT_Timeout Test README File
-
- Test the roundtrip delay timeouts in a multithreaded
-client/server scenario.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/MT_Timeout/Server_Task.cpp b/TAO/tests/MT_Timeout/Server_Task.cpp
deleted file mode 100644
index 863f5f50c64..00000000000
--- a/TAO/tests/MT_Timeout/Server_Task.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#include "Server_Task.h"
-
-ACE_RCSID(MT_Timeout, Server_Task, "$Id$")
-
-Server_Task::Server_Task (ACE_Thread_Manager *thr_mgr,
- CORBA::ORB_ptr orb,
- const ACE_Time_Value &running_time)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
- , running_time_ (running_time)
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (this->running_time_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/MT_Timeout/Server_Task.h b/TAO/tests/MT_Timeout/Server_Task.h
deleted file mode 100644
index b3133abff1d..00000000000
--- a/TAO/tests/MT_Timeout/Server_Task.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef SERVER_TASK_H
-#define SERVER_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (ACE_Thread_Manager *thr_mgr,
- CORBA::ORB_ptr orb,
- const ACE_Time_Value &running_time);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-
- /// Total running time for each thread
- ACE_Time_Value running_time_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* SERVER_TASK_H */
diff --git a/TAO/tests/MT_Timeout/Sleep_Service.cpp b/TAO/tests/MT_Timeout/Sleep_Service.cpp
deleted file mode 100644
index 5a6b7d95bcf..00000000000
--- a/TAO/tests/MT_Timeout/Sleep_Service.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// $Id$
-//
-#include "Sleep_Service.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(MT_Timeout, Sleep_Service, "$Id$")
-
-Sleep_Service::Sleep_Service (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Sleep_Service::go_to_sleep (CORBA::ULong microseconds
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong secs = microseconds / 1000000;
- CORBA::ULong usecs = microseconds % 1000000;
- ACE_Time_Value tv (secs, usecs);
-
- ACE_OS::sleep (tv);
-}
-
-void
-Sleep_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Shutting down the ORB\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/MT_Timeout/Sleep_Service.h b/TAO/tests/MT_Timeout/Sleep_Service.h
deleted file mode 100644
index bc1c17e9210..00000000000
--- a/TAO/tests/MT_Timeout/Sleep_Service.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef SLEEP_SERVICE_H
-#define SLEEP_SERVICE_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Sleep_Service interface
-class Sleep_Service
- : public virtual POA_Test::Sleep_Service
-{
-public:
- /// Constructor
- Sleep_Service (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void go_to_sleep (CORBA::ULong microseconds
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* SLEEP_SERVICE_H */
diff --git a/TAO/tests/MT_Timeout/Test.idl b/TAO/tests/MT_Timeout/Test.idl
deleted file mode 100644
index 0d92a794abb..00000000000
--- a/TAO/tests/MT_Timeout/Test.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /// A very simple interface
- interface Sleep_Service
- {
- /// Sleep for @c microseconds
- void go_to_sleep (in unsigned long microseconds);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/MT_Timeout/client.cpp b/TAO/tests/MT_Timeout/client.cpp
deleted file mode 100644
index 21262fc921d..00000000000
--- a/TAO/tests/MT_Timeout/client.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Client_Leaks, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int iterations = 500;
-int threads = 4;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'n':
- threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <iterations> "
- "-i <threads> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Sleep_Service_var sleep_service =
- Test::Sleep_Service::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (sleep_service.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil process reference <%s>\n",
- ior),
- 1);
- }
-
- Client_Task task0 (orb.in (),
- sleep_service.in (),
- iterations,
- 10 * 1000,
- 20 * 1000);
- Client_Task task1 (orb.in (),
- sleep_service.in (),
- iterations,
- 50 * 1000,
- 20 * 1000);
-
- if (task0.activate (THR_NEW_LWP | THR_JOINABLE, threads, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- if (task1.activate (THR_NEW_LWP | THR_JOINABLE, threads, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- // Get back in sync with the server..
- sleep_service->go_to_sleep (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- sleep_service->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Task 0: Successful calls = %d, timed out calls = %d\n",
- task0.successful_calls (),
- task0.timed_out_calls ()));
-
- ACE_DEBUG ((LM_DEBUG,
- "Task 1: Successful calls = %d, timed out calls = %d\n",
- task1.successful_calls (),
- task1.timed_out_calls ()));
-
- // No more than 5 % of the calls are allowed to have a too big
- // difference
- if (task0.too_big_difference_calls () > iterations/20
- || task1.too_big_difference_calls () > iterations/20)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Warning: Too many calls have a too big difference between "
- "timeout and elapsed time (task0: %d, task1: %d)\n",
- task0.too_big_difference_calls (),
- task1.too_big_difference_calls ()));
- }
- else if (task0.too_big_difference_calls () != 0
- || task1.too_big_difference_calls () != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Warning: some calls (task0: %d, task1: %d) "
- "exceeded their expected elapsed times\n",
- task0.too_big_difference_calls (),
- task1.too_big_difference_calls ()));
- }
-
- if (task0.timed_out_calls () == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: non-zero number of timeouts "
- "expected for task 0\n"));
- }
-
- if (task1.successful_calls () != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: zero successful calls "
- "expected for task 1\n"));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/TAO/tests/MT_Timeout/run_test.pl b/TAO/tests/MT_Timeout/run_test.pl
deleted file mode 100755
index b666399759a..00000000000
--- a/TAO/tests/MT_Timeout/run_test.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/MT_Timeout/server.cpp b/TAO/tests/MT_Timeout/server.cpp
deleted file mode 100644
index c3a5b91ae3e..00000000000
--- a/TAO/tests/MT_Timeout/server.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-// $Id$
-
-#include "Sleep_Service.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(MT_Timeout, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Sleep_Service *sleep_service_impl;
- ACE_NEW_RETURN (sleep_service_impl,
- Sleep_Service (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(sleep_service_impl);
-
- Test::Sleep_Service_var process =
- sleep_service_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (process.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task server_task (ACE_Thread_Manager::instance (),
- orb.in (),
- ACE_Time_Value(240));
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 8, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- server_task.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Multiple/.cvsignore b/TAO/tests/Multiple/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Multiple/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Multiple/Collocation_Tester.cpp b/TAO/tests/Multiple/Collocation_Tester.cpp
deleted file mode 100644
index 82806ba2af4..00000000000
--- a/TAO/tests/Multiple/Collocation_Tester.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-// $Id$
-
-#include "Collocation_Tester.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (tests, Collocation_Tester, "$Id$")
-
-const char *Quote::top = "Ciao";
-const char *Quote::left = "Hola";
-const char *Quote::right = "Hello";
-const char *Quote::bottom = "Previet";
-
-Collocation_Tester::Collocation_Tester (CORBA::Object_ptr object)
-{
- this->object_ = CORBA::Object::_duplicate (object);
-}
-
-Collocation_Tester::~Collocation_Tester (void)
-{
- // No-Op.
-}
-
-int
-Collocation_Tester::match_answer (const char *actual_answer,
- const char *right_answer,
- const char *method_name)
-{
- if (ACE_OS::strcmp (actual_answer, right_answer))
- {
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("Call to <%s> returned the wrong value!\n"), method_name));
- return 1;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Call to <%s> returned with success: %s \n"), method_name, actual_answer));
- return 0;
- }
-}
-
-int
-Collocation_Tester::test_top (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n------------------------<TOP>-------------------------------\n")));
- int failure = 0;
- int call_num = 1;
- Multiple::Top_var top =
- Multiple::Top::_narrow (this->object_.in ());
-
- if (CORBA::is_nil (top.in ()))
- {
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("Unable to Narrow to Multiple::Top\n")));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n\nCalling all method supported by the Interface Top\n\n")));
-
- CORBA::String_var msg = top->top_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- failure += this->match_answer (Quote::top, msg.in (), "top_quote");
-
- if (failure)
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("The test had %d/%d Failure\n"), failure, call_num));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n------------------------<TOP>-------------------------------\n")));
-
- return failure;
-}
-
-int
-Collocation_Tester::test_right (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n------------------------<RIGHT>-------------------------------\n")));
- int failure = 0;
- int call_num = 2;
- Multiple::Right_var right =
- Multiple::Right::_narrow (this->object_.in ());
-
- if (CORBA::is_nil (right.in ()))
- {
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("Unable to Narrow to Multiple::Right\n")));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n\nCalling all method supported by the Interface Right\n\n")));
-
- CORBA::String_var msg = right->top_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
-
- failure += this->match_answer (Quote::top, msg.in (), "top_quote");
-
- msg = right->right_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
-
- failure += this->match_answer (Quote::right, msg.in (), "right_quote");
-
- if (failure)
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("The test had %d/%d Failure"), failure, call_num));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n------------------------<RIGHT>-------------------------------\n")));
-
- return failure;
-}
-
-
-int
-Collocation_Tester::test_left (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n------------------------<LEFT>-------------------------------\n")));
- int failure = 0;
- int call_num = 2;
-
- Multiple::Left_var left =
- Multiple::Left::_narrow (this->object_.in ());
-
- if (CORBA::is_nil (left.in ()))
- {
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("Unable to Narrow to Multiple::Right\n")));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n\nCalling all method supported by the Interface Left\n\n")));
-
- CORBA::String_var msg = left->top_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
-
- failure += this->match_answer (Quote::top, msg.in (), "top_quote");
-
- msg = left->left_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN(1);
-
- failure += this->match_answer (Quote::left, msg.in (), "left_quote");
-
- if (failure)
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("The test had %d/%d Failure"), failure, call_num));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n------------------------<LEFT>-------------------------------\n")));
-
- return failure;
-}
-
-
-int
-Collocation_Tester::test_bottom (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n-----------------------<BOTTOM>-------------------------------\n")));
- int failure = 0;
- int call_num = 4;
-
- Multiple::Bottom_var bottom =
- Multiple::Bottom::_narrow (this->object_.in ());
-
- if (CORBA::is_nil (bottom.in ()))
- {
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("Unable to Narrow to Multiple::Right\n")));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n\nCalling all method supported by the Interface Bottom\n\n")));
-
- CORBA::String_var msg = bottom->top_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN(1);
-
- failure += this->match_answer (Quote::top, msg.in (), "top_quote");
-
- msg = bottom->left_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
-
- failure += this->match_answer (Quote::left, msg.in (), "left_quote");
-
- msg = bottom->right_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN(1);
-
- failure += this->match_answer (Quote::right, msg.in (), "right_quote");
-
- msg = bottom->bottom_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN(1);
-
- failure += this->match_answer (Quote::bottom, msg.in (), "bottom_quote");
-
- if (failure)
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("The test had %d/%d Failure"), failure, call_num));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\n-----------------------<BOTTOM>-------------------------------\n")));
-
- return failure;
-}
-
-void
-Collocation_Tester::shutdown (ACE_ENV_SINGLE_ARG_DECL)
-{
- Multiple::Top_var top =
- Multiple::Top::_narrow (this->object_.in ());
-
- if (CORBA::is_nil (top.in ()))
- {
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("Unable to Narrow to Multiple::Top\n")));
- return;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n\nCalling ShutDown on Top.\n\n")));
-
- top->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Collocation_Tester::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- int failure_num = this->test_top (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- failure_num += this->test_left (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- failure_num += this->test_right (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- failure_num += this->test_bottom (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (failure_num)
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT ("\n\nThe Test failed in %d cases."), failure_num));
- else
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n\nThe Test Completed Successfully. Congratulations! ")));
-
- this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Multiple/Collocation_Tester.h b/TAO/tests/Multiple/Collocation_Tester.h
deleted file mode 100644
index 19003092151..00000000000
--- a/TAO/tests/Multiple/Collocation_Tester.h
+++ /dev/null
@@ -1,80 +0,0 @@
-//$Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Multiple
-//
-// = FILENAME
-// Collocation_Tester.h
-//
-// = DESCRIPTION
-// This file contains the class that tests the TAO's collocation
-// mechanism.
-//
-// = AUTHOR
-// Angelo Corsaro <corsaro@cs.wustl.edu>
-//
-// ============================================================================
-
-// -- Custom App. Include --
-#include "MultipleC.h"
-
-#include "ace/Log_Msg.h"
-
-struct Quote
-{
- static const char *top;
- static const char *left;
- static const char *right;
- static const char *bottom;
-};
-
-
-class Collocation_Tester
-{
-public:
-
- // -- Constructor/Destructors --
- Collocation_Tester (CORBA::Object_ptr object);
-
- ~Collocation_Tester ();
-
- // -- Command --
- void run (ACE_ENV_SINGLE_ARG_DECL);
- // Runs the test.
-
-
-private:
-
- // -- Helper Methods --
-
- int test_top (ACE_ENV_SINGLE_ARG_DECL);
- // Tests the method accessible thru the
- // Top interface.
-
- int test_right (ACE_ENV_SINGLE_ARG_DECL);
- // Tests the method accessible thru the
- // Right interface.
-
- int test_left (ACE_ENV_SINGLE_ARG_DECL);
- // Tests the method accessible thru the
- // Left interface.
-
- int test_bottom (ACE_ENV_SINGLE_ARG_DECL);
- // Tests the method accessible thru the
- // Bottom interface.
-
- int match_answer (const char *actual_answer,
- const char *right_answer,
- const char *method_name);
- // This method tests wether the answer obtained
- // is the one expected. As strcmp, it returns zero
- // if a match occurs and a non-zero value if there
- // is no match (actually 1 is returned if there is
- // no match.
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL);
-private:
- CORBA::Object_var object_;
-};
diff --git a/TAO/tests/Multiple/Multiple.idl b/TAO/tests/Multiple/Multiple.idl
deleted file mode 100644
index e669d7f0345..00000000000
--- a/TAO/tests/Multiple/Multiple.idl
+++ /dev/null
@@ -1,56 +0,0 @@
-//$Id$
-
-/* ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Multiple
-//
-// = FILENAME
-// Multiple.idl
-//
-// = DESCRIPTION
-// IDL definition of a Diamond shaped hierarchy
-// of IDL interfaces. This Diamond shaped hierarchy
-// is used for testing the collocation.
-// The hierarchy used is decipted in the following
-// figure.
-//
-// Top
-// / \
-// Left Right
-// \ /
-// Bottom
-//
-// = AUTHOR
-// Angelo Corsaro <corsaro@cs.wustl.edu>
-//
-// ============================================================================
-*/
-
-
-module _Multiple
-{
-
- interface Top
- {
- string top_quote ();
-
- oneway void shutdown ();
- };
-
- interface Left : Top
- {
- string left_quote ();
- };
-
- interface Right : Top
- {
- string right_quote ();
- };
-
- interface Bottom : Left, Right
- {
- string bottom_quote ();
- };
-
-};
diff --git a/TAO/tests/Multiple/Multiple.mpc b/TAO/tests/Multiple/Multiple.mpc
deleted file mode 100644
index 47b388a8e0f..00000000000
--- a/TAO/tests/Multiple/Multiple.mpc
+++ /dev/null
@@ -1,24 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Gd
-
- Source_Files {
- Multiple_Impl.cpp
- Collocation_Tester.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver {
- idlflags += -Gd
- after += *Server
-
- Source_Files {
- Multiple_Impl.cpp
- Collocation_Tester.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Multiple/Multiple_Impl.cpp b/TAO/tests/Multiple/Multiple_Impl.cpp
deleted file mode 100644
index 54e95ead3e1..00000000000
--- a/TAO/tests/Multiple/Multiple_Impl.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-//$Id$
-
-#include "Multiple_Impl.h"
-#include "Collocation_Tester.h"
-
-ACE_RCSID (tests, Multiple_Impl, "$Id$")
-
-///////////////////////////////////////////////////////////
-// Bottom_Impl Implementation
-//
-
-Bottom_Impl::Bottom_Impl (CORBA::ORB_ptr orb)
-{
- this->orb_ = CORBA::ORB::_duplicate (orb);
-}
-
-Bottom_Impl::~Bottom_Impl (void)
-{
- // No-Op.
-}
-
-char *
-Bottom_Impl::top_quote (ACE_ENV_SINGLE_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup(Quote::top);
-}
-
-char *
-Bottom_Impl::left_quote (ACE_ENV_SINGLE_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup(Quote::left);
-}
-
-char *
-Bottom_Impl::right_quote (ACE_ENV_SINGLE_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup(Quote::right);
-}
-
-char *
-Bottom_Impl::bottom_quote (ACE_ENV_SINGLE_ARG_DECL_NOT_USED )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup(Quote::bottom);
-}
-
-void
-Bottom_Impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-///////////////////////////////////////////////////////////
-// Delegated_Bottom_Impl Implementation
-//
-Delegated_Bottom_Impl::Delegated_Bottom_Impl (Multiple::Bottom_ptr delegate,
- CORBA::ORB_ptr orb)
- : delegate_ (delegate)
-{
- this->orb_ = CORBA::ORB::_duplicate (orb);
-}
-
-Delegated_Bottom_Impl::~Delegated_Bottom_Impl (void)
-{
- // No-Op.
-}
-
-char *
-Delegated_Bottom_Impl::top_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Delegating the call: <top_quote>\n")));
-
- CORBA::String_var msg =
- this->delegate_->top_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return msg._retn ();
-}
-
-char *
-Delegated_Bottom_Impl::left_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Delegating the call: <left_quote>\n")));
-
- CORBA::String_var msg =
- this->delegate_->left_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return msg._retn ();
-}
-
-char *
-Delegated_Bottom_Impl::right_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Delegating the call: <right_quote>\n")));
-
- CORBA::String_var msg =
- this->delegate_->right_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return msg._retn ();
-}
-
-char *
-Delegated_Bottom_Impl::bottom_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Delegating the call: <bottom_quote>\n")));
-
- CORBA::String_var msg =
- this->delegate_->bottom_quote (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- return msg._retn ();
-}
-
-void
-Delegated_Bottom_Impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Delegating Shut-Down.\n")));
- this->delegate_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- //this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Multiple/Multiple_Impl.h b/TAO/tests/Multiple/Multiple_Impl.h
deleted file mode 100644
index e97f97ca80e..00000000000
--- a/TAO/tests/Multiple/Multiple_Impl.h
+++ /dev/null
@@ -1,120 +0,0 @@
-//$Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Multiple
-//
-// = FILENAME
-// Multiple_Impl.h
-//
-// = DESCRIPTION
-// This file contains the servant implementation used to test the
-// new collocation collocation scheme.
-//
-// = AUTHOR
-// Angelo Corsaro <corsaro@cs.wustl.edu>
-//
-// ============================================================================
-
-
-#ifndef TAO_MULTIPLE_IMPL_H_
-#define TAO_MULTIPLE_IMPL_H_
-
-// -- App. Specific Include --
-#include "MultipleS.h"
-
-class Bottom_Impl : public virtual POA_Multiple::Bottom
-{
-// = TITLE
-// Bottom_Impl
-//
-// = DESCRIPTION
-// This class implements the servant for the Bottom interface
-// defined in the IDL file.
-
-public:
-
- // Ctor-Dtor
- Bottom_Impl (CORBA::ORB_ptr orb);
- virtual ~Bottom_Impl (void);
-
- // IDL Interface Methods
- virtual char * top_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual char * left_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual char * right_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual char * bottom_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-private:
- CORBA::ORB_var orb_;
-
-};
-
-
-
-class Delegated_Bottom_Impl : public virtual POA_Multiple::Bottom
-{
-// = TITLE
-// Delegated_Bottom_Impl
-//
-// = DESCRIPTION
-// This class implements the servant for the Bottom interface
-// which delegates all the request to another Bottom corba object.
-// This call forwarding is made using different strategy depending
-// on the option set for the ORB.
-
-public:
-
- // Ctor-Dtor
- Delegated_Bottom_Impl (Multiple::Bottom_ptr delegate, CORBA::ORB_ptr orb);
- virtual ~Delegated_Bottom_Impl (void);
-
- // IDL Interface Methods.
- virtual char * top_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- virtual char * left_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- virtual char * right_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- virtual char * bottom_quote (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-private:
- Multiple::Bottom_var delegate_;
-
- CORBA::ORB_var orb_;
-
-};
-#endif /* TAO_MULTIPLE_IMPL_H_ */
diff --git a/TAO/tests/Multiple/README b/TAO/tests/Multiple/README
deleted file mode 100644
index 069e8d9bfd2..00000000000
--- a/TAO/tests/Multiple/README
+++ /dev/null
@@ -1,103 +0,0 @@
-<$Id$>
-
-This test make sure that the collocation scheme works fine in case
-of diamond shaped multiple inheritance. The case taken into account
-is the following:
-
- Top
- / \
- Left Right
- \ /
- Bottom
-
-The IDL file Multiple.idl, defines four IDL interface that satisfy
-the relation expressed by the former figure.
-
-The test is designed in such a way that error caused by the wrong
-behaviour are detected and signaled.
-
-To run the test you can do the following:
-
-1. Unix Like platform
-
-$ make-----------------------<BOTTOM>-------------------------------
-The Test Completed Successfully. Congratulations!
-
-
-Calling ShutDown on Top.
-
-
-D:\Devel\ACE_wrappers\TAO\tests\Multiple>Client.exe
-
-
-$ run_test.pl
-
--or-
-
-$ server
-$ client
-
-In this case the the ORB will use *ThruPOA* collocation for non RT-CORBA
-applications.
-
-$ server -ORBCollocationStrategy direct
-$ client
-
-In this case the ORB will use *Direct* collocation for non RT-CORBA
-applications.
-
-$ server -ORBCollocation no
-$ client
-
-Collocation is disabled in this case.
-
-The right output of the client should in any case be the one outlined
-below. Anyhow the test is self checking so it will detect wrong answer
-caused by weirdness in the collocation.
-
-
-------------------------<TOP>-------------------------------
-
-
-Calling all method supported by the Interface Top
-
-Call to <top_quote> returned with success: Ciao
-
-------------------------<TOP>-------------------------------
-
-------------------------<LEFT>-------------------------------
-
-
-Calling all method supported by the Interface Left
-
-Call to <top_quote> returned with success: Ciao
-Call to <left_quote> returned with success: Hola
-
-------------------------<LEFT>-------------------------------
-
-------------------------<RIGHT>-------------------------------
-
-
-Calling all method supported by the Interface Right
-
-Call to <top_quote> returned with success: Ciao
-Call to <right_quote> returned with success: Hello
-
-------------------------<RIGHT>-------------------------------
-
------------------------<BOTTOM>-------------------------------
-
-
-Calling all method supported by the Interface Bottom
-
-Call to <top_quote> returned with success: Ciao
-Call to <left_quote> returned with success: Hola
-Call to <right_quote> returned with success: Hello
-Call to <bottom_quote> returned with success: Previet
-
------------------------<BOTTOM>-------------------------------
-
-
-The Test Completed Successfully. Congratulations!
-
-Calling ShutDown on Top.
diff --git a/TAO/tests/Multiple/client.cpp b/TAO/tests/Multiple/client.cpp
deleted file mode 100644
index 8a2d499abce..00000000000
--- a/TAO/tests/Multiple/client.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id$
-
-# include "Collocation_Tester.h"
-
-ACE_RCSID (tests, client, "$Id$")
-
-int main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // ORB Initialization
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "TAO" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object;
-
- // Get The IOR from a file
- object = orb->string_to_object ("file://s.ior" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (object.in ()))
- {
- ACE_DEBUG ((LM_DEBUG, "Invalid IOR file\n"));
- return 1;
- }
-
- Collocation_Tester tester (object.in ());
- tester.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "CORBA Exception Raised");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Multiple/run_test.pl b/TAO/tests/Multiple/run_test.pl
deleted file mode 100755
index 098a13bb93b..00000000000
--- a/TAO/tests/Multiple/run_test.pl
+++ /dev/null
@@ -1,101 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$direct_colloc = "-ORBCollocationStrategy direct";
-$no_colloc = "-ORBCollocation no";
-
-# @todo Test should take -o and -k options to specify iorfile
-# Hard coded in test.
-$iorfile = "s.ior";
-
-unlink $iorfile;
-
-$SV = new PerlACE::Process ("server");
-$CL = new PerlACE::Process ("client");
-
-#
-# Test using ThruPOA collocation.
-#
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-$SV->Kill ();
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-#
-# Test using Direct Collocation
-#
-
-unlink $iorfile;
-
-$SV->Arguments ($direct_colloc);
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-$SV->Kill ();
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-#
-# Test using No Collocation
-#
-
-unlink $iorfile;
-
-$SV->Arguments ($no_colloc);
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-$SV->Kill ();
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status
diff --git a/TAO/tests/Multiple/server.cpp b/TAO/tests/Multiple/server.cpp
deleted file mode 100644
index fcaa75221f3..00000000000
--- a/TAO/tests/Multiple/server.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id$
-
-#include "Multiple_Impl.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (tests, server, "$Id$")
-
-int main (int argc, char *argv[])
-{
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Orb Initialization
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "TAO" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object;
- object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa = PortableServer::POA::_narrow(object.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- // Get the POAManager
- PortableServer::POAManager_var poa_manager = poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create the servant.
- Bottom_Impl servant (orb.in ());
-
- // Create the delegated servant and intialize it
- // with the "real" servant.
- Delegated_Bottom_Impl delegated_servant(servant._this (),
- orb.in ());
-
- // Create the CORBA Object that is incarnated by the
- // delegated servant.
- Multiple::Bottom_var bottom = delegated_servant._this ();
-
- // Now we stringfy the object reference.
- CORBA::String_var ior =
- orb->object_to_string (bottom.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
-
- FILE *output_file= ACE_OS::fopen ("s.ior", "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s"),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- // Activate the POAManager
- poa_manager->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION(ACE_ANY_EXCEPTION, "Multiple Execution Interrupted Exception!\n");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Multiple_Inheritance/.cvsignore b/TAO/tests/Multiple_Inheritance/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Multiple_Inheritance/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.idl b/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.idl
deleted file mode 100644
index df5e183c1da..00000000000
--- a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-interface A
-{
- string method1 ();
-};
-
-interface B : A
-{
- string method2 ();
-};
-
-interface C : A
-{
- string method3 ();
-};
-
-interface D : B, C
-{
- string method4 ();
-};
-
diff --git a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc b/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc
deleted file mode 100644
index f818ca1c940..00000000000
--- a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, utils {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- Multiple_InheritanceC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance_i.h b/TAO/tests/Multiple_Inheritance/Multiple_Inheritance_i.h
deleted file mode 100644
index da21a7210b2..00000000000
--- a/TAO/tests/Multiple_Inheritance/Multiple_Inheritance_i.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-#include "Multiple_InheritanceS.h"
-
-ACE_RCSID(Multiple_Inheritance, Multiple_Inheritance_i, "$Id$")
-
-class Multiple_Inheritance_i : public POA_D
-{
-public:
- Multiple_Inheritance_i (void);
-
- virtual char* method1 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup ("method1");
- }
- virtual char* method2 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup ("method2");
- }
- virtual char* method3 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup ("method3");
- }
- virtual char* method4 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup ("method4");
- }
-};
diff --git a/TAO/tests/Multiple_Inheritance/README b/TAO/tests/Multiple_Inheritance/README
deleted file mode 100644
index 09e5a587400..00000000000
--- a/TAO/tests/Multiple_Inheritance/README
+++ /dev/null
@@ -1,26 +0,0 @@
-This module is used as a test for IDL interfaces that inherit from
-multiple interfaces. The "diamond of death" inheritance hierarchy is
-used in this example where there is a common base class (A), two
-classes deriving from the common base class (B and C) and then a final
-derived class (D) that inherits from both B and C.
-
-The client starts off with CORBA Object, narrows to interface A, then
-B, then C, and finally D. It calls all the methods on each interface.
-
-Run the server without arguments. Then use the IOR generated by the
-server to run the client:
-
-client -k <ior>
-
-You should get the following output:
-
-method1
-method1
-method2
-method1
-method3
-method1
-method2
-method3
-method4
-
diff --git a/TAO/tests/Multiple_Inheritance/client.cpp b/TAO/tests/Multiple_Inheritance/client.cpp
deleted file mode 100644
index 8406386f614..00000000000
--- a/TAO/tests/Multiple_Inheritance/client.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-// $Id$
-//
-//===================================================================
-// = LIBRARY
-// TAO/tests/Multiple_Inheritance
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// A client program for the Multiple Inheritance module
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//====================================================================
-
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "Multiple_InheritanceC.h"
-#include "ace/OS_NS_fcntl.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Multiple_Inheritance, client, "$Id$")
-
-static char *ior = 0;
-static char *ior_input_file = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:f:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'f':
- ior_input_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "\nusage: %s "
- "-i <ior_input_file> "
- "-k IOR "
- "\n",
- argv [0]),
- -1);
- }
-
- if (ior == 0 && ior_input_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "\nPlease specify the IOR or IOR input file"
- " for the servant"),
- -1);
- if (ior != 0 && ior_input_file != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "\nPlease specify only an IOR or only an IOR"
- " input file but not both"),
- -1);
-
- // Indicates successful parsing of the command line.
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Initialize the ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse the command-line arguments to get the IOR
- parse_args (argc, argv);
-
- // If ior_input_file exists, Read the file, and get the IOR
- // else, it must have been specified on the command line
- if (ior_input_file != 0)
- {
- ACE_HANDLE input_file = ACE_OS::open (ior_input_file, 0);
- if (input_file == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open input file for reading IOR: %s\n",
- ior_input_file),
- -1);
- ACE_Read_Buffer ior_buffer (input_file);
- char *data = ior_buffer.read ();
- if (data == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior\n"),
- -1);
- ior = ACE_OS::strdup (data);
- ior_buffer.alloc ()-> free (data);
- ACE_OS::close (input_file);
- }
-
- // Get the object reference with the IOR
- CORBA::Object_var object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var string;
-
- // Narrow the object reference
- A_var a = A::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow the object reference
- B_var b = B::_narrow (a.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow the object reference
- C_var c = C::_narrow (a.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow the object reference
- D_var d = D::_narrow (c.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- string = a->method1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = b->method1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = b->method2 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = c->method1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = c->method3 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = d->method1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = d->method2 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = d->method3 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- string = d->method4 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "client");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Multiple_Inheritance/run_test.pl b/TAO/tests/Multiple_Inheritance/run_test.pl
deleted file mode 100755
index 2af5c5f4d62..00000000000
--- a/TAO/tests/Multiple_Inheritance/run_test.pl
+++ /dev/null
@@ -1,41 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-f server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-f $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-f $iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-$SV->Kill ();
-
-unlink $iorfile;
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- exit $client;
-}
-
-exit 0;
diff --git a/TAO/tests/Multiple_Inheritance/server.cpp b/TAO/tests/Multiple_Inheritance/server.cpp
deleted file mode 100644
index d29978c9163..00000000000
--- a/TAO/tests/Multiple_Inheritance/server.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Multiple_Inheritance_i.h"
-#include "tao/Utils/ORB_Manager.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Multiple_Inheritance, server, "$Id$")
-
-static char *ior_output_file = 0;
-
-Multiple_Inheritance_i::Multiple_Inheritance_i (void)
-{
- // Sun/CC 5.0 crashes if there is no explicit default
- // constructor
- // Default constructor, do nothin..
-}
-
-int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "f:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'f':
- ior_output_file = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-f <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int
-main (int argc, char **argv)
-{
- Multiple_Inheritance_i servant;
- TAO_ORB_Manager orb_manager;
-
- ACE_DEBUG ((LM_DEBUG, "\n\tMultiple Inheritance Server\n\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- orb_manager.init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- CORBA::String_var ior =
- orb_manager.activate_under_child_poa ("my_object",
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n",
- ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb_manager.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Muxed_GIOP_Versions/.cvsignore b/TAO/tests/Muxed_GIOP_Versions/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc b/TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc
deleted file mode 100644
index bfb96e8b536..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/Muxed_GIOP_Versions.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Muxed_GIOP_Versions/README b/TAO/tests/Muxed_GIOP_Versions/README
deleted file mode 100644
index 195cc3067c3..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/README
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-
-@page Muxed_GIOP_Versions Test README File
- This is stress test to make sure that TAO doesnt share the GIOP
-parsers between threads processing different GIOP versions.
-
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
-
diff --git a/TAO/tests/Muxed_GIOP_Versions/client.cpp b/TAO/tests/Muxed_GIOP_Versions/client.cpp
deleted file mode 100644
index 6a9cb60d163..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/client.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(MT_Client, client, "client.cpp,v 1.16 2002/01/29 20:21:08 okellogg Exp")
-
-const char *ior = "file://test.ior";
-const char *corbaloc_arg = "corbaloc:iiop:1.0@localhost:12000/ObjectName";
-int nthreads = 5;
-int niterations = 5;
-int server_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "l:k:n:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'l':
- corbaloc_arg = get_opts.opt_arg ();
- break;
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'x':
- server_shutdown = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-n <nthreads> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Client : public ACE_Task_Base
-{
- // = TITLE
- // Run the client thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run the client threads.
- //
-public:
- Client (Simple_Server_ptr server, int niterations);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // Validate the connection
-
-private:
- Simple_Server_var server_;
- // The server.
-
- int niterations_;
- // The number of iterations on each client thread.
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- Client client (server.in (), niterations);
- if (client.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- // While those threads are busy sending 1.2 messages
- // send some corba loc requests, don't really care if there is an
- // object there to find
- if (!server_shutdown)
- {
- ACE_DEBUG ((LM_DEBUG,
- "starting string_to_object %s \n",
- corbaloc_arg));
-
- for (int c = 0; c < (niterations * 2); c++)
- {
- ACE_TRY_EX (CORBALOC)
- {
- CORBA::Object_var probably_not_exist =
- orb->string_to_object(corbaloc_arg
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK_EX (CORBALOC);
-
- if (CORBA::is_nil(probably_not_exist.in()))
- {
- ACE_DEBUG ((LM_DEBUG, "not found\n", corbaloc_arg));
- }
- else
- {
- Simple_Server_var newserver =
- Simple_Server::_narrow (probably_not_exist.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (CORBALOC);
-
- // should throw an exception
- if (CORBA::is_nil(newserver.in()))
- {
- ACE_DEBUG ((LM_DEBUG, "not found it\n", corbaloc_arg));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "found it\n", corbaloc_arg));
- }
- }
- }
- ACE_CATCHANY
- {
- // ACE_DEBUG ((LM_DEBUG, "caught exception\n", corbaloc_arg));
- }
- ACE_ENDTRY;
- }
- }
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) waiting for threads\n"));
-
- client.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) threads finished\n"));
-
- if (server_shutdown)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Client::Client (Simple_Server_ptr server,
- int niterations)
- : server_ (Simple_Server::_duplicate (server)),
- niterations_ (niterations)
-{
-}
-
-void
-Client::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Ping the object 100 times, ignoring all exceptions.
- // It would be better to use validate_connection() but the test must
- // run on minimum CORBA builds too!
- for (int j = 0; j != 100; ++j)
- {
- ACE_TRY
- {
- this->server_->test_method (j ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- }
-}
-
-int
-Client::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i < this->niterations_; ++i)
- {
- this->server_->test_method (i ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n",
- i));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_Client: exception raised");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Muxed_GIOP_Versions/run_test.pl b/TAO/tests/Muxed_GIOP_Versions/run_test.pl
deleted file mode 100755
index 21ba72cf028..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/run_test.pl
+++ /dev/null
@@ -1,124 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-$TARGETHOSTNAME = "localhost";
-$orb_port=12000 + PerlACE::uniqueid ();
-$logfile = PerlACE::LocalFile("orb.$orb_port.log");
-unlink $iorfile;
-unlink $logfile;
-
-
-# Testing Options:
-# most effective is $serveriterations=1000 (with or without clients)
-$verbose = 1;
-$serverthreads = '10';
-$selfabusethreads = '5';
-$clientthreads = '5';
-$serveriterations = 1000;
-$clientiterations = 1000;
-$clients = 1;
-
-# use GIOP 1.0
-$corbaloc_str = "corbaloc:iiop:1.0\@$TARGETHOSTNAME:$orb_port/SomeObjectNameThatDontExist";
-
-
-# ORBDebugLevel 10 seems to encourage the problem
-# -ORBCollocation no is required for server to produce the problem
-$serverargs = "-ORBCollocation no -ORBdebuglevel 10 -ORBLogFile $logfile " .
- "-ORBEndpoint iiop://$TARGETHOSTNAME:$orb_port -o $iorfile " .
- "-i $serveriterations -n $serverthreads -c $selfabusethreads " .
- "-l $corbaloc_str";
-
-$SV = new PerlACE::Process ("server", $serverargs);
-
-$clientargs = "-ORBdebuglevel 10 -ORBLogFile $logfile -l $corbaloc_str -k file://$iorfile -n $clientthreads -i $clientiterations";
-
-$CL1 = new PerlACE::Process ("client", $clientargs);
-$CL2 = new PerlACE::Process ("client", $clientargs);
-$CL3 = new PerlACE::Process ("client", $clientargs);
-$CLS = new PerlACE::Process ("client", "-l $corbaloc_str -k file://$iorfile -i 1 -x ");
-
-
-#print STDERR $SV->CommandLine(), "\n" if $verbose;
-
-print STDERR "***** Start the server*** \n" if $verbose;
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 50) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-# leave server reap some self abuse before clients start abusing it
-if ($serveriterations > 20) {
- $server = $SV->TimedWait(10);
-}
-
-print STDERR "****** Start the clients*** \n" if $verbose;
-if ($clients > 0) {
- print STDERR $CL1->CommandLine(), "\n" if $verbose;
- $CL1->Spawn ();
-}
-if ($clients > 1) { $CL2->Spawn (); }
-if ($clients > 2) { $CL3->Spawn (); }
-
-
-if ($clients > 0) {
- $client = $CL1->WaitKill (210);
-
- if ($client != 0) {
- print STDERR "ERROR: client 1 returned $client\n";
- $status = 1;
- }
-}
-
-if ($clients > 1) {
- $client = $CL2->WaitKill (5);
-
- if ($client != 0) {
- print STDERR "ERROR: client 2 returned $client\n";
- $status = 1;
- }
-}
-
-if ($clients > 2) {
- $client = $CL3->WaitKill (5);
-
- if ($client != 0) {
- print STDERR "ERROR: client 3 returned $client\n";
- $status = 1;
-}
-
-}
-
-$client = $CLS->SpawnWaitKill (15);
-
-if ($client != 0) {
- print STDERR "ERROR: client 4 returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (150);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-unlink $logfile;
-
-exit $status;
-
diff --git a/TAO/tests/Muxed_GIOP_Versions/server.cpp b/TAO/tests/Muxed_GIOP_Versions/server.cpp
deleted file mode 100644
index e911f5aa83c..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/server.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ace/Synch_T.h"
-
-ACE_RCSID(MT_Server, server, "server.cpp,v 1.7 2002/01/29 20:21:08 okellogg Exp")
-
-const char *ior_output_file = 0;
-const char *corbaloc_arg = "corbaloc:iiop:1.0@localhost:12000/ObjectName";
-int niterations = 5;
-
-int nthreads = 4;
-int nclient_threads = nthreads;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "c:l:i:o:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'c':
- nclient_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'l':
- corbaloc_arg = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-c <# client threads> "
- "-i <# iterations> "
- "-l <corba loc> "
- "-n <# server threads> "
- "-o <iorfile> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-/*****************************************************/
-
-class Worker : public ACE_Task_Base
-{
- // = TITLE
- // Run a server thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run server threads
- //
-public:
- /// ctor
- Worker (CORBA::ORB_ptr orb);
-
- /// The thread entry point.
- virtual int svc (void);
-
-private:
-
- /// The orb
- CORBA::ORB_var orb_;
-};
-
-/*****************************************************/
-
-class SelfClient : public ACE_Task_Base
-{
- // = TITLE
- // Run the client thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run the client threads.
- //
-public:
- SelfClient (CORBA::ORB_ptr orb, Simple_Server_ptr server, int niterations);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // Validate the connection
-
-private:
-
- /// The server.
- Simple_Server_var server_;
-
- CORBA::ORB_var orb_;
-
- /// The number of iterations on each client thread.
- int niterations_;
-
-
- ACE_SYNCH_MUTEX mutex_;
-};
-
-/***************************************************/
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i *server_impl = 0;
- ACE_NEW_RETURN (server_impl,
- Simple_Server_i (orb.in ()),
- -1);
-
- PortableServer::ServantBase_var owner_transfer(server_impl);
-
- Simple_Server_var server =
- server_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Worker worker (orb.in ());
- if (worker.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot activate client threads\n"),
- 1);
-
- SelfClient selfabuse (orb.in(), server.in(), niterations);
- if (selfabuse.activate (THR_NEW_LWP | THR_JOINABLE,
- nclient_threads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot activate abusive threads\n"),
- 1);
-
- selfabuse.thr_mgr()->wait();
-
- worker.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Worker::Worker (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Worker::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- ACE_Time_Value tv (140, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
- return 0;
-}
-
-// ****************************************************************
-
-SelfClient::SelfClient (CORBA::ORB_ptr orb, Simple_Server_ptr server,
- int niterations)
- : server_ (Simple_Server::_duplicate (server)),
- orb_ (CORBA::ORB::_duplicate (orb)),
- niterations_ (niterations)
-{
-}
-
-void
-SelfClient::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Ping the object 100 times, ignoring all exceptions.
- // It would be better to use validate_connection() but the test must
- // run on minimum CORBA builds too!
- ACE_GUARD (ACE_SYNCH_MUTEX, guard, mutex_);
-
- for (int j = 0; j != 100; ++j)
- {
- ACE_TRY
- {
- this->server_->test_method (j ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- }
-}
-
-int
-SelfClient::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i < this->niterations_; ++i)
- {
- ACE_TRY_EX (CORBALOC)
- {
- CORBA::Object_var probably_not_exist =
- orb_->string_to_object (corbaloc_arg
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK_EX (CORBALOC);
-
- if (CORBA::is_nil (probably_not_exist.in()))
- {
- ACE_DEBUG ((LM_DEBUG, "not found\n", corbaloc_arg));
- }
- else
- {
- Simple_Server_var newserver =
- Simple_Server::_narrow (probably_not_exist.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (CORBALOC);
-
- // should throw an exception
- if (CORBA::is_nil (newserver.in()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Not found it \n"));
-
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Found it \n"));
- }
- }
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_SelfClient: exception raised");
- }
- ACE_ENDTRY;
-
- // Just make a call
- this->server_->test_method (i ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_SelfClient: exception raised");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Muxed_GIOP_Versions/test.idl b/TAO/tests/Muxed_GIOP_Versions/test.idl
deleted file mode 100644
index aa227c3b110..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server
-{
- long test_method (in long x);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Muxed_GIOP_Versions/test_i.cpp b/TAO/tests/Muxed_GIOP_Versions/test_i.cpp
deleted file mode 100644
index 07e359a2f52..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/test_i.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/debug.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(MT_Server, test_i, "test_i.cpp,v 1.6 2002/01/29 20:21:08 okellogg Exp")
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n"));
- ACE_Time_Value tv (0, (x % 1000));
- ACE_OS::sleep (tv);
- return x;
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // We dont shutdown the ORB. We allow the server to go away as it
- // wants.
- // this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Muxed_GIOP_Versions/test_i.h b/TAO/tests/Muxed_GIOP_Versions/test_i.h
deleted file mode 100644
index 65fa40ed8b2..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/test_i.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/MT_Server
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_MT_SERVER_TEST_I_H
-#define TAO_MT_SERVER_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_MT_SERVER_TEST_I_H */
diff --git a/TAO/tests/Muxed_GIOP_Versions/test_i.i b/TAO/tests/Muxed_GIOP_Versions/test_i.i
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/Muxed_GIOP_Versions/test_i.i
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/Muxing/.cvsignore b/TAO/tests/Muxing/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Muxing/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Muxing/Client_Task.cpp b/TAO/tests/Muxing/Client_Task.cpp
deleted file mode 100644
index 01960176f11..00000000000
--- a/TAO/tests/Muxing/Client_Task.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Receiver_ptr receiver,
- CORBA::Long event_count,
- CORBA::ULong event_size,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , receiver_ (Test::Receiver::_duplicate (receiver))
- , event_count_ (event_count)
- , event_size_ (event_size)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
- Test::Payload payload (this->event_size_);
- payload.length (this->event_size_);
-
- for (CORBA::ULong j = 0; j != payload.length (); ++j)
- payload[j] = (j % 256);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- for (int i = 0; i != this->event_count_; ++i)
- {
- this->receiver_->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Muxing/Client_Task.h b/TAO/tests/Muxing/Client_Task.h
deleted file mode 100644
index bca7ea378fe..00000000000
--- a/TAO/tests/Muxing/Client_Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef MUXING_CLIENT_TASK_H
-#define MUXING_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Receiver_ptr receiver,
- CORBA::Long event_count,
- CORBA::ULong event_size,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the test interface
- Test::Receiver_var receiver_;
-
- /// Total number of events
- CORBA::Long event_count_;
-
- /// Size of each message
- CORBA::ULong event_size_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* MUXING_CLIENT_TASK_H */
diff --git a/TAO/tests/Muxing/Muxing.mpc b/TAO/tests/Muxing/Muxing.mpc
deleted file mode 100644
index 1d115e8dc19..00000000000
--- a/TAO/tests/Muxing/Muxing.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Receiver.cpp
- Server_Task.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- Client_Task.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Muxing/README b/TAO/tests/Muxing/README
deleted file mode 100644
index eff764aa910..00000000000
--- a/TAO/tests/Muxing/README
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
-
-@page Muxing Test README File
-
- A stress test for connection muxing. Just send a lot of
-requests concurrently, using the muxed connections configuration. The
-test was written to rule out problems with this feature while testing
-something else.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Muxing/Receiver.cpp b/TAO/tests/Muxing/Receiver.cpp
deleted file mode 100644
index 6ffff418f91..00000000000
--- a/TAO/tests/Muxing/Receiver.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $Id$
-//
-#include "Receiver.h"
-
-ACE_RCSID(Muxing, Receiver, "$Id$")
-
-Receiver::Receiver (void)
- : message_count_ (0)
- , byte_count_ (0)
-{
-}
-
-void
-Receiver::dump_results ()
-{
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- ACE_DEBUG ((LM_DEBUG,
- "Total messages = %d\n"
- "Total bytes = %d\n",
- this->message_count_,
- this->byte_count_));
-}
-
-void
-Receiver::receive_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- this->message_count_++;
- this->byte_count_ += payload.length ();
-}
-
-CORBA::Long
-Receiver::get_event_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
- return this->message_count_;
-}
diff --git a/TAO/tests/Muxing/Receiver.h b/TAO/tests/Muxing/Receiver.h
deleted file mode 100644
index d8db9cc926b..00000000000
--- a/TAO/tests/Muxing/Receiver.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef MUXING_RECEIVER_H
-#define MUXING_RECEIVER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-#if defined (_MSC_VER)
-# pragma warning(push)
-# pragma warning (disable:4250)
-#endif /* _MSC_VER */
-
-/// Implement the Test::Receiver interface
-/**
- * Simply print count how many bytes were received.
- */
-class Receiver
- : public POA_Test::Receiver
-{
-public:
- /// Constructor
- Receiver (void);
-
- /// Print out the results
- void dump_results (void);
-
- // = The skeleton methods
- virtual void receive_data (const Test::Payload &payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::Long get_event_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- ACE_SYNCH_MUTEX mutex_;
- CORBA::ULong message_count_;
- CORBA::ULong byte_count_;
-};
-
-#if defined(_MSC_VER)
-# pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* MUXING_RECEIVER_H */
diff --git a/TAO/tests/Muxing/Server_Task.cpp b/TAO/tests/Muxing/Server_Task.cpp
deleted file mode 100644
index 828f010158d..00000000000
--- a/TAO/tests/Muxing/Server_Task.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// $Id$
-//
-
-#include "Server_Task.h"
-
-ACE_RCSID(Muxing, Server_Task, "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // run the test for at most 120 seconds...
- ACE_Time_Value tv (120, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Muxing/Server_Task.h b/TAO/tests/Muxing/Server_Task.h
deleted file mode 100644
index 5004b37e1f0..00000000000
--- a/TAO/tests/Muxing/Server_Task.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef MUXING_SERVER_TASK_H
-#define MUXING_SERVER_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* MUXING_SERVER_TASK_H */
diff --git a/TAO/tests/Muxing/Test.idl b/TAO/tests/Muxing/Test.idl
deleted file mode 100644
index 6a3b8921c78..00000000000
--- a/TAO/tests/Muxing/Test.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- typedef sequence<octet> Payload;
-
- interface Receiver {
- /// Receive a big payload
- void receive_data (in Payload the_payload);
-
- /// Return the number of messages received so far
- long get_event_count ();
- };
-};
diff --git a/TAO/tests/Muxing/client.cpp b/TAO/tests/Muxing/client.cpp
deleted file mode 100644
index 01e0b962d78..00000000000
--- a/TAO/tests/Muxing/client.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Muxing, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Receiver_var receiver =
- Test::Receiver::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (receiver.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
-
- Client_Task client_task (receiver.in (),
- 1000,
- 32768,
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::Long count = receiver->get_event_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P) - Receiver got %d messages\n",
- count));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Muxing/run_test.pl b/TAO/tests/Muxing/run_test.pl
deleted file mode 100755
index b9cf425b774..00000000000
--- a/TAO/tests/Muxing/run_test.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL1 = new PerlACE::Process ("client", " -k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn (60);
-$CL2->Spawn (60);
-
-$client1 = $CL1->WaitKill (60);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-$client2 = $CL2->WaitKill (60);
-
-if ($client2 != 0) {
- print STDERR "ERROR: client 2 returned $client2\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Muxing/server.cpp b/TAO/tests/Muxing/server.cpp
deleted file mode 100644
index 06a120b2183..00000000000
--- a/TAO/tests/Muxing/server.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// $Id$
-
-#include "Receiver.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Muxing, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Receiver *receiver_impl;
- ACE_NEW_RETURN (receiver_impl,
- Receiver,
- 1);
- PortableServer::ServantBase_var receiver_owner_transfer(receiver_impl);
-
- Test::Receiver_var receiver =
- receiver_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (receiver.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task server_task (orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Now terminating test\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Muxing/svc.conf b/TAO/tests/Muxing/svc.conf
deleted file mode 100644
index 7e53e48c97d..00000000000
--- a/TAO/tests/Muxing/svc.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# $Id$
-#
-static Client_Strategy_Factory "-ORBTransportMuxStrategy MUXED"
-static Resource_Factory "-ORBMuxedConnectionMax 1"
diff --git a/TAO/tests/Muxing/svc.conf.xml b/TAO/tests/Muxing/svc.conf.xml
deleted file mode 100644
index 80c2dce69fe..00000000000
--- a/TAO/tests/Muxing/svc.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Muxing/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="Client_Strategy_Factory" params="-ORBTransportMuxStrategy MUXED"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Native_Exceptions/.cvsignore b/TAO/tests/Native_Exceptions/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Native_Exceptions/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Native_Exceptions/Native_Exceptions.mpc b/TAO/tests/Native_Exceptions/Native_Exceptions.mpc
deleted file mode 100644
index 1b292027ede..00000000000
--- a/TAO/tests/Native_Exceptions/Native_Exceptions.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, anytypecode, exceptions {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode, exceptions {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Native_Exceptions/README b/TAO/tests/Native_Exceptions/README
deleted file mode 100644
index 89ada33539c..00000000000
--- a/TAO/tests/Native_Exceptions/README
+++ /dev/null
@@ -1,12 +0,0 @@
-# $Id$
-
- Simple test to show (and verify) that TAO can generate code
-for platforms with native exception support, including passing the
-exception around.
-
- To run just do:
-
-$ server -o test.ior
-$ client -k file://test.ior
-
- or use the run_test.pl script
diff --git a/TAO/tests/Native_Exceptions/client.cpp b/TAO/tests/Native_Exceptions/client.cpp
deleted file mode 100644
index 67811435ae2..00000000000
--- a/TAO/tests/Native_Exceptions/client.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-
-ACE_RCSID(Native_Exceptions, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 100;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- try
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior);
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in ());
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- for (int i = 0; i != niterations; ++i)
- {
- if (server->test_method (i) != i)
- {
- ACE_ERROR ((LM_ERROR,
- "Unexpected result from test_method\n"));
- }
-
- try
- {
- server->test_raise (i);
- ACE_ERROR ((LM_ERROR,
- "The test_raise call didn't raise\n"));
- }
- catch (Simple_Server::Failure &fail)
- {
- ACE_UNUSED_ARG (fail);
- // Do nothing, this is the normal behavior...
- }
- }
-
- server->shutdown ();
- }
- catch (CORBA::SystemException &ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Caught exception:");
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/Native_Exceptions/run_test.pl b/TAO/tests/Native_Exceptions/run_test.pl
deleted file mode 100755
index 7028882d0f3..00000000000
--- a/TAO/tests/Native_Exceptions/run_test.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -i 1000");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Native_Exceptions/server.cpp b/TAO/tests/Native_Exceptions/server.cpp
deleted file mode 100644
index 6e41137344e..00000000000
--- a/TAO/tests/Native_Exceptions/server.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Native_Exceptions, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- try
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "");
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ());
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager ();
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this ();
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ());
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate ();
-
- orb->run ();
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- catch (CORBA::SystemException &ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Caught exception:");
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/Native_Exceptions/test.idl b/TAO/tests/Native_Exceptions/test.idl
deleted file mode 100644
index 9ee5a442985..00000000000
--- a/TAO/tests/Native_Exceptions/test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server
-{
- long test_method (in long x);
-
- exception Failure {};
- long test_raise (in long x) raises (Failure);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Native_Exceptions/test_i.cpp b/TAO/tests/Native_Exceptions/test_i.cpp
deleted file mode 100644
index 6f97c7e937b..00000000000
--- a/TAO/tests/Native_Exceptions/test_i.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(Native_Exceptions, test_i, "$Id$")
-
-CORBA::Long
-Simple_Server_i::test_method (CORBA::Long x)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return x;
-}
-
-CORBA::Long
-Simple_Server_i::test_raise (CORBA::Long x)
- ACE_THROW_SPEC ((Simple_Server::Failure))
-{
- ACE_UNUSED_ARG (x);
- throw Simple_Server::Failure ();
-
-# if defined (WIN32) || defined (__HP_aCC)
- return x;
-#endif /*WIN32 & HP */
-}
-
-void
-Simple_Server_i::shutdown (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/Native_Exceptions/test_i.h b/TAO/tests/Native_Exceptions/test_i.h
deleted file mode 100644
index 9eff4904908..00000000000
--- a/TAO/tests/Native_Exceptions/test_i.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Native_Exceptions
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_NATIVE_EXCEPTIONS_TEST_I_H
-#define TAO_NATIVE_EXCEPTIONS_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Long x)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- CORBA::Long test_raise (CORBA::Long x)
- ACE_THROW_SPEC ((Simple_Server::Failure));
-
- void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_NATIVE_EXCEPTIONS_TEST_I_H */
diff --git a/TAO/tests/Native_Exceptions/test_i.i b/TAO/tests/Native_Exceptions/test_i.i
deleted file mode 100644
index 97524552ff4..00000000000
--- a/TAO/tests/Native_Exceptions/test_i.i
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/.cvsignore b/TAO/tests/NestedUpcall/MT_Client_Test/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.idl b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.idl
deleted file mode 100644
index f93b53177b9..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.idl
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpcall/Triangle_Test
-//
-// = FILENAME
-// Triangle_Test.idl
-//
-// = DESCRIPTION
-// An example of how nested upcalls work/fail?
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-
-
-interface Object_A {
-
- long foo (in long time);
-
-};
-
-interface MT_Object;
-
-interface MT_Object
-{
- long yadda (in long hop_count, in MT_Object partner);
-};
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc
deleted file mode 100644
index 35e6a89edfd..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Client_Test.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Nested_Upcall_Server): taoserver, utils {
- Source_Files {
- MT_Object_i.cpp
- server.cpp
- }
-}
-
-project(*Nested_Upcall_Client): taoexe, utils, portableserver {
- after += *Nested_Upcall_Server
- Source_Files {
- MT_Object_i.cpp
- local_server.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.cpp
deleted file mode 100644
index 0aa90db52b6..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client_Test
-//
-// = FILENAME
-// MT_Object_i.cpp
-//
-// = DESCRIPTION
-// This class implements the Object A of the
-// Nested Upcalls - MT Client test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "MT_Object_i.h"
-
-#include "tao/Exception.h"
-
-ACE_RCSID(MT_Client_Test, MT_Object_i, "$Id$")
-
-#define MAX_HOP_COUNT 20
-
-// CTOR
-MT_Object_i::MT_Object_i (void)
-{
-}
-
-// DTOR
-MT_Object_i::~MT_Object_i (void)
-{
-}
-
-
-CORBA::Long
-MT_Object_i::yadda (CORBA::Long hop_count,
- MT_Object_ptr partner
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) MT_Object_i::yadda () hop count = %d\n",
- hop_count));
-#endif /*if 0*/
-
- if (hop_count < MAX_HOP_COUNT)
- {
- if (partner != 0)
- return partner->yadda (hop_count + 1,
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER)
- ACE_ENV_ARG_PARAMETER) + 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.h b/TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.h
deleted file mode 100644
index de5d9893297..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/MT_Object_i.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client test
-//
-// = FILENAME
-// MT_Object_A_i.h
-//
-// = DESCRIPTION
-// This class implements the Object A of the
-// Nested Upcalls - MT Client test
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef MT_OBJECT_IMPL_H
-# define MT_OBJECT_IMPL_H
-
-#include "MT_Client_TestS.h"
-#include "MT_Client_TestC.h"
-
-class MT_Object_i : public POA_MT_Object
-{
- // = TITLE
- // Implement the <MT_Object> IDL interface.
-public:
- MT_Object_i (void);
- // Constructor.
-
- virtual ~MT_Object_i (void);
- // Destructor.
-
- virtual CORBA::Long yadda (CORBA::Long hop_count,
- MT_Object_ptr partner
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-};
-
-#endif /* MT_OBJECT_IMPL_H */
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/README b/TAO/tests/NestedUpcall/MT_Client_Test/README
deleted file mode 100644
index e1827ccb167..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/README
+++ /dev/null
@@ -1,41 +0,0 @@
-
-Multiple Client and global resources test
-=========================================
-
-
-This test uses global resources, meaning one ORB and one Reactor.
-Several client threads are created, which call one of the two servers.
-This means, two server instances should be running. Also one
-server thread is running, doing nested upcalls to the same server.
-
-The intention is to see if global resources with multiple threads work.
-
-The client understands the following switches:
-
--f file of the ior of the first server, used by approx. half of the
- client threads and the local server thread.
-
--g file of the ior of the second server
-
--n number of client threads {0..infty :-)}
-
--i number of client iterations
-
--s number of local server iterations
-
-
-server switches:
-
--o file to put the ior
-
-
-
-Usage:
-
-server -o ior1
-server -o ior2
-
-//for two client threads, 10 iterations and 5 server iterations
-client -f ior1 -g ior2 -n 2 -i 10 -s 5
-
-! Don't forget the ORB port for the client!
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.conf b/TAO/tests/NestedUpcall/MT_Client_Test/client.conf
deleted file mode 100644
index 6319ee86fc5..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/client.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# $Id$
-#
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory()
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.conf.xml b/TAO/tests/NestedUpcall/MT_Client_Test/client.conf.xml
deleted file mode 100644
index e68a5b8e8ff..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/client.conf.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/NestedUpcall/MT_Client_Test/client.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <dynamic id="Client_Strategy_Factory" type="Service_Object">
- <initializer path="TAO" init="_make_TAO_Default_Client_Strategy_Factory"/>
- </dynamic>
- <dynamic id="Server_Strategy_Factory" type="Service_Object">
- <initializer path="TAO" init="_make_TAO_Default_Server_Strategy_Factory"/>
- </dynamic>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
deleted file mode 100644
index ba1c615cd55..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client_Test
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// Start one server thread calling a distant MT Object serveral times,
-// also starting serveral client threads which call the MT Object too.
-// The server does nested upcalls.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "client.h"
-#include "local_server.h"
-#include "tao/debug.h"
-#include "tao/Utils/ORB_Manager.h"
-#include "ace/Read_Buffer.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/OS_NS_fcntl.h"
-
-ACE_RCSID(MT_Client_Test, client, "$Id$")
-
-MT_Client_Task::MT_Client_Task (int argc, char **argv,
- int client_number)
- : argc_ (argc),
- argv_ (argv),
- client_number_ (client_number)
-{
-}
-
-int
-MT_Client_Task::svc (void)
-{
- if (this->mT_Client_.init (this->argc_,
- this->argv_,
- this->client_number_) == -1)
- return 1;
- else
- return this->mT_Client_.run ();
-}
-
-// Constructor.
-MT_Client::MT_Client ()
- : object_key_ (0),
- iterations_ (1)
-{
-}
-
-
-// Reads the Object A IOR from a file
-
-int
-MT_Client::read_ior (char *filename)
-{
- // Open the file for reading.
- ACE_HANDLE f_handle = ACE_OS::open (filename,0);
-
- if (f_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for reading: %p\n",
- filename),
- -1);
-
- ACE_Read_Buffer ior_buffer (f_handle);
-
- this->object_key_ = ior_buffer.read ();
- if (this->object_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to allocate memory to read ior: %p\n"),
- -1);
-
- ACE_OS::close (f_handle);
- return 0;
-}
-
-
-// Parses the command line arguments and returns an error status.
-
-int
-MT_Client::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "df:g:h:i:n:s:");
- int c;
- int result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag
- TAO_debug_level++;
- break;
- // Depending on the thread ID we pick the IOR
- case 'f': // read the IOR from the file.
- if ((this->client_number_ % 2) == 0)
- {
- result = this->read_ior (get_opts.opt_arg ());
- // read IOR for MT Object
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.opt_arg ()),
- -1);
- }
- break;
- case 'g': // read the IOR from the file.
- if ((this->client_number_ % 2) == 1)
- {
- result = this->read_ior (get_opts.opt_arg ());
- // read IOR for Object A
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.opt_arg ()),
- -1);
- }
- break;
- case 'i': this->iterations_ = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'h':
- case 'n':
- case 's':
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s\n"
- " [-f] first server ior file\n"
- " [-g] second server ior file\n"
- " [-h] third server ior file\n"
- " [-i] client iterations\n"
- " [-n] number of client threads\n"
- " [-s] number of server iterations\n",
- this->argv_ [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-MT_Client::run (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- for (unsigned long i = 0; i < this->iterations_; i++)
- {
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) MT_Client::run: %d of %d\n",
- i,
- this->iterations_));
-#endif /*if 0*/
-
- // call the recursive object MT_Object for nested upcalls
- // testing
- this->mT_Object_var_->yadda (0,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_Client:run");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-MT_Client::~MT_Client (void)
-{
- if (this->object_key_ != 0)
- ACE_OS::free (this->object_key_);
- if (this->argv_ != 0)
- delete [] this->argv_;
-}
-
-
-int
-MT_Client::init (int argc, char **argv,
- int client_number)
-{
-
- // Make a copy of argv since ORB_init will change it.
- this->argc_ = argc;
- this->argv_ = new char *[argc];
- for (int i = 0; i < argc; i++)
- this->argv_[i] = argv[i];
-
-
- this->client_number_ = client_number;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- char buf[64];
- ACE_OS::sprintf (buf, "thread_%lx", reinterpret_cast<long> (this));
-
- this->orb_var_ =
- CORBA::ORB_init (this->argc_,
- this->argv_,
- buf
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse command line and verify parameters.
- if (this->parse_args () == -1)
- return -1;
-
- if (this->object_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "The IOR is nil, not able to get the object.\n"),
- -1);
-
-
- CORBA::Object_var object_var =
- this->orb_var_->string_to_object (this->object_key_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (object_var.in()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "No proper object has been returned.\n"),
- -1);
-
- this->mT_Object_var_ = MT_Object::_narrow (object_var.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (this->mT_Object_var_.in()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "We have no proper reference to the Object.\n"),
- -1);
- }
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "We have a proper reference to the Object.\n"));
-
- CORBA::Object_var poa_object =
- this->orb_var_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_Client::init");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-// This function runs the test.
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- TAO_ORB_Manager orb_manager;
-
- int r = orb_manager.init (argc,
- argv
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: ORB_Manager initialization failed.\n"),
- -1);
-
- ACE_DEBUG ((LM_DEBUG,"\n\tMT_Client: client\n\n"));
-
- int i;
- int threads = 1;
-
- for (i = 0; i < argc; i++)
- if (ACE_OS::strcmp (argv[i], "-n") == 0)
- threads = ACE_OS::atoi(argv[i + 1]);
-
- // create a separate server thread
- ACE_Thread_Manager server_thr_mgr;
- // starting the server thread
- MT_Server_Task *server = new MT_Server_Task (&server_thr_mgr,
- argc,
- argv,
- &orb_manager);
- if (server->activate () != 0)
- {
- delete server;
- ACE_ERROR_RETURN ((LM_ERROR,
- "CLIENT ERROR: Unable to activate "
- "MT_Server_Task.\n"),
- -1);
- }
-
- // starting the client threads
- MT_Client_Task **clients = new MT_Client_Task*[threads];
-
- for (i = 0; i < threads; i++)
- clients[i] = new MT_Client_Task (argc, argv, i);
-
- for (i = 0; i < threads; i++)
- if (clients[i]->activate () != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "CLIENT ERROR: Unable to activate "
- "MT_Client_Task.\n"),
- -1); // @@ Memory leak!
-
- int result = ACE_Thread_Manager::instance ()->wait ();
-
- for (i = 0; i < threads; i++)
- delete clients[i];
-
- delete [] clients;
-
- // wait for the server thread to end
- result |= server_thr_mgr.wait ();
-
- delete server;
-
- return result;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "main");
- }
- ACE_ENDTRY;
-
- return 1;
-}
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.h b/TAO/tests/NestedUpcall/MT_Client_Test/client.h
deleted file mode 100644
index 0422ed8d7aa..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/client.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client_Test
-//
-// = FILENAME
-// client.h
-//
-// = DESCRIPTION
-// Test for multithreaded client using one global ORB (and Reactor)
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef MT_CLIENT_H
-#define MT_CLIENT_H
-
-#include "ace/Get_Opt.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.h"
-#include "ace/Thread_Manager.h"
-#include "tao/ORB.h"
-#include "MT_Client_TestC.h"
-
-class MT_Client
-{
- // = TITLE
- // A simple client talking to one server
- //
- // = DESCRIPTION
- // It is connecting to a server which holds the Object_A
- // or using the "-m" switch to a server holding the MT_Object
-
-public:
- MT_Client (void);
- ~MT_Client (void);
- // = Constructor and destructor.
-
- int run (void);
- // Execute client example code.
-
- int init (int argc,
- char **argv,
- int client_number);
- // Initialize the client communication endpoint with server.
-
-private:
- int read_ior (char *filename);
- // reading the IOR of object A in
-
- int parse_args (void);
- // Parses the arguments passed on the command line.
-
- int argc_;
- // # of arguments on the command line.
-
- char **argv_;
- // arguments from command line.
-
- char *object_key_;
- // Key of the object
-
- int shutdown_;
- // Flag to tell server to shutdown.
-
- CORBA::ORB_var orb_var_;
- // Remember our orb.
-
- MT_Object_var mT_Object_var_;
- // pointer to the mt Object
-
- int client_number_;
- // This is used to choose the server...
-
- unsigned long iterations_;
- // number of loops
-
-};
-
-class MT_Client_Task : public ACE_Task<ACE_SYNCH>
-{
- // = TITLE
- // Wrapper for the MT_Client to be an extra thread
- //
- // = DESCRIPTION
- // No big purpose, just wrapping
-public:
- MT_Client_Task (int argc, char **argv, int client_number);
-
- virtual int svc (void);
-
-private:
- MT_Client mT_Client_;
- int argc_;
- char **argv_;
-
- int client_number_;
- // To determine if we use the first or the second server.
-};
-
-#endif /* MT_CLIENT_H */
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp
deleted file mode 100644
index 36e81ffa7c3..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client_Test
-//
-// = FILENAME
-// local_server.cpp
-//
-// = DESCRIPTION
-// This server will run the ORB briefly and then make
-// several calls on the distant MT Object.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "local_server.h"
-#include "tao/debug.h"
-#include "ace/Read_Buffer.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/OS_NS_fcntl.h"
-#include "tao/Utils/ORB_Manager.h"
-
-ACE_RCSID(MT_Client_Test, local_server, "$Id$")
-
-MT_Server_Task::MT_Server_Task (ACE_Thread_Manager* thr_mgr_ptr,
- int argc,
- char **argv,
- TAO_ORB_Manager* orb_manager_ptr)
- :ACE_Task<ACE_SYNCH> (thr_mgr_ptr),
- argc_ (argc),
- argv_ (argv),
- orb_manager_ptr_ (orb_manager_ptr)
-{
-}
-
-int
-MT_Server_Task::svc (void)
-{
- if (this->mT_Server_.init (this->argc_,
- this->argv_,
- this->orb_manager_ptr_) == -1)
- return 1;
- else
- return this->mT_Server_.run_ORB_briefly ();
-}
-
-
-MT_Server::MT_Server ()
- : object_key_ (0),
- ior_output_file_ (0),
- orb_manager_ptr_ (0),
- iterations_ (1)
-{
-}
-
-// Reads the MT Object IOR from a file
-int
-MT_Server::read_ior (char *filename)
-{
- // Open the file for reading.
- ACE_HANDLE f_handle = ACE_OS::open (filename,0);
-
- if (f_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for reading: %p\n",
- filename),
- -1);
-
- ACE_Read_Buffer ior_buffer (f_handle);
-
- this->object_key_ = ior_buffer.read ();
- if (this->object_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to allocate memory to read ior: %p\n"),
- -1);
-
- ACE_OS::close (f_handle);
- return 0;
-}
-
-
-
-int
-MT_Server::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "d:f:g:h:i:n:s:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'h': // read the IOR from the file.
- int result;
- result = this->read_ior (get_opts.opt_arg ());
- // read IOR for MT Object
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.opt_arg ()),
- -1);
- break;
- case 'f':
- case 'g':
- case 'i':
- case 'n':
- break;
- case 's': this->iterations_ = atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]\n"
- " [-f] first server ior file\n"
- " [-g] second server ior file\n"
- " [-h] third server ior file\n"
- " [-i] client iterations\n"
- " [-n] number of client threads\n"
- " [-s] number of server iterations\n"
- "\n",
- argv_ [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-MT_Server::init (int argc,
- char** argv,
- TAO_ORB_Manager* orb_manager_ptr)
-{
- this->argc_ = argc;
- this->argv_ = argv;
- if ((this->orb_manager_ptr_ = orb_manager_ptr) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "MT_Server::init: ORB_Manager is nil!\n"),
- -1);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Call the init of TAO_ORB_Manager to create a child POA
- // under the root POA.
- this->orb_manager_ptr_->init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- this->parse_args ();
- // ~~ check for the return value here
-
- this->str_ =
- this->orb_manager_ptr_->activate_under_child_poa ("MT",
- &this->mT_Object_i_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "The IOR is: <%s>\n",
- this->str_.in ()));
-#endif /*if 0*/
-
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- this->str_.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
- // retrieve the object reference to the distant mt object
- if (this->object_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "The IOR is nil, not able to get the object.\n"),
- -1);
-
- CORBA::ORB_var orb_var = this->orb_manager_ptr_->orb ();
-
- CORBA::Object_var object_var =
- orb_var->string_to_object (this->object_key_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (object_var.in()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "No proper object has been returned.\n"),
- -1);
-
- this->mT_Object_var_ = MT_Object::_narrow (object_var.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (this->mT_Object_var_.in()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "We have no proper reference to the Object.\n"),
- -1);
- }
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "We have a proper reference to the Object.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "MT_Client::init");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-MT_Server::run ()
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- int r = this->orb_manager_ptr_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "MT_Server::run"),
- -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "MT_Server::run");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-MT_Server::~MT_Server (void)
-{
- if (this->object_key_ != 0)
- ACE_OS::free (this->object_key_);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- if (this->orb_manager_ptr_)
- this->orb_manager_ptr_->deactivate_under_child_poa (this->str_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "MT_Client::~MT_Client");
- }
- ACE_ENDTRY;
-}
-
-
-int
-MT_Server::run_ORB_briefly (void)
-{
- if (this->iterations_ > 0)
- {
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) MT_Server::run: "
- "going to call distant MT Object\n"));
-
- for (unsigned int i = 0; i < this->iterations_; i++)
- {
- MT_Object_var tmp =
- this->mT_Object_i_._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->mT_Object_var_->yadda (0,
- tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "MT_Server::run_ORB_briefly");
- return -1;
- }
- ACE_ENDTRY;
- }
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h
deleted file mode 100644
index 01c4d33b760..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.h
+++ /dev/null
@@ -1,124 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client_Test
-//
-// = FILENAME
-// local_server.h
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - MT Client test
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef MT_CLIENT_TEST_MT_SERVER_H
-#define MT_CLIENT_TEST_MT_SERVER_H
-
-#include "MT_Object_i.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ace/Log_Msg.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-class TAO_ORB_Manager;
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-class MT_Server
-{
- // = TITLE
- // This is the server for the mt_object
- //
- // = DESCRIPTION
- // See the README file for more information.
-
-public:
-
- MT_Server ();
- // Default constructor
-
- ~MT_Server (void);
- // Destructor
-
- int init (int argc,
- char **argv,
- TAO_ORB_Manager* orb_manager_ptr);
- // Initialize the MT_Server state - parsing arguments and ...
-
- int run (void);
- // Run the orb
-
- int run_ORB_briefly (void);
- // Just run it briefly
-
-private:
- int read_ior (char *filename);
- // reading the IOR of mt object in
-
- int parse_args (void);
- // Parses the commandline arguments.
-
- char *object_key_;
- // Key of the object
-
- FILE* ior_output_file_;
- // File to output the IOR of the object A.
-
- TAO_ORB_Manager* orb_manager_ptr_;
- // The ORB manager
-
- MT_Object_i mT_Object_i_;
- // Implementation object
-
- MT_Object_var mT_Object_var_;
- // reference for the distant MT Object
-
- int argc_;
- // Number of commandline arguments.
-
- char **argv_;
- // commandline arguments.
-
- unsigned int iterations_;
- // number of times the server should call to the disted MT OBject
-
- CORBA::String_var str_;
- // IOR of our servant.
-};
-
-
-class MT_Server_Task : public ACE_Task<ACE_SYNCH>
-{
- // = TITLE
- // Wrapper for the MT_Server to be an extra thread
- //
- // = DESCRIPTION
- // No big purpose, just wrapping
-public:
- MT_Server_Task (ACE_Thread_Manager* thr_mgr_ptr,
- int argc,
- char **argv,
- TAO_ORB_Manager* orb_manager_ptr);
-
- virtual int svc (void);
-
-private:
- MT_Server mT_Server_;
- int argc_;
- char **argv_;
- TAO_ORB_Manager* orb_manager_ptr_;
-};
-
-
-#endif /* MT_CLIENT_TEST_MT_SERVER_H */
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl b/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl
deleted file mode 100755
index 04ef4d5362e..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$ior1file = PerlACE::LocalFile ("server1.ior");
-$ior2file = PerlACE::LocalFile ("server2.ior");
-
-# Make sure the files are gone
-unlink $ior1file;
-unlink $ior2file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV1 = new PerlACE::ProcessVX ("server", "-o server1.ior");
-}
-else {
- $SV1 = new PerlACE::Process ("server", "-o $ior1file");
-}
-$SV2 = new PerlACE::Process ("server", "-o $ior2file");
-$CL = new PerlACE::Process ("client", "-f $ior1file -g $ior2file -n 2 -i 10 -s 5");
-
-$SV1->Spawn ();
-$SV2->Spawn ();
-
-if (PerlACE::waitforfile_timed ($ior1file,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$ior1file>\n";
- $SV1->Kill ();
- $SV2->Kill ();
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($ior2file,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$ior2file>\n";
- $SV1->Kill ();
- $SV2->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-$server1 = $SV1->TerminateWaitKill (5);
-$server2 = $SV2->TerminateWaitKill (5);
-
-# Clean up
-unlink $ior1file;
-unlink $ior2file;
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-if ($server1 != 0) {
- print STDERR "ERROR: server 1 returned $server1\n";
- $status = 1;
-}
-
-if ($server2 != 0) {
- print STDERR "ERROR: server 2 returned $server2\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp
deleted file mode 100644
index c3e0377bee6..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/server.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client_Test
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - MT_Client test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "server.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(MT_Client_Test, server, "$Id$")
-
-MT_Object_Server::MT_Object_Server (void)
- : ior_output_file_ (0)
-{
-}
-
-int
-MT_Object_Server::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "do:m");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
- if (this->ior_output_file_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- get_opts.opt_arg ()), -1);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-o] <ior_output_file>"
- "\n",
- argv_ [0]),
- 1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-MT_Object_Server::init (int argc,
- char** argv
- ACE_ENV_ARG_DECL)
-{
- // Call the init of TAO_ORB_Manager to create a child POA
- // under the root POA.
- this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->argc_ = argc;
- this->argv_ = argv;
-
- this->parse_args ();
- // ~~ check for the return value here
-
- CORBA::String_var str;
- str = this->orb_manager_.activate_under_child_poa ("MT_Object",
- &this->mT_Object_i_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "The IOR is: <%s>\n",
- str.in ()));
-#endif /*if 0*/
-
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- str.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
-
- return 0;
-}
-
-
-int
-MT_Object_Server::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- int result = this->orb_manager_.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (result == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "NestedUpCalls_Server::run"),
- -1);
- return 0;
-}
-
-MT_Object_Server::~MT_Object_Server (void)
-{
-}
-
-int
-main (int argc, char *argv[])
-{
- MT_Object_Server MT_Object_Server;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n \t NestedUpCalls.Triangle_Test: Object A Server \n \n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- int r = MT_Object_Server.init (argc,argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (r == -1)
- return 1;
- else
- {
- MT_Object_Server.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/server.h b/TAO/tests/NestedUpcall/MT_Client_Test/server.h
deleted file mode 100644
index 8d57cc0d23e..00000000000
--- a/TAO/tests/NestedUpcall/MT_Client_Test/server.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/MT_Client_Test
-//
-// = FILENAME
-// server_A.h
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - MT Client test
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef MT_CLIENT_TEST_MT_OBJECT_SERVER_H
-#define MT_CLIENT_TEST_MT_OBJECT_SERVER_H
-
-#include "ace/Get_Opt.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Log_Msg.h"
-#include "tao/Utils/ORB_Manager.h"
-#include "MT_Object_i.h"
-
-class MT_Object_Server
-{
- // = TITLE
- // This is the server for the object A in the test.
- //
- // = DESCRIPTION
- // See the README file for more information.
-
-public:
-
- MT_Object_Server (void);
- // Default constructor
-
- ~MT_Object_Server (void);
- // Destructor
-
- int init (int argc,
- char **argv
- ACE_ENV_ARG_DECL);
- // Initialize the NestedUpCalls_Server state - parsing arguments and ...
-
- int run (ACE_ENV_SINGLE_ARG_DECL);
- // Run the orb
-
-private:
- int parse_args (void);
- // Parses the commandline arguments.
-
- FILE* ior_output_file_;
- // File to output the IOR of the object A.
-
- TAO_ORB_Manager orb_manager_;
- // The ORB manager
-
- MT_Object_i mT_Object_i_;
- // Implementation object MT_OBject
-
- int argc_;
- // Number of commandline arguments.
-
- char **argv_;
- // commandline arguments.
-
- u_char use_mt_object_;
-};
-
-#endif /* MT_CLIENT_TEST_MT_OBJECT_SERVER_H */
diff --git a/TAO/tests/NestedUpcall/Simple/.cvsignore b/TAO/tests/NestedUpcall/Simple/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/NestedUpcall/Simple/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/NestedUpcall/Simple/README b/TAO/tests/NestedUpcall/Simple/README
deleted file mode 100644
index d373edf247f..00000000000
--- a/TAO/tests/NestedUpcall/Simple/README
+++ /dev/null
@@ -1,17 +0,0 @@
-This is a test of the nested upcall feature in TAO. The client will
-start off by calling the server and providing a callback object and a
-time-to-live number. The server will callback the client (using the
-callback object) and decrement the time-to-live number. The client
-will turn around and call the server again.
-
-The above process of calling each other will continue until the
-time-to-live number reaches zero.
-
-Both client and server can be run in multi-threaded mode. A
-multi-threaded client can be used to check the client side leader
-follower model, while the multi-threaded server can be used to check
-the integration of the leader follower model of the TP reactor and the
-client side leader follower model in the ORB.
-
-In addition, the server can be used with the thread-per-connection
-model.
diff --git a/TAO/tests/NestedUpcall/Simple/Simple.mpc b/TAO/tests/NestedUpcall/Simple/Simple.mpc
deleted file mode 100644
index 766f62db832..00000000000
--- a/TAO/tests/NestedUpcall/Simple/Simple.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Nested_Upcall_Server): taoexe, portableserver {
- Source_Files {
- server_i.cpp
- server.cpp
- }
-}
-
-project(*Nested_Upcall_Client): taoexe, portableserver {
- after += *Nested_Upcall_Server
- Source_Files {
- client_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/NestedUpcall/Simple/client.cpp b/TAO/tests/NestedUpcall/Simple/client.cpp
deleted file mode 100644
index 33dc4890f6a..00000000000
--- a/TAO/tests/NestedUpcall/Simple/client.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-// $Id$
-
-#include "client_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(Simple, client, "$Id$")
-
-static const char *ior = "file://test.ior";
-// Server IOR.
-
-static int shutdown_server = 0;
-// Flag to tell server to shutdown.
-
-static CORBA::UShort call_count = 5;
-// # of nested calls to be made.
-
-static int quiet = 0;
-// The test is quiet...
-
-class Client_Task
-{
-public:
- Client_Task (client_ptr c,
- server_ptr s);
- int svc (void);
-
-private:
- client_var client_;
- server_var server_;
-};
-
-Client_Task::Client_Task (client_ptr c,
- server_ptr s)
- : client_ (client::_duplicate (c)),
- server_ (server::_duplicate (s))
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- if (!quiet)
- ACE_DEBUG ((LM_DEBUG,
- "(%t) Client_Task::svc calling start -> time to live = %d\n",
- call_count));
-
- // Now, we can invoke an operation on the remote side.
- this->server_->start (this->client_.in (),
- call_count
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client_Task::svc");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-static int
-parse_args (int argc,
- char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "qxn:k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'q':
- quiet = 1;
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case 'n':
- call_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-n number of nested calls]"
- " [-k ior]"
- " [-q (quite)]"
- " [-x (shutdown server)]"
- "\n",
- argv[0]),
- -1);
- }
-
- if (ior == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: no nested up calls server ior specified\n",
- argv[0]),
- -1);
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-main (int argc,
- char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result = parse_args (argc,
- argv);
- if (result != 0)
- return result;
-
- CORBA::Object_var object = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server_var server = server::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create an client object to hand to the other side...
- client_i client_servant (quiet,
- server.in ());
-
- client_var client_object = client_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_tasks (client_object.in (),
- server.in ());
-
- client_tasks.svc ();
-
- if (shutdown_server)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "client::main");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/Simple/client_i.cpp b/TAO/tests/NestedUpcall/Simple/client_i.cpp
deleted file mode 100644
index af61f40ba94..00000000000
--- a/TAO/tests/NestedUpcall/Simple/client_i.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-#include "client_i.h"
-
-client_i::client_i (int quiet,
- server_ptr s)
- : quiet_ (quiet),
- server_ (server::_duplicate (s))
-{
-}
-
-void
-client_i::ping (CORBA::UShort time_to_live
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (!this->quiet_)
- ACE_DEBUG ((LM_DEBUG,
- "(%t) client_i::ping -> time to live = %d\n",
- time_to_live));
-
- --time_to_live;
-
- if (time_to_live > 0)
- {
- this->server_->ping (time_to_live
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
diff --git a/TAO/tests/NestedUpcall/Simple/client_i.h b/TAO/tests/NestedUpcall/Simple/client_i.h
deleted file mode 100644
index c90a070e907..00000000000
--- a/TAO/tests/NestedUpcall/Simple/client_i.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-#include "testS.h"
-
-class client_i : public POA_client
-{
-public:
- client_i (int quiet,
- server_ptr s);
- // Constructor.
-
- void ping (CORBA::UShort time_to_live
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- int quiet_;
- // Be quiet.
-
- server_var server_;
- // Pointer to server.
-};
diff --git a/TAO/tests/NestedUpcall/Simple/run_test.pl b/TAO/tests/NestedUpcall/Simple/run_test.pl
deleted file mode 100755
index 3f272e45fda..00000000000
--- a/TAO/tests/NestedUpcall/Simple/run_test.pl
+++ /dev/null
@@ -1,86 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-f test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-f $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
-
-print STDERR "\nrunning ST version of the client and the server\n\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV->Arguments ("-f test.ior -t 3");
-}
-else {
- $SV->Arguments ("-f $iorfile -t 3");
-}
-$CL->Arguments ("-k file://$iorfile -x -n 10");
-
-print STDERR "\nrunning MT version of the client and the server\n\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/NestedUpcall/Simple/server.cpp b/TAO/tests/NestedUpcall/Simple/server.cpp
deleted file mode 100644
index f9f3763ca91..00000000000
--- a/TAO/tests/NestedUpcall/Simple/server.cpp
+++ /dev/null
@@ -1,189 +0,0 @@
-// $Id$
-
-#include "server_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(Simple, server, "$Id$")
-
-static int quiet = 0;
-// The test is quiet...
-
-static const char *ior_file = "test.ior";
-// File of file to which the ior is written
-
-static int number_of_threads = 1;
-// Number of server threads.
-
-class Server_Task : public ACE_Task_Base
-{
-public:
- Server_Task (CORBA::ORB_ptr orb);
- int svc (void);
-
-private:
- CORBA::ORB_var orb_;
-};
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-static int
-write_ior_to_file (const char *ior)
-{
- FILE *output_file = ACE_OS::fopen (ior_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output files for writing IOR: %s\n",
- ior_file),
- -1);
-
- int result = 0;
-
- result = ACE_OS::fprintf (output_file,
- "%s",
- ior);
- if (result < 0 ||
- static_cast<size_t> (result) != ACE_OS::strlen (ior))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_OS::fprintf failed while writing %s to %s\n",
- ior,
- ior_file),
- -1);
-
- ACE_OS::fclose (output_file);
-
- return 0;
-}
-
-static int
-parse_args (int argc,
- char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "q:f:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'q':
- quiet = 1;
- break;
-
- case 't':
- number_of_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'f':
- ior_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-t number of threads]"
- " [-f ior file]"
- " [-q (quite)]"
- "\n",
- argv[0]),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc,
- char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result = parse_args (argc,
- argv);
- if (result != 0)
- return result;
-
- CORBA::Object_var object = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server_i server_servant (quiet,
- orb.in ());
-
- server_var server_object = server_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior = orb->object_to_string (server_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- result = write_ior_to_file (ior.in ());
- if (result != 0)
- return result;
-
- Server_Task server_tasks (orb.in ());
-
- result = server_tasks.activate (THR_BOUND,
- number_of_threads);
-
- if (result != 0)
- return result;
-
- result = ACE_Thread_Manager::instance ()->wait ();
-
- if (result != 0)
- return result;
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "server::main");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/Simple/server_i.cpp b/TAO/tests/NestedUpcall/Simple/server_i.cpp
deleted file mode 100644
index 6e6a9b7ade4..00000000000
--- a/TAO/tests/NestedUpcall/Simple/server_i.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-#include "server_i.h"
-
-server_i::server_i (int quiet,
- CORBA::ORB_ptr orb)
- : quiet_ (quiet),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-server_i::start (client_ptr c,
- CORBA::UShort time_to_live
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->client_ = client::_duplicate (c);
- this->ping (time_to_live
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- return;
-}
-
-void
-server_i::ping (CORBA::UShort time_to_live
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (!this->quiet_)
- ACE_DEBUG ((LM_DEBUG,
- "(%t) server_i::ping -> time to live = %d\n",
- time_to_live));
-
- --time_to_live;
-
- if (time_to_live > 0)
- {
- this->client_->ping (time_to_live
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/NestedUpcall/Simple/server_i.h b/TAO/tests/NestedUpcall/Simple/server_i.h
deleted file mode 100644
index a92ecc85d08..00000000000
--- a/TAO/tests/NestedUpcall/Simple/server_i.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-#include "testS.h"
-
-class server_i : public POA_server
-{
-public:
- server_i (int quiet,
- CORBA::ORB_ptr orb);
-
- void ping (CORBA::UShort time_to_live
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void start (client_ptr c,
- CORBA::UShort time_to_live
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- int quiet_;
- // Be quiet.
-
- client_var client_;
- // Pointer to server.
-
- CORBA::ORB_var orb_;
- // Pointer to orb.
-};
diff --git a/TAO/tests/NestedUpcall/Simple/simple-client.cpp b/TAO/tests/NestedUpcall/Simple/simple-client.cpp
deleted file mode 100644
index a014035dc5e..00000000000
--- a/TAO/tests/NestedUpcall/Simple/simple-client.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-// $Id$
-
-#include "client_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(Simple, client, "$Id$")
-
-static const char *ior = "file://test.ior";
-// Server IOR.
-
-static int shutdown_server = 0;
-// Flag to tell server to shutdown.
-
-static CORBA::UShort call_count = 5;
-// # of nested calls to be made.
-
-static int quiet = 0;
-// The test is quiet...
-
-static int number_of_threads = 1;
-// Number of client threads.
-
-class Client_Task
-{
-public:
- Client_Task (client_ptr c,
- server_ptr s);
- int svc (void);
-
-private:
- client_var client_;
- server_var server_;
-};
-
-Client_Task::Client_Task (client_ptr c,
- server_ptr s)
- : client_ (client::_duplicate (c)),
- server_ (server::_duplicate (s))
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- if (!quiet)
- ACE_DEBUG ((LM_DEBUG,
- "(%t) Client_Task::svc calling start -> time to live = %d\n",
- call_count));
-
- // Now, we can invoke an operation on the remote side.
- this->server_->start (this->client_.in (),
- call_count
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client_Task::svc");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-static int
-parse_args (int argc,
- char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "qxn:k:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'q':
- quiet = 1;
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case 'n':
- call_count = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 't':
- number_of_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-n number of nested calls]"
- " [-k ior]"
- " [-q (quite)]"
- " [-x (shutdown server)]"
- "\n",
- argv[0]),
- -1);
- }
-
- if (ior == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: no nested up calls server ior specified\n",
- argv[0]),
- -1);
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-main (int argc,
- char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result = parse_args (argc,
- argv);
- if (result != 0)
- return result;
-
- CORBA::Object_var object = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server_var server = server::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create an client object to hand to the other side...
- client_i client_servant (quiet,
- server.in ());
-
- client_var client_object = client_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_tasks (client_object.in (),
- server.in ());
-
- client_tasks.svc ();
-
-
- if (shutdown_server)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "client::main");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/Simple/svc.conf b/TAO/tests/NestedUpcall/Simple/svc.conf
deleted file mode 100644
index b16f9bc3bb6..00000000000
--- a/TAO/tests/NestedUpcall/Simple/svc.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-#
-
-#static Resource_Factory "-ORBReactorType tp"
-#static Server_Strategy_Factory "-ORBConcurrency thread-per-connection"
diff --git a/TAO/tests/NestedUpcall/Simple/svc.conf.xml b/TAO/tests/NestedUpcall/Simple/svc.conf.xml
deleted file mode 100644
index 020bc8449ea..00000000000
--- a/TAO/tests/NestedUpcall/Simple/svc.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/NestedUpcall/Simple/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <!-- static Resource_Factory "-ORBReactorType tp" -->
- <!-- static Server_Strategy_Factory "-ORBConcurrency thread-per-connection" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/NestedUpcall/Simple/test.idl b/TAO/tests/NestedUpcall/Simple/test.idl
deleted file mode 100644
index 45664cfb035..00000000000
--- a/TAO/tests/NestedUpcall/Simple/test.idl
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpcall
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// A simple test of nested upcalls.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-interface client
-{
- void ping (in unsigned short time_to_live);
- // Decrements <time_to_live>. If <time_to_live> becomes zero, it
- // stops. Otherwise, it pings the server.
-};
-
-interface server
-{
- void start (in client c,
- in unsigned short time_to_live);
- // Turns around and starts pinging the client.
-
- void ping (in unsigned short time_to_live);
- // Decrements <time_to_live>. If <time_to_live> becomes zero, it
- // stops. Otherwise, it pings the client.
-
- oneway void shutdown ();
- // Shutdown the server.
-};
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/.cvsignore b/TAO/tests/NestedUpcall/Triangle_Test/.cvsignore
deleted file mode 100644
index 67a66b46f69..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-initiator
-server_A
-server_B
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.cpp b/TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.cpp
deleted file mode 100644
index 1f3195d982a..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// Object_A_i.cpp
-//
-// = DESCRIPTION
-// This class implements the Object A of the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "tao/Exception.h"
-#include "Initiator_i.h"
-
-ACE_RCSID(Triangle_Test, Initiator_i, "$Id$")
-
-// CTOR
-Initiator_i::Initiator_i (Object_A_ptr object_A_ptr,
- Object_B_ptr object_B_ptr)
-: object_A_var_ (Object_A::_duplicate (object_A_ptr)),
- object_B_var_ (Object_B::_duplicate (object_B_ptr))
-{
-}
-
-// DTOR
-Initiator_i::~Initiator_i (void)
-{
-}
-
-void
-Initiator_i::foo_object_B (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) BEGIN Initiator_i::foo_object_B ()\n"));
-
- ACE_TRY
- {
- this->object_B_var_->foo (this->object_A_var_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Initiator_i::foo_object_B: Returned from call.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "calling the server");
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) END Initiator_i::foo_object_B ()\n"));
-}
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.h b/TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.h
deleted file mode 100644
index 50f01bf658f..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/Initiator_i.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// Initiator_i.h
-//
-// = DESCRIPTION
-// This class implements the Initiator of the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef INITIATOR_IMPL_H
-# define INITIATOR_IMPL_H
-
-#include "Triangle_TestS.h"
-
-class Initiator_i : public POA_Initiator
-{
- // = TITLE
- // Implement the <Initiator> IDL interface.
-public:
- Initiator_i (Object_A_ptr object_A_ptr,
- Object_B_ptr object_B_ptr);
- // Constructor.
-
- virtual ~Initiator_i (void);
- // Destructor.
-
- virtual void foo_object_B (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- Object_A_var object_A_var_;
- // reference to object A
-
- Object_B_var object_B_var_;
- // reference to object B
-};
-
-#endif /* INITIATOR_IMPL_H */
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.cpp b/TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.cpp
deleted file mode 100644
index 0f0e6431660..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// Object_A_i.cpp
-//
-// = DESCRIPTION
-// This class implements the Object A of the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "Object_A_i.h"
-#include "tao/ORB_Core.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Triangle_Test, Object_A_i, "$Id$")
-
-// CTOR
-Object_A_i::Object_A_i (void)
- : finish_two_way_call_ (0)
-{
-}
-
-// DTOR
-Object_A_i::~Object_A_i (void)
-{
-}
-
-
-
-void
-Object_A_i::foo (Initiator_ptr theInitiator_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- theInitiator_ptr->foo_object_B (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- while (!this->finish_two_way_call_)
- TAO_ORB_Core_instance ()->reactor ()->handle_events ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "calling the initiator");
- }
- ACE_ENDTRY;
-
-}
-
-void
-Object_A_i::finish (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->finish_two_way_call_ = 1;
-
-}
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.h b/TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.h
deleted file mode 100644
index 83c771f5a6f..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/Object_A_i.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// Object_A_i.h
-//
-// = DESCRIPTION
-// This class implements the Object A of the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef OBJECT_B_IMPL_H
-# define OBJECT_B_IMPL_H
-
-#include "Triangle_TestS.h"
-
-class Object_A_i : public POA_Object_A
-{
- // = TITLE
- // Implement the <Object_A> IDL interface.
-public:
- Object_A_i (void);
- // Constructor.
-
- virtual ~Object_A_i (void);
- // Destructor.
-
- virtual void foo (Initiator_ptr theInitiator_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void finish (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- unsigned long finish_two_way_call_;
-};
-
-#endif /* OBJECT_B_IMPL_H */
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.cpp b/TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.cpp
deleted file mode 100644
index 6d2b87560d5..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// Object_B_i.cpp
-//
-// = DESCRIPTION
-// This class implements the Object B of the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "tao/Exception.h"
-#include "Object_B_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Triangle_Test, Object_B_i, "$Id$")
-
-// CTOR
-Object_B_i::Object_B_i (void)
-{
-}
-
-// DTOR
-Object_B_i::~Object_B_i (void)
-{
-}
-
-
-
-void
-Object_B_i::foo (Object_A_ptr theObject_A_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) BEGIN Object_B_i::foo: Trying to call Object A\n"));
-
- theObject_A_ptr->finish (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Start to wait on this variable, it is set to true
- // by the method finish ()
- long int usecs = 500000;
- ACE_Time_Value pause(0, usecs);
-
- ACE_OS::sleep(pause);
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "calling the initiator");
- }
- ACE_ENDTRY;
-
-}
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.h b/TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.h
deleted file mode 100644
index c76b4d2ab80..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/Object_B_i.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// Object_B_i.h
-//
-// = DESCRIPTION
-// This class implements the Object B of the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef OBJECT_B_IMPL_H
-# define OBJECT_B_IMPL_H
-
-#include "Triangle_TestS.h"
-
-class Object_B_i : public POA_Object_B
-{
- // = TITLE
- // Implement the <Object_B> IDL interface.
-public:
- Object_B_i (void);
- // Constructor.
-
- virtual ~Object_B_i (void);
- // Destructor.
-
- virtual void foo(Object_A_ptr theObject_A_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#endif /* OBJECT_B_IMPL_H */
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/README b/TAO/tests/NestedUpcall/Triangle_Test/README
deleted file mode 100644
index d946e466421..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/README
+++ /dev/null
@@ -1,29 +0,0 @@
-$Id$
-Documentation about the Triangle test
-
-Purpose:
-
-Is to show how nested upcalls are handled.
-
-Three objects exist:
-Object A, Object B and the Initiator
-
-The initiator calls a two-way call foo on object A,
-object A calls foo_object_B, a one-way call, on the initiator,
-this causes initiator to call foo on object B,
-this causes object B to (oneway) call finish on object A,
-this causes object A to return from its first two-way call
-(before object B returns from its two-way call),
-after a second or so object B returns from its two-way call.
-
-The printed order should show, that the replies are
-handled in the stack order, but not in the actual
-arriving order.
-
-To start:
-
-%server_A -o server1
-%
-%server_B -o server2
-%
-%initiator -f server1 -g server2
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/TT.mpc b/TAO/tests/NestedUpcall/Triangle_Test/TT.mpc
deleted file mode 100644
index e8b0864ecd5..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/TT.mpc
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Nested_Upcall_Server_A): taoexe, utils, portableserver {
- Source_Files {
- Object_A_i.cpp
- server_A.cpp
- }
-}
-
-project(*Nested_Upcall_Server_B): taoexe, utils, portableserver {
- after += *Nested_Upcal_Server_A
- Source_Files {
- Object_B_i.cpp
- server_B.cpp
- }
-}
-
-project(*Nested_Upcall_Initiator): taoexe, utils, portableserver {
- after += *Nested_Upcall_Server_B
- Source_Files {
- Initiator_i.cpp
- initiator.cpp
- }
-}
-
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/Triangle_Test.idl b/TAO/tests/NestedUpcall/Triangle_Test/Triangle_Test.idl
deleted file mode 100644
index 485d1f0edc5..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/Triangle_Test.idl
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpcall/Triangle_Test
-//
-// = FILENAME
-// Triangle_Test.idl
-//
-// = DESCRIPTION
-// An example of how nested upcalls work/fail?
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-
-interface Initiator {
-
- oneway void foo_object_B ();
-
-};
-
-interface Object_A {
-
- void foo (in Initiator theInitiator);
-
- oneway void finish ();
-
-};
-
-interface Object_B {
-
- void foo (in Object_A theObject_A);
-
-};
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp b/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
deleted file mode 100644
index 6e653ca4040..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// initiator.cpp
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "initiator.h"
-#include "tao/debug.h"
-#include "ace/Read_Buffer.h"
-#include "ace/OS_NS_fcntl.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Triangle_Test, initiator, "$Id$")
-
-Initiator_Server::Initiator_Server (void)
- : object_A_key_ (0),
- object_B_key_ (0),
- object_A_var_ (0),
- object_B_var_ (0),
- initiator_i_ptr_ (0)
-{
-}
-
-// Reads the Object A/B IOR from a file
-// A_B == 0, means read Object A's IOR
-// A_B == 1, means read Object B's IOR
-
-int
-Initiator_Server::read_ior (char *filename, unsigned int A_B)
-{
- // Open the file for reading.
- ACE_HANDLE f_handle = ACE_OS::open (filename,0);
-
- if (f_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for reading: %p\n",
- filename),
- -1);
- ACE_Read_Buffer ior_buffer (f_handle);
-
- if (A_B == 0)
- {
- this->object_A_key_ = ior_buffer.read ();
- if (this->object_A_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to allocate memory to read ior: %p\n"),
- -1);
- }
- else
- {
- this->object_B_key_ = ior_buffer.read ();
- if (this->object_B_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to allocate memory to read ior: %p\n"),
- -1);
- }
-
- ACE_OS::close (f_handle);
- return 0;
-}
-
-
-int
-Initiator_Server::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "df:g:");
- int c, result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'f': // read the IOR from the file.
- result = this->read_ior (get_opts.opt_arg (),0);
- // read IOR for Object A
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.opt_arg ()),
- -1);
- break;
- case 'g': // read the IOR from the file.
- result = this->read_ior (get_opts.opt_arg (),1);
- // read IOR for Object A
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.opt_arg ()),
- -1);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-f] <object_A_ior_file>"
- " [-g] <object_B_ior_file>"
- "\n",
- argv_ [0]),
- 1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-Initiator_Server::init (int argc,
- char** argv
- ACE_ENV_ARG_DECL)
-{
- // Call the init of TAO_ORB_Manager to create a child POA
- // under the root POA.
- this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->argc_ = argc;
- this->argv_ = argv;
-
- this->parse_args ();
- // ~~ check for the return value here
-
- if (this->object_A_key_ == 0 || this->object_B_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: The two objects A and B are missing\n",
- this->argv_[0]),
- -1);
-
- ACE_TRY
- {
- // Get Object A
-
- CORBA::Object_var object_A_obj_var =
- this->orb_manager_.orb()->string_to_object (this->object_A_key_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->object_A_var_ =
- Object_A::_narrow (object_A_obj_var.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (this->object_A_var_.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "invalid object A key <%s>\n",
- object_A_key_),
- -1);
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "Object A IOR: %s\n",
- this->object_A_key_));
-#endif /*if 0*/
-
- ACE_DEBUG ((LM_DEBUG, "Object A received OK\n"));
-
- // Get Object B
-
- CORBA::Object_var object_B_obj_var =
- this->orb_manager_.orb()->string_to_object (this->object_B_key_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->object_B_var_ =
- Object_B::_narrow (object_B_obj_var.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (this->object_B_var_.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "invalid object b key <%s>\n",
- object_B_key_),
- -1);
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "Object B IOR: %s\n",
- this->object_A_key_));
-#endif /*if 0*/
-
- ACE_DEBUG ((LM_DEBUG, "Object B received OK\n"));
-
- this->orb_manager_.activate_poa_manager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_NEW_RETURN (this->initiator_i_ptr_,
- Initiator_i(this->object_A_var_.in(),
- this->object_B_var_.in()),
- -1);
-
- this->str_ =
- this->orb_manager_.activate (this->initiator_i_ptr_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "The IOR is: <%s>\n",
- this->str_.in ()));
-#endif /*if 0*/
-
- return 0;
-}
-
-
-int
-Initiator_Server::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_TRY
- {
- ACE_DEBUG ((LM_DEBUG,
- "Initiator_Server::run: Trying to invoke "
- "foo on Object A\n"));
-
- Initiator_var initiator =
- this->initiator_i_ptr_->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->object_A_var_->foo (initiator.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG,
- "Initiator_Server::run: Returned from invoke "
- "foo on Object A\n"));
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-Initiator_Server::~Initiator_Server (void)
-{
- if (this->object_A_key_ != 0)
- ACE_OS::free (this->object_A_key_);
- if (this->object_B_key_ != 0)
- ACE_OS::free (this->object_B_key_);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->orb_manager_.deactivate (this->str_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Initiator_Server::~Initiator_Server");
- }
- ACE_ENDTRY;
-
- delete this->initiator_i_ptr_;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n \t NestedUpCalls.Triangle_Test: Initiator Server \n \n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- Initiator_Server initiator_Server;
-
- int retval =
- initiator_Server.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (retval == -1)
- return 1;
- else
- {
- initiator_Server.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/initiator.h b/TAO/tests/NestedUpcall/Triangle_Test/initiator.h
deleted file mode 100644
index 137f31e0dc6..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/initiator.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// initiator.h
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - Triangle test
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef _TRIANGLE_TEST_INITITATOR_SERVER_H
-#define _TRIANGLE_TEST_INITITATOR_SERVER_H
-
-#include "ace/Get_Opt.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Log_Msg.h"
-#include "tao/Utils/ORB_Manager.h"
-#include "Initiator_i.h"
-
-class Initiator_Server
-{
- // = TITLE
- // This is the server for the Initiator in the test.
- //
- // = DESCRIPTION
- // See the README file for more information.
-
-public:
-
- Initiator_Server (void);
- // Default constructor
-
- ~Initiator_Server (void);
- // Destructor
-
- int read_ior (char *filename, unsigned int A_B);
- // read in the IOR's for the two objects A and B
-
- int init (int argc,
- char **argv
- ACE_ENV_ARG_DECL);
- // Initialize the Initiator_Server state - parsing arguments and ...
-
- int run (ACE_ENV_SINGLE_ARG_DECL);
- // Run the orb
-
-private:
- int parse_args (void);
- // Parses the commandline arguments.
-
- char * object_A_key_;
- // The IOR of object A
-
- char * object_B_key_;
- // The IOR of object B
-
- Object_A_var object_A_var_;
- // reference to object A
-
- Object_B_var object_B_var_;
- // reference to object B
-
- TAO_ORB_Manager orb_manager_;
- // The ORB manager
-
- Initiator_i *initiator_i_ptr_;
- // Implementation object of the Initiator
-
- int argc_;
- // Number of commandline arguments.
-
- char **argv_;
- // commandline arguments.
-
- CORBA::String_var str_;
- // IOR of my servant.
-};
-
-#endif /* _TRIANGLE_TEST_INITITATOR_SERVER_H */
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl b/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl
deleted file mode 100755
index 162b73124ad..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$ior1file = PerlACE::LocalFile ("servera.ior");
-$ior2file = PerlACE::LocalFile ("serverb.ior");
-
-# Make sure these aren't hanging around
-unlink $ior1file;
-unlink $ior2file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV1 = new PerlACE::ProcessVX ("server_A", "-o servera.ior");
-}
-else {
- $SV1 = new PerlACE::Process ("server_A", "-o $ior1file");
-}
-$SV2 = new PerlACE::Process ("server_B", "-o $ior2file");
-$CL = new PerlACE::Process ("initiator", "-f $ior1file -g $ior2file");
-
-$SV1->Spawn ();
-$SV2->Spawn ();
-
-if (PerlACE::waitforfile_timed ($ior1file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$ior1file>\n";
- $SV1->Kill ();
- $SV2->Kill ();
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($ior2file,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$ior2file>\n";
- $SV2->Kill ();
- $SV1->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-$server1 = $SV1->TerminateWaitKill (5);
-$server2 = $SV2->TerminateWaitKill (5);
-
-# Clean up
-unlink $ior1file;
-unlink $ior2file;
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-if ($server1 != 0) {
- print STDERR "ERROR: server 1 returned $server1\n";
- $status = 1;
-}
-
-if ($server2 != 0) {
- print STDERR "ERROR: server 2 returned $server2\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp b/TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp
deleted file mode 100644
index 8ab9fe10dfe..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_A.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// server_A.cpp
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "server_A.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Triangle_Test, server_A, "$Id$")
-
-Object_A_Server::Object_A_Server (void)
- : ior_output_file_ (0)
-{
-}
-
-int
-Object_A_Server::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "do:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
- if (this->ior_output_file_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- get_opts.opt_arg ()), -1);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-o] <ior_output_file>"
- "\n",
- argv_ [0]),
- 1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-Object_A_Server::init (int argc,
- char** argv
- ACE_ENV_ARG_DECL)
-{
- // Call the init of TAO_ORB_Manager to create a child POA
- // under the root POA.
- this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK_RETURN (-1);
- this->argc_ = argc;
- this->argv_ = argv;
-
- this->parse_args ();
- // ~~ check for the return value here
-
- CORBA::String_var str =
- this->orb_manager_.activate_under_child_poa ("object_A",
- &this->object_A_i_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- str.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
-
- return 0;
-}
-
-
-int
-Object_A_Server::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- int r = this->orb_manager_.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (r == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "NestedUpCalls_Server::run"),
- -1);
- return 0;}
-
-
-Object_A_Server::~Object_A_Server (void)
-{
-}
-
-int
-main (int argc, char *argv[])
-{
- Object_A_Server object_A_Server;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n \t NestedUpCalls.Triangle_Test: Object A Server \n \n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- int retval =
- object_A_Server.init (argc,argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (retval == -1)
- return 1;
- else
- {
- object_A_Server.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_A.h b/TAO/tests/NestedUpcall/Triangle_Test/server_A.h
deleted file mode 100644
index 842cae01b00..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_A.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// server_A.h
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - Triangle test
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef _TRIANGLE_TEST_OBJECT_A_SERVER_H
-#define _TRIANGLE_TEST_OBJECT_A_SERVER_H
-
-#include "ace/Get_Opt.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Log_Msg.h"
-#include "tao/Utils/ORB_Manager.h"
-#include "Object_A_i.h"
-
-class Object_A_Server
-{
- // = TITLE
- // This is the server for the object A in the test.
- //
- // = DESCRIPTION
- // See the README file for more information.
-
-public:
-
- Object_A_Server (void);
- // Default constructor
-
- ~Object_A_Server (void);
- // Destructor
-
- int init (int argc,
- char **argv
- ACE_ENV_ARG_DECL);
- // Initialize the NestedUpCalls_Server state - parsing arguments and ...
-
- int run (ACE_ENV_SINGLE_ARG_DECL);
- // Run the orb
-
-private:
- int parse_args (void);
- // Parses the commandline arguments.
-
- FILE* ior_output_file_;
- // File to output the IOR of the object A.
-
- TAO_ORB_Manager orb_manager_;
- // The ORB manager
-
- Object_A_i object_A_i_;
- // Implementation object of the NestedUpCalls reactor.
-
- int argc_;
- // Number of commandline arguments.
-
- char **argv_;
- // commandline arguments.
-};
-
-#endif /* _TRIANGLE_TEST_OBJECT_A_SERVER_H */
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp b/TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp
deleted file mode 100644
index 47837342aaa..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_B.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// server_B.cpp
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - Triangle test.
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#include "server_B.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Triangle_Test, server_B, "$Id$")
-
-Object_B_Server::Object_B_Server (void)
- : ior_output_file_ (0)
-{
-}
-
-int
-Object_B_Server::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "do:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
- if (this->ior_output_file_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- get_opts.opt_arg ()), -1);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-o] <ior_output_file>"
- "\n",
- argv_ [0]),
- 1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-Object_B_Server::init (int argc,
- char** argv
- ACE_ENV_ARG_DECL)
-{
- // Call the init of TAO_ORB_Manager to create a child POA
- // under the root POA.
- this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK_RETURN (-1);
- this->argc_ = argc;
- this->argv_ = argv;
-
- this->parse_args ();
- // ~~ check for the return value here
-
- CORBA::String_var str =
- this->orb_manager_.activate_under_child_poa ("object_B",
- &this->object_B_i_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- str.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
- return 0;
-}
-
-
-int
-Object_B_Server::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- int result = this->orb_manager_.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (result == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object_B_Server::run"),
- -1);
-
- return 0;
-}
-
-Object_B_Server::~Object_B_Server (void)
-{
-}
-
-int
-main (int argc, char *argv[])
-{
- Object_B_Server object_B_Server;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n \t NestedUpCalls.Triangle_Test: Object B Server \n \n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- int retval = object_B_Server.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (retval == -1)
- return 1;
- else
- {
- object_B_Server.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/server_B.h b/TAO/tests/NestedUpcall/Triangle_Test/server_B.h
deleted file mode 100644
index 3661f99bd71..00000000000
--- a/TAO/tests/NestedUpcall/Triangle_Test/server_B.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/NestedUpCalls/Triangle_Test
-//
-// = FILENAME
-// server_B.h
-//
-// = DESCRIPTION
-// This class implements a simple server for the
-// Nested Upcalls - Triangle test
-//
-// = AUTHORS
-// Michael Kircher
-//
-// ============================================================================
-
-#ifndef _TRIANGLE_TEST_OBJECT_B_SERVER_H
-#define _TRIANGLE_TEST_OBJECT_B_SERVER_H
-
-#include "ace/Get_Opt.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Log_Msg.h"
-#include "tao/Utils/ORB_Manager.h"
-#include "Object_B_i.h"
-
-class Object_B_Server
-{
- // = TITLE
- // This is the server for the object A in the test.
- //
- // = DESCRIPTION
- // See the README file for more information.
-
-public:
-
- Object_B_Server (void);
- // Default constructor
-
- ~Object_B_Server (void);
- // Destructor
-
- int init (int argc,
- char **argv
- ACE_ENV_ARG_DECL);
- // Initialize the NestedUpCalls_Server state - parsing arguments and ...
-
- int run (ACE_ENV_SINGLE_ARG_DECL);
- // Run the orb
-
-private:
- int parse_args (void);
- // Parses the commandline arguments.
-
- FILE* ior_output_file_;
- // File to output the IOR of the object A.
-
- TAO_ORB_Manager orb_manager_;
- // The ORB manager
-
- Object_B_i object_B_i_;
- // Implementation object of the NestedUpCalls reactor.
-
- int argc_;
- // Number of commandline arguments.
-
- char **argv_;
- // commandline arguments.
-};
-
-#endif /* _TRIANGLE_TEST_OBJECT_B_SERVER_H */
diff --git a/TAO/tests/Nested_Event_Loop/.cvsignore b/TAO/tests/Nested_Event_Loop/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Nested_Event_Loop/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc b/TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc
deleted file mode 100644
index 50ef58ea252..00000000000
--- a/TAO/tests/Nested_Event_Loop/Nested_Event_Loop.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, taoexe, portableserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, taoexe, portableserver {
- after += *Server
- Source_Files {
- test_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Nested_Event_Loop/README b/TAO/tests/Nested_Event_Loop/README
deleted file mode 100644
index e5bd434ecf1..00000000000
--- a/TAO/tests/Nested_Event_Loop/README
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Id$
-
-Description:
-
-This is a test of invoking nested event loop calls from user code,
-i.e., a call to perform_work() or run() from the implementation of the
-servant.
-
-Expected output:
-
-The client and server should be able to make steady progress, i.e.,
-should not deadlock.
-
-How to run:
-
-You can use the run_test.pl script to run it or:
-
-$ server
-$ client
diff --git a/TAO/tests/Nested_Event_Loop/client.cpp b/TAO/tests/Nested_Event_Loop/client.cpp
deleted file mode 100644
index ac198b31bd6..00000000000
--- a/TAO/tests/Nested_Event_Loop/client.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "test_i.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Nested_Event_Loop, client, "$Id$")
-
-// Name of file contains ior.
-static const char *IOR = "file://ior";
-
-// Default event_loop_depth.
-static CORBA::ULong event_loop_depth = 6;
-
-// Default event_loop_iterations.
-static CORBA::ULong event_loop_iterations = 6;
-
-// Flag indicates whether to shutdown remote server or not upon client
-// shutdown.
-static int shutdown_server = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:d:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- IOR = get_opts.opt_arg ();
- break;
-
- case 'i':
- event_loop_iterations = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'd':
- event_loop_depth = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k IOR "
- "-i event loop iterations "
- "-d event loop depth "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- if (IOR == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify the IOR for the servant\n"), -1);
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
- if (parse_args_result != 0)
- return parse_args_result;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get an object reference from the argument string.
- object = orb->string_to_object (IOR
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Try to narrow the object reference to a <server> reference.
- server_var server_object = server::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client_i servant (server_object.in ());
-
- servant.loop (event_loop_depth,
- event_loop_iterations
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Shutdown server.
- if (shutdown_server)
- {
- server_object->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Nested_Event_Loop/run_test.pl b/TAO/tests/Nested_Event_Loop/run_test.pl
deleted file mode 100755
index df9c649b7f0..00000000000
--- a/TAO/tests/Nested_Event_Loop/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (200);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (100);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Nested_Event_Loop/server.cpp b/TAO/tests/Nested_Event_Loop/server.cpp
deleted file mode 100644
index 134bd31f46a..00000000000
--- a/TAO/tests/Nested_Event_Loop/server.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Nested_Event_Loop, server, "$Id$")
-
-const char *ior_output_file = "ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- server_i servant (orb.in ());
-
- server_var server_object =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Nested_Event_Loop/svc.conf b/TAO/tests/Nested_Event_Loop/svc.conf
deleted file mode 100644
index 64044024bc5..00000000000
--- a/TAO/tests/Nested_Event_Loop/svc.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Advanced_Resource_Factory "-ORBReactorType select_mt"
diff --git a/TAO/tests/Nested_Event_Loop/svc.conf.xml b/TAO/tests/Nested_Event_Loop/svc.conf.xml
deleted file mode 100644
index 981923d7a31..00000000000
--- a/TAO/tests/Nested_Event_Loop/svc.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Nested_Event_Loop/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <static id="Advanced_Resource_Factory" params="-ORBReactorType select_mt"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Nested_Event_Loop/test.idl b/TAO/tests/Nested_Event_Loop/test.idl
deleted file mode 100644
index 2a0de7543ad..00000000000
--- a/TAO/tests/Nested_Event_Loop/test.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// $Id$
-//
-
-typedef sequence<octet> act;
-
-interface client
-{
- void loop (in unsigned long event_loop_depth,
- in unsigned long event_loop_iterations);
-
- oneway void oneway_no_op (in act act_for_iterations,
- in act act_for_flag);
-
- void twoway_no_op ();
-};
-
-interface server
-{
- void loop (in client remote_partner,
- in unsigned long event_loop_depth,
- in unsigned long event_loop_iterations);
-
- void no_op (in client remote_partner,
- in act act_for_iterations,
- in act act_for_flag);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Nested_Event_Loop/test_i.cpp b/TAO/tests/Nested_Event_Loop/test_i.cpp
deleted file mode 100644
index 7b27990c225..00000000000
--- a/TAO/tests/Nested_Event_Loop/test_i.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Nested_Event_Loop, test_i, "$Id$")
-
-server_i::server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-server_i::loop (client_ptr remote_partner,
- CORBA::ULong event_loop_depth,
- CORBA::ULong event_loop_iterations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "server_i::loop: event_loop_depth = %2.2d; event_loop_iterations = %2.2d\n",
- event_loop_depth,
- event_loop_iterations));
-
- this->run_no_ops (remote_partner,
- event_loop_iterations / 2
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (--event_loop_depth != 0)
- {
- remote_partner->loop (event_loop_depth,
- event_loop_iterations
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- this->run_no_ops (remote_partner,
- event_loop_iterations / 2
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server_i::run_no_ops (client_ptr remote_partner,
- CORBA::ULong iterations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- while (iterations != 0)
- {
- CORBA::ULong *pointer_to_iterations = &iterations;
- size_t sizeof_pointer_to_iterations = sizeof (pointer_to_iterations);
-
- act act_for_iterations (sizeof_pointer_to_iterations);
- act_for_iterations.length (sizeof_pointer_to_iterations);
-
- ACE_OS::memcpy (act_for_iterations.get_buffer (),
- &pointer_to_iterations,
- sizeof_pointer_to_iterations);
-
- CORBA::ULong got_reply = 0;
-
- CORBA::ULong *pointer_to_flag = &got_reply;
- size_t sizeof_pointer_to_flag = sizeof (pointer_to_flag);
-
- act act_for_flag (sizeof_pointer_to_flag);
- act_for_flag.length (sizeof_pointer_to_flag);
-
- ACE_OS::memcpy (act_for_flag.get_buffer (),
- &pointer_to_flag,
- sizeof_pointer_to_flag);
-
- remote_partner->oneway_no_op (act_for_iterations,
- act_for_flag
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- while (!got_reply)
- {
- this->orb_->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-}
-
-void
-server_i::no_op (client_ptr remote_partner,
- const act &act_for_iterations,
- const act &act_for_flag
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong *pointer_to_iterations = 0;
-
- ACE_OS::memcpy (&pointer_to_iterations,
- act_for_iterations.get_buffer (),
- act_for_iterations.length ());
-
- CORBA::ULong *pointer_to_flag = 0;
-
- ACE_OS::memcpy (&pointer_to_flag,
- act_for_flag.get_buffer (),
- act_for_flag.length ());
-
- ACE_DEBUG ((LM_DEBUG,
- "server_i::no_op: iterations = %d\n",
- *pointer_to_iterations));
-
- --(*pointer_to_iterations);
-
- *pointer_to_flag = 1;
-
- remote_partner->twoway_no_op (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
-
-client_i::client_i (server_ptr remote_partner)
- : remote_partner_ (server::_duplicate (remote_partner))
-{
-}
-
-void
-client_i::loop (CORBA::ULong event_loop_depth,
- CORBA::ULong event_loop_iterations
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "client_i::loop: event_loop_depth = %2.2d; event_loop_iterations = %2.2d\n",
- event_loop_depth,
- event_loop_iterations));
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- client_var self =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->remote_partner_->loop (self.in (),
- event_loop_depth,
- event_loop_iterations
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client_i::loop:");
- }
- ACE_ENDTRY;
-}
-
-void
-client_i::oneway_no_op (const act &act_for_iterations,
- const act &act_for_flag
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- client_var self =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->remote_partner_->no_op (self.in (),
- act_for_iterations,
- act_for_flag
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client_i::no_op:");
- }
- ACE_ENDTRY;
-}
-
-void
-client_i::twoway_no_op (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "client_i::twoway_no_op\n"));
-}
diff --git a/TAO/tests/Nested_Event_Loop/test_i.h b/TAO/tests/Nested_Event_Loop/test_i.h
deleted file mode 100644
index 37d1b80f541..00000000000
--- a/TAO/tests/Nested_Event_Loop/test_i.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-#include "testS.h"
-
-class server_i : public POA_server
-{
-public:
- server_i (CORBA::ORB_ptr orb);
-
- void loop (client_ptr remote_partner,
- CORBA::ULong event_loop_depth,
- CORBA::ULong event_loop_iterations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void run_no_ops (client_ptr remote_partner,
- CORBA::ULong iterations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void no_op (client_ptr remote_partner,
- const act &act_for_iterations,
- const act &act_for_flag
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-class client_i : public POA_client
-{
-public:
- client_i (server_ptr remote_partner);
-
- void loop (CORBA::ULong event_loop_depth,
- CORBA::ULong event_loop_iterations
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void oneway_no_op (const act &act_for_iterations,
- const act &act_for_flag
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void twoway_no_op (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- server_var remote_partner_;
-};
diff --git a/TAO/tests/Nested_Upcall_Crash/.cvsignore b/TAO/tests/Nested_Upcall_Crash/.cvsignore
deleted file mode 100644
index 553990c9618..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-client
-scavenger
-server
diff --git a/TAO/tests/Nested_Upcall_Crash/Client_Peer.cpp b/TAO/tests/Nested_Upcall_Crash/Client_Peer.cpp
deleted file mode 100644
index 027682bd595..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Client_Peer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * @file Client_Peer.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Client_Peer.h"
-#include "Clock_Ticks.h"
-#include "tao/ORB_Core.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Nested_Upcall_Crash, Client_Peer, "$Id$")
-
-class Crasher : public ACE_Event_Handler
-{
-public:
- Crasher (void);
-
- virtual int handle_timeout (ACE_Time_Value const & current_time,
- void const * arg);
-};
-
-Client_Peer::Client_Peer (CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-void
-Client_Peer::callme(Test::Peer_ptr callback,
- CORBA::ULong max_depth,
- Test::Payload const &
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Received call, depth = %d\n", max_depth));
- if (max_depth > 0)
- {
- Test::Peer_var me =
- this->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::Payload return_data;
-
- callback->callme(me.in(), max_depth - 1, return_data
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-Client_Peer::crash(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- Crasher * crasher = new Crasher;
-
- ACE_Time_Value clk_tck (0, Clock_Ticks::get_usecs_per_tick ());
- ACE_Reactor * reactor = this->orb_->orb_core()->reactor();
- reactor->schedule_timer(crasher, 0, clk_tck);
-}
-
-void
-Client_Peer::noop(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
-}
-
-Crasher::Crasher(void)
-{
-}
-
-int
-Crasher::handle_timeout (ACE_Time_Value const & ,
- void const *)
-{
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Performing intentional crash
- // %a\n"));
- ACE_OS::abort();
- return 0;
-}
diff --git a/TAO/tests/Nested_Upcall_Crash/Client_Peer.h b/TAO/tests/Nested_Upcall_Crash/Client_Peer.h
deleted file mode 100644
index bd913ce1782..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Client_Peer.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * @file Client_Peer.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Client_Peer__h_
-#define Client_Peer__h_
-
-#include "TestS.h"
-
-class Client_Peer
- : public POA_Test::Peer
-{
-public:
- Client_Peer (CORBA::ORB_ptr orb);
-
- void callme(Test::Peer_ptr callback,
- CORBA::ULong max_depth,
- Test::Payload const &
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- void crash(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- void noop(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* Client_Peer__h_ */
diff --git a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp b/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp
deleted file mode 100644
index 2d1c7cbbb59..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * @file Clock_Ticks.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Clock_Ticks.h"
-
-ACE_RCSID(Nested_Upcall_Crash, Clock_Ticks, "$Id$")
-
-long
-Clock_Ticks::get_hz (void)
-{
-#if defined(_SC_CLK_TCK)
- long r = ACE_OS::sysconf(_SC_CLK_TCK);
- if(r != -1)
- return r;
-#endif /* _SC_CLK_TCK */
-
-#if defined(CLK_TCK)
- return CLK_TCK;
-#elif defined(HZ)
- return HZ;
-#else
- return 100; // A good guess for most systems!
-#endif /* CLK_TCK */
-}
-
-int
-Clock_Ticks::get_usecs_per_tick (void)
-{
- return 1000000 / get_hz ();
-}
diff --git a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h b/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h
deleted file mode 100644
index 162dec87a9f..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Clock_Ticks.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef Clock_Ticks__h_
-#define Clock_Ticks__h_
-/**
- * @file Clock_Ticks.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-
-#include "ace/OS.h"
-
-namespace Clock_Ticks
-{
- /// Return the number of clock ticks per second
- long get_hz (void);
-
- /// Return the number of microseconds per tick
- int get_usecs_per_tick (void);
-}
-
-#endif /* Clock_Ticks__h_ */
diff --git a/TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc b/TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc
deleted file mode 100644
index 68469dc0fff..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Nested_Upcall_Crash.mpc
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- specific(bmake, borland, nmake, em3, vc6, vc71, vc8) {
- // Use a roughly 16MB stack to avoid stack overflow in this test
- StackReserveSize = 16000000
- }
- Source_Files {
- Clock_Ticks.cpp
- Server_Peer.cpp
- server.cpp
- }
-}
-
-project(*Scavenger): taoserver, messaging {
- exename = scavenger
- after += *Server
- Source_Files {
- scavenger.cpp
- }
-}
-
-project(*Client): taoserver, messaging {
- exename = client
- after += *Scavenger
- Source_Files {
- Clock_Ticks.cpp
- Client_Peer.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Nested_Upcall_Crash/Server_Peer.cpp b/TAO/tests/Nested_Upcall_Crash/Server_Peer.cpp
deleted file mode 100644
index 658ffeb935a..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Server_Peer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * @file Server_Peer.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#include "Server_Peer.h"
-#include "tao/debug.h"
-
-ACE_RCSID(Nested_Upcall_Crash, Server_Peer, "$Id$")
-
-Server_Peer::Server_Peer (ACE_RANDR_TYPE seed,
- CORBA::ORB_ptr orb,
- CORBA::ULong payload_size)
- : seed_ (seed)
- , orb_ (CORBA::ORB::_duplicate(orb))
- , payload_size_ (payload_size)
-{
-}
-
-void
-Server_Peer::callme(Test::Peer_ptr callback,
- CORBA::ULong max_depth,
- Test::Payload const &
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- int r = ACE_OS::rand_r(this->seed_) % 50;
-
- if(TAO_debug_level)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Server_Peer::callme[%d], r = %d\n",
- max_depth, r));
- }
-
- if(r == 0)
- {
- ACE_TRY
- {
- callback->crash(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- // orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- // ACE_CHECK;
- }
- else if (max_depth > 0)
- {
- Test::Peer_var me =
- this->_this(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::Payload extra_data(this->payload_size_);
- extra_data.length(this->payload_size_);
- callback->callme(me.in(),
- max_depth - 1,
- extra_data
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-Server_Peer::crash(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ACE_THROW(CORBA::NO_IMPLEMENT ());
-}
-
-void
-Server_Peer::noop(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/Nested_Upcall_Crash/Server_Peer.h b/TAO/tests/Nested_Upcall_Crash/Server_Peer.h
deleted file mode 100644
index c1ee59f802f..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Server_Peer.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file Server_Peer.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Server_Peer__h_
-#define Server_Peer__h_
-
-#include "TestS.h"
-
-class Server_Peer
- : public POA_Test::Peer
-{
-public:
- Server_Peer (ACE_RANDR_TYPE seed,
- CORBA::ORB_ptr orb,
- CORBA::ULong payload_size);
-
- void callme(Test::Peer_ptr callback,
- CORBA::ULong max_depth,
- Test::Payload const & extra_data
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- void crash(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- void noop(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- ACE_RANDR_TYPE seed_;
-
- CORBA::ORB_var orb_;
-
- CORBA::ULong payload_size_;
-};
-
-#endif /* Server_Peer__h_ */
diff --git a/TAO/tests/Nested_Upcall_Crash/Test.idl b/TAO/tests/Nested_Upcall_Crash/Test.idl
deleted file mode 100644
index 01ff3602659..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/Test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- *
- */
-#ifndef Test__idl_
-#define Test__idl_
-
-module Test
-{
- typedef sequence<octet> Payload;
- interface Peer
- {
- oneway void callme (in Peer callback,
- in unsigned long max_depth,
- in Payload extra_data);
-
- oneway void crash();
-
- void noop();
- };
-};
-
-#endif /* Test__idl_ */
diff --git a/TAO/tests/Nested_Upcall_Crash/client.cpp b/TAO/tests/Nested_Upcall_Crash/client.cpp
deleted file mode 100644
index 0bafc403012..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/client.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// $Id$
-
-#include "Client_Peer.h"
-#include "Clock_Ticks.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID(Nested_Upcall_Crash, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[]);
-
-class Timer : public ACE_Event_Handler
-{
-public:
- Timer(Test::Peer_ptr local_peer,
- Test::Peer_ptr remote_peer);
-
- virtual int handle_timeout (ACE_Time_Value const & current_time,
- void const * arg);
-
-private:
- Test::Peer_var local_peer_;
- Test::Peer_var remote_peer_;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_SERVER;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Client_Peer *impl;
- ACE_NEW_RETURN (impl,
- Client_Peer (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(impl);
-
- Test::Peer_var local_peer =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Peer_var peer =
- Test::Peer::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (peer.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Peer reference <%s>\n",
- ior),
- 1);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Timer timer(local_peer.in (), peer.in ());
-
- ACE_Time_Value interval(0, 50 * Clock_Ticks::get_usecs_per_tick ());
- ACE_Reactor * reactor = orb->orb_core()->reactor();
- reactor->schedule_timer(&timer, 0, interval, interval);
-
- ACE_Time_Value run_time(120, 0);
- orb->run (run_time ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - event loop finished\n"));
-
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-Timer::Timer(Test::Peer_ptr local_peer,
- Test::Peer_ptr remote_peer)
- : local_peer_ (Test::Peer::_duplicate (local_peer))
- , remote_peer_ (Test::Peer::_duplicate (remote_peer))
-{
-}
-
-int
-Timer::handle_timeout (ACE_Time_Value const & ,
- void const *)
-{
- Test::Payload data;
- this->remote_peer_->callme (this->local_peer_.in(), 32, data);
- return 0;
-}
diff --git a/TAO/tests/Nested_Upcall_Crash/run_test.pl b/TAO/tests/Nested_Upcall_Crash/run_test.pl
deleted file mode 100755
index 8546ce10c19..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/run_test.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-local $start_time = time();
-local $max_running_time = 600; # 10 minutes
-local $elapsed = time() - $start_time;
-
-while($elapsed < $max_running_time) {
- # Start all clients in parallel
- $client1 = $CL1->Spawn ();
- $client2 = $CL2->Spawn ();
- $client3 = $CL3->Spawn ();
-
- # ... wait for the clients to die unless they did not startup,
- # ignore errors because they intentionally crash themselves!
- $CL3->WaitKill(30) unless $client3 < 0;
- $CL2->WaitKill(30) unless $client2 < 0;
- $CL1->WaitKill(30) unless $client1 < 0;
-
- $elapsed = time() - $start_time;
-}
-
-$server = $SV->TerminateWaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Nested_Upcall_Crash/scavenger.cpp b/TAO/tests/Nested_Upcall_Crash/scavenger.cpp
deleted file mode 100644
index ca3ac54ea98..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/scavenger.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Nested_Upcall_Crash, scavenger, "$Id$")
-
-const char *ior = "file://test.ior";
-
-#if defined (ACE_OPENVMS)
-// need this to circumvent link error on OpenVMS
-// has to do with interference in template instantiations
-// because multiple executables are build in one directory
-// reuising eachothers object files.
-ACE_Time_Value dum = ACE_Time_Value::zero;
-#endif
-
-int
-parse_args (int argc, char *argv[]);
-
-int
-main (int argc, char *argv[])
-{
- int ret_val = 0;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_SERVER;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Peer_var peer =
- Test::Peer::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (peer.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Peer reference <%s>\n",
- ior),
- 1);
- }
-
- while(1)
- {
- peer->noop (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- /* Warning with TRU 64 builds
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) scavenger - event loop finished\n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;*/
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- ret_val = 1;
- }
- ACE_ENDTRY;
-
- return ret_val;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
diff --git a/TAO/tests/Nested_Upcall_Crash/server.cpp b/TAO/tests/Nested_Upcall_Crash/server.cpp
deleted file mode 100644
index 0b7eb0628fe..00000000000
--- a/TAO/tests/Nested_Upcall_Crash/server.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-// $Id$
-
-#include "Server_Peer.h"
-#include "Clock_Ticks.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/ORB_Core.h"
-#include "ace/Get_Opt.h"
-#include "ace/Reactor.h"
-#include "ace/OS_NS_time.h"
-
-ACE_RCSID (Nested_Upcall_Crash,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-ACE_RANDR_TYPE seed;
-int payload_size = 4;
-
-int
-parse_args (int argc, char *argv[]);
-
-class Sleeper : public ACE_Event_Handler
-{
-public:
- Sleeper(CORBA::ORB_ptr orb);
-
- virtual int handle_timeout (ACE_Time_Value const & current_time,
- void const * arg);
-
-private:
- CORBA::ORB_var orb_;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_WITH_SERVER;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- seed = (ACE_RANDR_TYPE) ACE_OS::gethrtime ();
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- ACE_DEBUG ((LM_DEBUG, "SEED = %u\n", seed));
-
- Server_Peer *impl;
- ACE_NEW_RETURN (impl,
- Server_Peer (seed, orb.in (), payload_size),
- 1);
- PortableServer::ServantBase_var owner_transfer(impl);
-
- Test::Peer_var peer =
- impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (peer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Sleeper sleeper (orb.in ());
-
- ACE_Time_Value interval(0, 500000);
- ACE_Reactor * reactor = orb->orb_core()->reactor();
- reactor->schedule_timer(&sleeper, 0, interval, interval);
-
- // ACE_Time_Value run_time(600, 0);
- // orb->run (run_time ACE_ENV_ARG_PARAMETER);
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:s:b:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 's':
- seed = ACE_OS::atoi(get_opts.opt_arg ());
- break;
-
- case 'b':
- payload_size = ACE_OS::atoi(get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-s <seed> "
- "-b <payload_size> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-Sleeper::Sleeper(CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Sleeper::handle_timeout (ACE_Time_Value const & ,
- void const *)
-{
- // ACE_DEBUG((LM_DEBUG, "(%P|%t) - Sleeper::handle_timeout()\n"));
- ACE_Time_Value clk_tck (0, Clock_Ticks::get_usecs_per_tick ());
- this->orb_->perform_work(clk_tck);
-
- return 0;
-}
diff --git a/TAO/tests/No_Server_MT_Connect_Test/.cvsignore b/TAO/tests/No_Server_MT_Connect_Test/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc b/TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc
deleted file mode 100644
index bfb96e8b536..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/No_Server_Connect_Test.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/No_Server_MT_Connect_Test/README b/TAO/tests/No_Server_MT_Connect_Test/README
deleted file mode 100644
index 95bcacddc97..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/README
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-
-@page No_Server_MT_Connect_Test README File
-
- The objective of the test is to track the behavior of the
-multi-threaded client when no server is present to connect. The client
-uses all the connect strategies provided by the ORB. All the client
-threads should exit gracefully.
-
-This test is to make sure (hopefully) the refcount mechanism on the
-handler used that safeguards handlers getting deleted when the
-connection establishment fails.
-
- Please refrain from "improving", extending or expanding this
-test, if you need to change
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/No_Server_MT_Connect_Test/blocked.conf b/TAO/tests/No_Server_MT_Connect_Test/blocked.conf
deleted file mode 100644
index bb70bf3b8bb..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/blocked.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# $Id$
-#
-static Client_Strategy_Factory "-ORBConnectStrategy Blocked"
diff --git a/TAO/tests/No_Server_MT_Connect_Test/blocked.conf.xml b/TAO/tests/No_Server_MT_Connect_Test/blocked.conf.xml
deleted file mode 100644
index fab257247f5..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/blocked.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/No_Server_MT_Connect_Test/blocked.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="Client_Strategy_Factory" params="-ORBConnectStrategy Blocked"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/No_Server_MT_Connect_Test/client.cpp b/TAO/tests/No_Server_MT_Connect_Test/client.cpp
deleted file mode 100644
index 4034e1245c9..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/client.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(MT_Client, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int nthreads = 5;
-int niterations = 5;
-int server_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:n:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'x':
- server_shutdown = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-n <nthreads> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Client : public ACE_Task_Base
-{
- // = TITLE
- // Run the client thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run the client threads.
- //
-public:
- Client (Simple_Server_ptr server, int niterations);
-
-
- /// The thread entry point.
- virtual int svc (void);
-
-private:
- Simple_Server_var server_;
- // The server.
-
- int niterations_;
- // The number of iterations on each client thread.
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- if (server_shutdown)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- Client client (server.in (), niterations);
- if (client.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate client threads\n"),
- 1);
-
- client.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "threads finished\n"));
-
-
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Client::Client (Simple_Server_ptr server,
- int niterations)
- : server_ (Simple_Server::_duplicate (server)),
- niterations_ (niterations)
-{
-}
-
-int
-Client::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- for (int i = 0; i < this->niterations_; ++i)
- {
- this->server_->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n",
- i));
- }
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Expected exceptions \n"));
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/No_Server_MT_Connect_Test/reactor.conf b/TAO/tests/No_Server_MT_Connect_Test/reactor.conf
deleted file mode 100644
index 75f11aa8a40..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/reactor.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# $Id$
-#
-static Client_Strategy_Factory "-ORBConnectStrategy Reactive"
diff --git a/TAO/tests/No_Server_MT_Connect_Test/reactor.conf.xml b/TAO/tests/No_Server_MT_Connect_Test/reactor.conf.xml
deleted file mode 100644
index 76c7d2eceba..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/reactor.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/No_Server_MT_Connect_Test/reactor.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <static id="Client_Strategy_Factory" params="-ORBConnectStrategy Reactive"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/No_Server_MT_Connect_Test/run_test.pl b/TAO/tests/No_Server_MT_Connect_Test/run_test.pl
deleted file mode 100755
index 0b64a248eec..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/run_test.pl
+++ /dev/null
@@ -1,73 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile -x");
-# Use a single thread in this test, because the strategy is only for
-# single threaded cases
-$CL2 = new PerlACE::Process ("client", "-ORBSvcConf reactor$PerlACE::svcconf_ext -n 1 -k file://$iorfile");
-$CL3 = new PerlACE::Process ("client", "-ORBSvcConf blocked$PerlACE::svcconf_ext -k file://$iorfile");
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-print STDERR "===== Base test, using LF \n";
-$client1 = $CL1->SpawnWaitKill (100);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-
-print STDERR "=================================== \n";
-print STDERR "===== Test, using reactor to connect \n";
-$client2 = $CL2->SpawnWaitKill (100);
-
-if ($client2 != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print STDERR "========================================= \n";
-print STDERR "===== Test, using blocked connect strategy\n";
-$client3 = $CL3->SpawnWaitKill (100);
-
-if ($client3 != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/No_Server_MT_Connect_Test/server.cpp b/TAO/tests/No_Server_MT_Connect_Test/server.cpp
deleted file mode 100644
index bf5e6312642..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/server.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(MT_Client, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/No_Server_MT_Connect_Test/test.idl b/TAO/tests/No_Server_MT_Connect_Test/test.idl
deleted file mode 100644
index cbb8054de28..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/test.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * $Id$
- */
-
-/// A simple interface to test the ORB
-interface Simple_Server
-{
- /// This method is a noop, and it is used just to exercise the
- /// critical path
- void test_method ();
-
- /// Shutdown the server
- /**
- * Provide a simple way to cleanup the test when it finishes
- */
- oneway void shutdown ();
-};
diff --git a/TAO/tests/No_Server_MT_Connect_Test/test_i.cpp b/TAO/tests/No_Server_MT_Connect_Test/test_i.cpp
deleted file mode 100644
index 32bbdd97bcb..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/test_i.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID(MT_Client, test_i, "$Id$")
-
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Simple_Server_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/No_Server_MT_Connect_Test/test_i.h b/TAO/tests/No_Server_MT_Connect_Test/test_i.h
deleted file mode 100644
index 0189dc49b87..00000000000
--- a/TAO/tests/No_Server_MT_Connect_Test/test_i.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id$
-
-#ifndef TAO_NO_SERVER_MT_CLIENT_TEST_I_H
-#define TAO_NO_SERVER_MT_CLIENT_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- void test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* TAO_MT_CLIENT_TEST_I_H */
diff --git a/TAO/tests/OBV/Any/.cvsignore b/TAO/tests/OBV/Any/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/OBV/Any/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/OBV/Any/Any.idl b/TAO/tests/OBV/Any/Any.idl
deleted file mode 100644
index 23038e8e90a..00000000000
--- a/TAO/tests/OBV/Any/Any.idl
+++ /dev/null
@@ -1,38 +0,0 @@
-//$Id$
-
-//
-// This file contains few valuetypes to show and test basic CORBA any
-// functionality related to valuetypes.
-//
-
-module OBV_AnyTest
-{
-
- valuetype VZ
- {
- };
-
- valuetype VA : VZ
- {
- public unsigned long id;
- };
-
- valuetype VB : VA
- {
- };
-
- //
- // Interface to pass valuetypes.
- //
- interface Test
- {
- // Returns VA or VB inserted into any
- any get_something (in boolean need_vb);
-
- VB get_vb ();
-
- // Shutdown the romote ORB
- oneway void shutdown ();
- };
-
-};
diff --git a/TAO/tests/OBV/Any/AnyS_impl.cpp b/TAO/tests/OBV/Any/AnyS_impl.cpp
deleted file mode 100644
index 851de09a37c..00000000000
--- a/TAO/tests/OBV/Any/AnyS_impl.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id$
-
-#include "AnyS_impl.h"
-
-
-ACE_RCSID(Any, AnyS_impl, "$Id$")
-
-Test_impl::Test_impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Any*
-Test_impl::get_something (
- CORBA::Boolean need_vb
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any_ptr ret_val_ptr = 0;
- ACE_NEW_RETURN (ret_val_ptr, CORBA::Any, 0);
- CORBA::Any_var ret_val = ret_val_ptr;
-
- const CORBA::ULong magic = 3145;
-
- if (need_vb)
- {
- OBV_AnyTest::VB_var vb;
- ACE_NEW_RETURN (vb.inout (), OBV_OBV_AnyTest::VB, 0);
-
- vb->id (magic);
-
- ret_val.inout () <<= vb.in ();
- }
- else
- {
- OBV_AnyTest::VA_var va;
- ACE_NEW_RETURN (va.inout (), OBV_OBV_AnyTest::VA, 0);
-
- va->id (magic);
-
- OBV_AnyTest::VA *va_ptr = va._retn ();
- ret_val.inout () <<= &va_ptr;
-
- //*ret_val <<= va.in ();
- }
-
- return ret_val._retn();
-}
-
-OBV_AnyTest::VB *
-Test_impl::get_vb(
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- const CORBA::ULong magic = 3145;
-
- OBV_AnyTest::VB_var vb;
- ACE_NEW_RETURN (vb.inout (), OBV_OBV_AnyTest::VB, 0);
-
- vb->id (magic);
- return vb._retn();
-}
-
-void
-Test_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/OBV/Any/AnyS_impl.h b/TAO/tests/OBV/Any/AnyS_impl.h
deleted file mode 100644
index d7ba0a3f399..00000000000
--- a/TAO/tests/OBV/Any/AnyS_impl.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/Any
-//
-// = FILENAME
-// AnyS_impl.h
-//
-// = AUTHOR
-// Boris Kolpackov <bosk@ipmce.ru>
-//
-// ============================================================================
-
-#ifndef TAO_ANY_S_IMPL_H
-#define TAO_ANY_S_IMPL_H
-
-#include "AnyS.h"
-
-class Test_impl : public POA_OBV_AnyTest::Test
-{
- // = TITLE
- // Implementation of Test interface
- //
- // = DESCRIPTION
- // This interface is provided to produce valuetypes and test
- // marshaling
- //
-public:
- Test_impl (CORBA::ORB_ptr orb);
- // ctor
-
- virtual CORBA::Any * get_something (
- CORBA::Boolean need_vb
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual OBV_AnyTest::VB * get_vb (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- CORBA::Boolean even_;
- // The ORB
-};
-
-#endif /* TAO_ANY_S_IMPL_H */
diff --git a/TAO/tests/OBV/Any/OBV_Any.mpc b/TAO/tests/OBV/Any/OBV_Any.mpc
deleted file mode 100644
index 62083fb37f5..00000000000
--- a/TAO/tests/OBV/Any/OBV_Any.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver, valuetype {
- Source_Files {
- AnyS_impl.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, valuetype {
- after += *Server
- Source_Files {
- AnyC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/OBV/Any/README b/TAO/tests/OBV/Any/README
deleted file mode 100644
index d8242a24fc1..00000000000
--- a/TAO/tests/OBV/Any/README
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-
-@page OBV/Any Test README File
-
- This is a very simple test to show and verify basic OBV-and-Any
- functionality.
-
- To run the test either use the run_test.pl script:
-
-$ ./run_test.pl
-
- or start the client and the server manually:
-
-$ server -o ior
-$ client -k file://ior
-
-
-*/
diff --git a/TAO/tests/OBV/Any/client.cpp b/TAO/tests/OBV/Any/client.cpp
deleted file mode 100644
index 2b020e6427c..00000000000
--- a/TAO/tests/OBV/Any/client.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-// $Id$
-
-#include "AnyC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Any, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test started.\n"));
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Create and register factories.
-
- OBV_AnyTest::VA_init *va_factory = 0;
- ACE_NEW_RETURN (va_factory,
- OBV_AnyTest::VA_init,
- 1); // supplied by mapping
-
- orb->register_value_factory (va_factory->tao_repository_id (),
- va_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- va_factory->_remove_ref (); // release ownership
-
-
- OBV_AnyTest::VB_init *vb_factory = 0;
- ACE_NEW_RETURN (vb_factory,
- OBV_AnyTest::VB_init,
- 1); // supplied by mapping
-
- orb->register_value_factory (vb_factory->tao_repository_id (),
- vb_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- vb_factory->_remove_ref (); // release ownership
-
- // Do local test
-
- OBV_AnyTest::VA_var va1, va2;
- ACE_NEW_RETURN (va1.inout (), OBV_OBV_AnyTest::VA, 1);
- ACE_NEW_RETURN (va2.inout (), OBV_OBV_AnyTest::VA, 1);
-
- const CORBA::ULong magic = 3145;
-
- va1->id (magic);
- va2->id (magic);
-
- CORBA::Any a1, a2;
-
- // Test both copying and non-copying version of operator<<=
- a1 <<= va1.in ();
-
- OBV_AnyTest::VA *pva = va2._retn();
- a2 <<= &pva;
-
- OBV_AnyTest::VA* dst = 0;
-
- if (!(a1 >>= dst) || dst->id () != magic)
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - test failed.\n"),
- 1);
- }
-
- if (!(a2 >>= dst) || dst->id () != magic)
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - test failed.\n"),
- 1);
- }
-
-
- // It should be possible to extract to a base type
- OBV_AnyTest::VB_var vb1;
- ACE_NEW_RETURN (vb1.inout (), OBV_OBV_AnyTest::VB, 1);
- vb1->id (magic);
-
- a1 <<= vb1.in ();
- CORBA::ValueBase_var target;
- if (!(a1 >>= CORBA::Any::to_value(target.out())))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - base extraction test failed.\n"),
- 1);
- }
- dst = OBV_AnyTest::VA::_downcast(target._retn());
- if (dst == 0 || dst->id() != magic)
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - base extraction test failed.\n"),
- 1);
- }
-
-
- // Now do remote test
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- OBV_AnyTest::Test_var test =
- OBV_AnyTest::Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil OBV_AnyTest::Test reference <%s>\n",
- ior),
- 1);
- }
-
-
- // STEP 1.
- CORBA::Any_var result = test->get_something (
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(result.inout () >>= dst) || dst->id () != magic)
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - test 1 failed.\n"),
- 1);
- }
-
- // STEP 2.
- OBV_AnyTest::VB* dst_vb = 0;
- result = test->get_something (
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(result.inout () >>= dst_vb) || dst_vb->id () != magic)
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - test 2 failed.\n"),
- 1);
- }
-
- // STEP 3. A sanity check demonstrating base-type pointer to
- // derived type allowed.
- OBV_AnyTest::VA* dst_va = test->get_vb();
- if (dst_va->id () != magic)
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - test 3 failed.\n"),
- 1);
- }
-
-#if !defined (TAO_HAS_OPTIMIZED_VALUETYPE_MARSHALING)
- // @@ There's still a problem here with the optimized valuetype
- // marshaling and passing values through anys. The problem is
- // that while the Any in fact contains all of the required type
- // information, there is no way to share that with the
- // ValueBase::_tao_unmarshal_pre() which needs the type info in
- // order to select the appropriate value factory.
-
- // STEP 4. get a VB, but extract to a VA*.
- result = test->get_something (
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(result.inout () >>= CORBA::Any::to_value(target.out())))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - test 4 extraction failed.\n"),
- 1);
- }
- dst_va = OBV_AnyTest::VA::_downcast(target._retn());
- if (dst_va == 0 || dst_va->id() != magic)
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "(%P|%t) client - test 4 failed.\n"),
- 1);
- }
-#endif /* TAO_HAS_OPTIMIZED_VALUETYPE_MARSHALING */
-
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test finished.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Any/run_test.pl b/TAO/tests/OBV/Any/run_test.pl
deleted file mode 100755
index d7e953d0896..00000000000
--- a/TAO/tests/OBV/Any/run_test.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that runs all Naming Service tests. It starts
-# all the servers and clients as necessary.
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/Any/server.cpp b/TAO/tests/OBV/Any/server.cpp
deleted file mode 100644
index aadb21d4cd5..00000000000
--- a/TAO/tests/OBV/Any/server.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-
-#include "AnyS_impl.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Any, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_impl *test_impl;
- ACE_NEW_RETURN (test_impl,
- Test_impl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- OBV_AnyTest::Test_var test =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s.",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop started.\n"));
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished.\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Collocated/Forward/.cvsignore b/TAO/tests/OBV/Collocated/Forward/.cvsignore
deleted file mode 100644
index 9b04cc7c341..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-collocated
diff --git a/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp b/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
deleted file mode 100644
index 3c8697e8415..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-Client_Task::Client_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- // All factories are kindly provided by
- // compiler so we just to put everything in a right order.
-
- // Create and register factory for BaseNode.
- BaseNode_init *bn_factory = 0;
- ACE_NEW_RETURN (bn_factory,
- BaseNode_init,
- 1);
-
- this->corb_->register_value_factory (bn_factory->tao_repository_id (),
- bn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- bn_factory->_remove_ref (); // release ownership
-
- // Create and register factory for TreeController.
- TreeController_init *tc_factory = 0;
- ACE_NEW_RETURN (tc_factory,
- TreeController_init,
- 1);
-
- this->corb_->register_value_factory (tc_factory->tao_repository_id (),
- tc_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- tc_factory->_remove_ref (); // release ownership
-
- // Create and register factory for StringNode.
- StringNode_init *sn_factory = 0;
- ACE_NEW_RETURN (sn_factory,
- StringNode_init,
- 1);
-
- this->corb_->register_value_factory (sn_factory->tao_repository_id (),
- sn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- sn_factory->_remove_ref (); // release ownership
-
- //Well, done with factories.
-
- // Obtain reference to the object.
- CORBA::Object_var tmp =
- this->corb_->string_to_object(this->input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var test = Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test reference <%s>\n",
- this->input_),
- 1);
- }
-
- // Now build simple graph (tree in our case).
-
- TreeController_var tc;
- ACE_NEW_RETURN (tc.inout (),
- OBV_TreeController,
- 1);
-
- // Create the root node.
- {
- StringNode_var sn;
- ACE_NEW_RETURN (sn.inout (),
- OBV_StringNode,
- 1);
- sn->name ((const char*)("RootNode"));
- tc->root (sn);
-
- // Create the left leaf.
- {
- StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
- OBV_StringNode,
- 1);
- dummy->name ((const char*)("LeftNode"));
- sn->left (dummy);
- }
-
- // Create the right leaf.
- {
- StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
- OBV_StringNode,
- 1);
- dummy->name ((const char*)("RightNode"));
- sn->right (dummy);
-
- // dummy->right (sn); // ;-)
- }
- }
-
- // Make copy
-
- TreeController_var tc_copy;
- ACE_NEW_RETURN (tc_copy.inout (),
- OBV_TreeController,
- 1);
-
- // Create the root node.
- {
- StringNode_var sn;
- ACE_NEW_RETURN (sn.inout (),
- OBV_StringNode,
- 1);
- sn->name ((const char*)("RootNode"));
- tc_copy->root (sn);
-
- // Create the left leaf.
- {
- StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
- OBV_StringNode,
- 1);
- dummy->name ((const char*)("LeftNode"));
- sn->left (dummy);
- }
-
- // Create the right leaf.
- {
- StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
- OBV_StringNode,
- 1);
- dummy->name ((const char*)("RightNode"));
- sn->right (dummy);
-
- // dummy->right (sn); // ;-)
- }
- }
-
- if (!is_equal_tree (tc.in (), tc_copy.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: tc != tc_copy\n"),
- 1);
- }
-
- TreeController_var tc_result =
- test->reflect (tc.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The following two ifs will fail until bug 1390 is fixed.
- if (is_equal_tree (tc.in (), tc_result.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: tc == tc_result\n"),
- 1);
- }
- if (!is_equal_tree (tc.in (), tc_copy.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: tc != tc_copy\n"),
- 1);
- }
-
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-int
-Client_Task::is_equal_tree (TreeController * tree1, TreeController * tree2)
-{
- return is_equal_node (tree1->root (), tree2->root ());
-}
-
-
-int
-Client_Task::is_equal_node (BaseNode * node1, BaseNode * node2)
-{
- int ret_val = 0;
- if (!(node1 || node2))
- return 1;
- if (node1 && node2)
- {
- StringNode * sn1 = StringNode::_downcast (node1);
- StringNode * sn2 = StringNode::_downcast (node2);
- if (sn1 && sn2)
- if (!ACE_OS::strcmp (sn1->name (), sn2->name ()))
- ret_val = 1;
- if (!(sn1 || sn2))
- ret_val = 1;
- return (ret_val &&
- is_equal_node (node1->left (), node2->left ()) &&
- is_equal_node (node1->right (), node2->right ()));
- }
-
- return 0;
-}
-
-void
-Client_Task::dump_node (BaseNode *bn, int indent)
-{
- if (bn == 0) return;
-
- // This is ugly I know
- int i = indent;
- for (; i != 0; i--) ACE_DEBUG ((LM_DEBUG, " "));
-
- StringNode *sn = StringNode::_downcast (bn);
- if (sn != 0)
- {
- ACE_DEBUG ((LM_DEBUG, "%x <StringNode> %s\n",
- bn,
- sn->name ()));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "%x <BaseNode> \n",
- bn));
- }
-
- dump_node (bn->left (), indent + 1);
- dump_node (bn->right (), indent + 1);
-}
-
-void
-Client_Task::dump_tree (TreeController *tc)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) start tree dump <%x>\n",
- tc));
-
- dump_node (tc->root (), 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) end tree dump <%x>\n",
- tc));
-}
diff --git a/TAO/tests/OBV/Collocated/Forward/Client_Task.h b/TAO/tests/OBV/Collocated/Forward/Client_Task.h
deleted file mode 100644
index 3bce85e5d0d..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/Client_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef COLLOCATED_TEST_CLIENT_TASK_H
-#define COLLOCATED_TEST_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-#include "TreeBaseC.h"
-#include "TreeControllerC.h"
-#include "TreeNodeC.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 char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- void dump_node (BaseNode *bn, int indent);
-
- void dump_tree (TreeController *tc);
-
- int is_equal_tree (TreeController * tree1, TreeController * tree2);
-
- int is_equal_node (BaseNode * node1, BaseNode * node2);
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp b/TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp
deleted file mode 100644
index be09bb0c6db..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/Collocated_Test.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//$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 char *output = "test.ior";
-const char *input = "file://test.ior";
-static int named_orbs = 0;
-ACE_CString server_orb;
-ACE_CString client_orb;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "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 sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/OBV/Collocated/Forward/OBV_Forward.mpc b/TAO/tests/OBV/Collocated/Forward/OBV_Forward.mpc
deleted file mode 100644
index 874fb7e2c0c..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/OBV_Forward.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Collocated): taoserver, valuetype {
- exename = collocated
- Source_Files {
- Test_impl.cpp
- TreeBaseC.cpp
- TreeControllerC.cpp
- TreeNodeC.cpp
- TreeBaseS.cpp
- TreeControllerS.cpp
- TreeNodeS.cpp
- Collocated_Test.cpp
- Client_Task.cpp
- Server_Task.cpp
- Test_impl.cpp
- }
-}
-
diff --git a/TAO/tests/OBV/Collocated/Forward/Server_Task.cpp b/TAO/tests/OBV/Collocated/Forward/Server_Task.cpp
deleted file mode 100644
index 79efb6141fb..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/Server_Task.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "TreeBaseS.h"
-#include "TreeControllerS.h"
-#include "TreeNodeS.h"
-#include "Test_impl.h"
-
-#include "ace/Manual_Event.h"
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- // All factories are kindly provided by
- // compiler so we just to put everything in a right order.
-
- // Create and register factory for BaseNode.
- BaseNode_init *bn_factory = 0;
- ACE_NEW_RETURN (bn_factory,
- BaseNode_init,
- 1);
-
- this->sorb_->register_value_factory (bn_factory->tao_repository_id (),
- bn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- bn_factory->_remove_ref (); // release ownership
-
- // Create and register factory for TreeController.
- TreeController_init *tc_factory = 0;
- ACE_NEW_RETURN (tc_factory,
- TreeController_init,
- 1);
-
- this->sorb_->register_value_factory (tc_factory->tao_repository_id (),
- tc_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- tc_factory->_remove_ref (); // release ownership
-
- // Create and register factory for StringNode.
- StringNode_init *sn_factory = 0;
- ACE_NEW_RETURN (sn_factory,
- StringNode_init,
- 1);
-
- this->sorb_->register_value_factory (sn_factory->tao_repository_id (),
- sn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- sn_factory->_remove_ref (); // release ownership
-
- //Well, done with factories.
-
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_impl *test_impl;
- ACE_NEW_RETURN (test_impl,
- Test_impl (this->sorb_.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- Test_var test = test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the this->output_ exists, output the ior to it
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->sorb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Collocated/Forward/Server_Task.h b/TAO/tests/OBV/Collocated/Forward/Server_Task.h
deleted file mode 100644
index 60006aae0ba..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/Server_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- 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 char *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 char *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/TAO/tests/OBV/Collocated/Forward/Test_impl.cpp b/TAO/tests/OBV/Collocated/Forward/Test_impl.cpp
deleted file mode 100644
index 03b0440a092..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/Test_impl.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-
-#include "Test_impl.h"
-
-Test_impl::Test_impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-
-void
-reflect_node (BaseNode* bn)
-{
- if(bn == 0) return;
-
- reflect_node (bn->left ());
- reflect_node (bn->right ());
-
- BaseNode *old_right = bn->right ();
- BaseNode *old_left = bn->left ();
-
- CORBA::add_ref (old_right);
- CORBA::add_ref (old_left);
-
- bn->right (old_left);
- bn->left (old_right);
-}
-
-TreeController *
-Test_impl::reflect (TreeController * tc
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (tc != 0)
- {
- reflect_node (tc-> root());
- tc->_add_ref ();
- }
- return tc;
-}
-
-void
-Test_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/OBV/Collocated/Forward/Test_impl.h b/TAO/tests/OBV/Collocated/Forward/Test_impl.h
deleted file mode 100644
index 725369e944a..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/Test_impl.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/Collocated/Forward
-//
-// = FILENAME
-// Test_impl.h
-//
-// = AUTHOR
-// Boris Kolpackov <bosk@ipmce.ru>
-//
-// ============================================================================
-
-#ifndef TAO_TEST_IMPL_H
-#define TAO_TEST_IMPL_H
-
-#include "TreeControllerS.h"
-#include "TreeBaseS.h"
-#include "TreeNodeS.h"
-
-class Test_impl : public POA_Test
-{
- // = TITLE
- // Implementation of Test interface
- //
- // = DESCRIPTION
- // This interface is provided to produce valuetypes and test
- // marshaling
- //
-public:
- Test_impl (CORBA::ORB_ptr orb);
- // ctor
-
- virtual TreeController * reflect (
- TreeController * tc
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* TAO_TEST_IMPL_H */
diff --git a/TAO/tests/OBV/Collocated/Forward/TreeBase.idl b/TAO/tests/OBV/Collocated/Forward/TreeBase.idl
deleted file mode 100644
index 662c919aea5..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/TreeBase.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-
-// Forward declaration to make recursive construct.
-valuetype BaseNode;
-
-//@@ Dosn't work for now
-//typedef sequence<BaseNode> BaseNodeSeq;
-
-// Performance test: One may try to pass
-// over the wire a cyclic graph and measure
-// how quickly TAO evaporates memory ;-)
-
-valuetype BaseNode
-{
- //@@ TODO:
- //public BaseNodeSeq node_seq;
-
- public BaseNode left;
- public BaseNode right;
-
-};
diff --git a/TAO/tests/OBV/Collocated/Forward/TreeController.idl b/TAO/tests/OBV/Collocated/Forward/TreeController.idl
deleted file mode 100644
index 4a9705db918..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/TreeController.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-
-valuetype BaseNode;
-
-// This TreeController is probably a silly idea.
-// All I want from it is a valutype forward declared
-// in one file and fully defined in another.
-
-valuetype TreeController
-{
- public BaseNode root;
-};
-
-interface Test
-{
- // Returnes the reflected copy of its argument.
- TreeController reflect (in TreeController tc);
-
- // Shutdown the romote ORB
- oneway void shutdown ();
-};
diff --git a/TAO/tests/OBV/Collocated/Forward/TreeNode.idl b/TAO/tests/OBV/Collocated/Forward/TreeNode.idl
deleted file mode 100644
index 06010fd7b18..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/TreeNode.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-#include "TreeBase.idl"
-
-//
-// A concrete node type
-//
-valuetype StringNode : BaseNode
-{
- public string name;
-};
diff --git a/TAO/tests/OBV/Collocated/Forward/run_test.pl b/TAO/tests/OBV/Collocated/Forward/run_test.pl
deleted file mode 100755
index 04b35aa1182..00000000000
--- a/TAO/tests/OBV/Collocated/Forward/run_test.pl
+++ /dev/null
@@ -1,39 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $CO = new PerlACE::ProcessVX ("collocated");
-}
-else {
- $CO = new PerlACE::Process ("collocated");
-}
-
-$CO->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$result = $CO->WaitKill (10);
-
-if ($result != 0) {
- print STDERR "ERROR: collocated returned $result\n";
- $result = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/Factory/.cvsignore b/TAO/tests/OBV/Factory/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/OBV/Factory/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/OBV/Factory/Factory.idl b/TAO/tests/OBV/Factory/Factory.idl
deleted file mode 100644
index f6fd41a6ab7..00000000000
--- a/TAO/tests/OBV/Factory/Factory.idl
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id$
-
-//
-// This file contains few valuetypes to show and test basic OBV factory
-// construct functionality.
-//
-
-module OBV_FactoryTest
-{
-
- //
- // Base valuetype without any ops or factories. Result should be
- // concrete BaseConcreteValue_init class ready to use.
- //
- valuetype BaseValue
- {
- // Nested type to check proper visibility.
- struct BV_Data
- {
- unsigned long value;
- };
-
- public unsigned long some_data;
- };
-
- //
- // Another valuetype w/o ops, etc. Just to check proper inheritance
- // of OBV_ classes and RefCounter's. Value1_init should be
- // concrete as well.
- //
- valuetype Value1 : BaseValue
- {
- public unsigned long id;
- };
-
- //
- // Valuetype with few factories.
- //
- valuetype Value2 : BaseValue
- {
- public unsigned long id;
- public BV_Data data;
-
- factory create_default (in unsigned long id);
- factory create (in unsigned long id,
- in BV_Data data);
- };
-
- //
- // Interface to pass valuetypes.
- //
- interface Test
- {
- BaseValue get_base_value ();
- Value1 get_value1 ();
- Value2 get_value2 ();
-
- // Shutdown the romote ORB
- oneway void shutdown ();
-
- };
-
-};
diff --git a/TAO/tests/OBV/Factory/FactoryC_impl.cpp b/TAO/tests/OBV/Factory/FactoryC_impl.cpp
deleted file mode 100644
index ee0512b4177..00000000000
--- a/TAO/tests/OBV/Factory/FactoryC_impl.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "FactoryC_impl.h"
-
-ACE_RCSID (Factory,
- FactoryC_impl,
- "$Id$")
-
-OBV_FactoryTest::Value2*
-Value2_init_impl::create_default (CORBA::ULong id)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- OBV_FactoryTest::Value2* ret_val = 0;
- ACE_NEW_RETURN (ret_val,
- Value2_impl,
- 0);
-
- if (ret_val)
- {
- ret_val->id (id);
- }
-
- return ret_val;
-}
-
-OBV_FactoryTest::Value2*
-Value2_init_impl::create (
- CORBA::ULong id,
- const OBV_FactoryTest::BaseValue::BV_Data & data
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- OBV_FactoryTest::Value2* ret_val = 0;
- ACE_NEW_RETURN (ret_val,
- Value2_impl,
- 0);
-
- if (ret_val)
- {
- ret_val->id (id);
- ret_val->data (data);
- }
-
- return ret_val;
-}
-
-CORBA::ValueBase *
-Value2_init_impl::create_for_unmarshal (ACE_ENV_SINGLE_ARG_DECL)
-{
- OBV_FactoryTest::Value2* ret_val = 0;
- ACE_NEW_THROW_EX (ret_val,
- Value2_impl,
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- return ret_val;
-}
diff --git a/TAO/tests/OBV/Factory/FactoryC_impl.h b/TAO/tests/OBV/Factory/FactoryC_impl.h
deleted file mode 100644
index 895d9fb808b..00000000000
--- a/TAO/tests/OBV/Factory/FactoryC_impl.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-
-// ===================================================================
-/**
- * @file FactoryC_impl.h
- *
- * $Id$
- *
- * @author Boris Kolpackov <bosk@ipmce.ru>
- */
-// ===================================================================
-
-#ifndef TAO_FACTORY_FACTORY_C_IMPL_H
-#define TAO_FACTORY_FACTORY_C_IMPL_H
-
-#include "FactoryC.h"
-
-/**
- * @class Value2_impl
- *
- * @brief Value2 implementation.
- *
- * Implements the Value2 valuetype.
- *
- * @note Just need to mix-in RefCounter
- */
-class Value2_impl : public virtual OBV_OBV_FactoryTest::Value2,
- public virtual CORBA::DefaultValueRefCountBase
-{
-};
-
-/**
- * @class Value2_init_impl
- *
- * @brief OBV factory implementation.
- *
- * Implements the Value2 factory implementation.
- */
-class Value2_init_impl : public OBV_FactoryTest::Value2_init
-{
-public:
-
- virtual OBV_FactoryTest::Value2* create_default (
- CORBA::ULong id
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual OBV_FactoryTest::Value2* create (
- CORBA::ULong id,
- const OBV_FactoryTest::BaseValue::BV_Data & data
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-public:
-
- virtual CORBA::ValueBase * create_for_unmarshal (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
-};
-
-#endif /* TAO_FACTORY_FACTORY_C_IMPL_H */
diff --git a/TAO/tests/OBV/Factory/FactoryS_impl.cpp b/TAO/tests/OBV/Factory/FactoryS_impl.cpp
deleted file mode 100644
index 49bd2e9401b..00000000000
--- a/TAO/tests/OBV/Factory/FactoryS_impl.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id$
-
-#include "FactoryC_impl.h"
-#include "FactoryS_impl.h"
-
-
-ACE_RCSID(Factory, FactoryS_impl, "$Id$")
-
-Test_impl::Test_impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-OBV_FactoryTest::BaseValue *
-Test_impl::get_base_value (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- OBV_FactoryTest::BaseValue* ret_val = 0;
- ACE_NEW_RETURN (ret_val,
- OBV_OBV_FactoryTest::BaseValue,
- 0);
-
- return ret_val;
-}
-
-OBV_FactoryTest::Value1 *
-Test_impl::get_value1 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- OBV_FactoryTest::Value1* ret_val = 0;
- ACE_NEW_RETURN (ret_val,
- OBV_OBV_FactoryTest::Value1,
- 0);
-
- return ret_val;
-}
-
-OBV_FactoryTest::Value2 *
-Test_impl::get_value2 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- OBV_FactoryTest::Value2* ret_val = 0;
- ACE_NEW_RETURN (ret_val,
- Value2_impl,
- 0);
-
- return ret_val;
-}
-
-void
-Test_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/OBV/Factory/FactoryS_impl.h b/TAO/tests/OBV/Factory/FactoryS_impl.h
deleted file mode 100644
index 8a1e97a6a5a..00000000000
--- a/TAO/tests/OBV/Factory/FactoryS_impl.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/Factory
-//
-// = FILENAME
-// FactoryS_impl.h
-//
-// = AUTHOR
-// Boris Kolpackov <bosk@ipmce.ru>
-//
-// ============================================================================
-
-#ifndef TAO_FACTORY_S_IMPL_H
-#define TAO_FACTORY_S_IMPL_H
-
-#include "FactoryS.h"
-
-class Test_impl : public POA_OBV_FactoryTest::Test
-{
- // = TITLE
- // Implementation of Test interface
- //
- // = DESCRIPTION
- // This interface is provided to produce valuetypes and test
- // marshaling
- //
-public:
- Test_impl (CORBA::ORB_ptr orb);
- // ctor
-
- virtual OBV_FactoryTest::BaseValue * get_base_value (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual OBV_FactoryTest::Value1 * get_value1 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual OBV_FactoryTest::Value2 * get_value2 (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* TAO_FACTORY_S_IMPL_H */
diff --git a/TAO/tests/OBV/Factory/OBV_Factory.mpc b/TAO/tests/OBV/Factory/OBV_Factory.mpc
deleted file mode 100644
index e257b945987..00000000000
--- a/TAO/tests/OBV/Factory/OBV_Factory.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, valuetype {
- Source_Files {
- FactoryC_impl.cpp
- FactoryS_impl.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, valuetype {
- after += *Server
- Source_Files {
- FactoryC.cpp
- FactoryC_impl.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/OBV/Factory/README b/TAO/tests/OBV/Factory/README
deleted file mode 100644
index 24c5d14e509..00000000000
--- a/TAO/tests/OBV/Factory/README
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-
-@page OBV/Factory Test README File
-
- This is a very simple test to show and verify basic OBV
- factory construct functionality.
-
- To run the test either use the run_test.pl script:
-
-$ ./run_test.pl
-
- or start the client and the server manually:
-
-$ server -o ior
-$ client -k file://ior
-
-
-*/
diff --git a/TAO/tests/OBV/Factory/client.cpp b/TAO/tests/OBV/Factory/client.cpp
deleted file mode 100644
index 2b6a232470a..00000000000
--- a/TAO/tests/OBV/Factory/client.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-// $Id$
-
-#include "FactoryC.h"
-#include "FactoryC_impl.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Factory, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-bool
-no_factory (OBV_FactoryTest::Test_ptr test)
-{
- bool succeed = false;
- ACE_TRY_NEW_ENV
- {
- // Calling this without a factory registred should give a marshal
- // exception with minor code 1
- OBV_FactoryTest::BaseValue_var base_value =
- test->get_base_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::MARSHAL, ex)
- {
- if ((ex.minor() & 0xFFFU) == 1)
- {
- succeed = true;
- }
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!succeed)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) ERROR, no_factory failed\n"));
- }
-
- return succeed;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Obtain reference to the object
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- OBV_FactoryTest::Test_var test =
- OBV_FactoryTest::Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil OBV_FactoryTest::Test reference <%s>\n",
- ior),
- 1);
- }
-
- // Check if we get the correct exception with minor code because no
- // factory has been set.
- if (!no_factory (test.in ()))
- return 1;
-
- // Create factories.
- OBV_FactoryTest::BaseValue_init *base_factory = 0;
- ACE_NEW_RETURN (base_factory,
- OBV_FactoryTest::BaseValue_init,
- 1); // supplied by mapping
-
- orb->register_value_factory (base_factory->tao_repository_id (),
- base_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- base_factory->_remove_ref (); // release ownership
-
- OBV_FactoryTest::Value1_init *value1_factory = 0;
- ACE_NEW_RETURN (value1_factory,
- OBV_FactoryTest::Value1_init,
- 1); // supplied by mapping
-
- orb->register_value_factory (value1_factory->tao_repository_id (),
- value1_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value1_factory->_remove_ref ();
-
- OBV_FactoryTest::Value2_init *value2_factory = 0;
- ACE_NEW_RETURN (value2_factory,
- Value2_init_impl,
- 1); // custom implementation
-
- orb->register_value_factory (value2_factory->tao_repository_id (),
- value2_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value2_factory->_remove_ref ();
-
- // Now perform the test. I don't check return values.
- // I just hope to get MARSHAL.
- OBV_FactoryTest::BaseValue_var base_value =
- test->get_base_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- OBV_FactoryTest::Value1_var value1 =
- test->get_value1 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- OBV_FactoryTest::Value2_var value2 =
- test->get_value2 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test factories.
-
- value2 = value2_factory->create_default (1);
-
- OBV_FactoryTest::BaseValue::BV_Data data;
- data.value = 2;
-
- value2 = value2_factory->create (1, data);
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test finished\n"));
-
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Factory/run_test.pl b/TAO/tests/OBV/Factory/run_test.pl
deleted file mode 100755
index d7e953d0896..00000000000
--- a/TAO/tests/OBV/Factory/run_test.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that runs all Naming Service tests. It starts
-# all the servers and clients as necessary.
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/Factory/server.cpp b/TAO/tests/OBV/Factory/server.cpp
deleted file mode 100644
index 5f6788e57d4..00000000000
--- a/TAO/tests/OBV/Factory/server.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// $Id$
-
-#include "FactoryS_impl.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Factory, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_impl *test_impl;
- ACE_NEW_RETURN (test_impl,
- Test_impl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- OBV_FactoryTest::Test_var test =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Forward/.cvsignore b/TAO/tests/OBV/Forward/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/OBV/Forward/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/OBV/Forward/OBV_Forward.mpc b/TAO/tests/OBV/Forward/OBV_Forward.mpc
deleted file mode 100644
index ee6e2623910..00000000000
--- a/TAO/tests/OBV/Forward/OBV_Forward.mpc
+++ /dev/null
@@ -1,25 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, valuetype {
- IDL_Files {
- TreeBase.idl
- TreeController.idl
- TreeNode.idl
- }
- Source_Files {
- Test_impl.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, valuetype {
- after += *Server
- Source_Files {
- TreeBaseC.cpp
- TreeControllerC.cpp
- TreeNodeC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/OBV/Forward/README b/TAO/tests/OBV/Forward/README
deleted file mode 100644
index 4ab2e6d3fdc..00000000000
--- a/TAO/tests/OBV/Forward/README
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-
-@page OBV/Forward Test README File
-
- This is a very simple test to show and verify
- forward declaration of valuetypes.
-
- To run the test either use the run_test.pl script:
-
-$ ./run_test.pl
-
- or start the client and the server manually:
-
-$ server -o ior
-$ client -k file://ior
-
-
-*/
diff --git a/TAO/tests/OBV/Forward/Test_impl.cpp b/TAO/tests/OBV/Forward/Test_impl.cpp
deleted file mode 100644
index 2a3eb140309..00000000000
--- a/TAO/tests/OBV/Forward/Test_impl.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id$
-
-#include "Test_impl.h"
-#include "TreeBaseC.h"
-
-ACE_RCSID(Forward, Test_impl, "$Id$")
-
-Test_impl::Test_impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-
-void
-reflect_node (BaseNode* bn)
-{
- if(bn == 0) return;
-
- reflect_node (bn->left ());
- reflect_node (bn->right ());
-
- BaseNode *old_right = bn->right ();
- BaseNode *old_left = bn->left ();
-
- CORBA::add_ref (old_right);
- CORBA::add_ref (old_left);
-
- bn->right (old_left);
- bn->left (old_right);
-}
-
-TreeController *
-Test_impl::reflect (TreeController * tc
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (tc != 0)
- {
- reflect_node (tc-> root());
- tc->_add_ref ();
- }
- return tc;
-}
-
-void
-Test_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/OBV/Forward/Test_impl.h b/TAO/tests/OBV/Forward/Test_impl.h
deleted file mode 100644
index 745f255ad87..00000000000
--- a/TAO/tests/OBV/Forward/Test_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/Forward
-//
-// = FILENAME
-// Test_impl.h
-//
-// = AUTHOR
-// Boris Kolpackov <bosk@ipmce.ru>
-//
-// ============================================================================
-
-#ifndef TAO_TEST_IMPL_H
-#define TAO_TEST_IMPL_H
-
-#include "TreeControllerS.h"
-
-class Test_impl : public POA_Test
-{
- // = TITLE
- // Implementation of Test interface
- //
- // = DESCRIPTION
- // This interface is provided to produce valuetypes and test
- // marshaling
- //
-public:
- Test_impl (CORBA::ORB_ptr orb);
- // ctor
-
- virtual TreeController * reflect (
- TreeController * tc
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* TAO_TEST_IMPL_H */
diff --git a/TAO/tests/OBV/Forward/TreeBase.idl b/TAO/tests/OBV/Forward/TreeBase.idl
deleted file mode 100644
index 662c919aea5..00000000000
--- a/TAO/tests/OBV/Forward/TreeBase.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-
-// Forward declaration to make recursive construct.
-valuetype BaseNode;
-
-//@@ Dosn't work for now
-//typedef sequence<BaseNode> BaseNodeSeq;
-
-// Performance test: One may try to pass
-// over the wire a cyclic graph and measure
-// how quickly TAO evaporates memory ;-)
-
-valuetype BaseNode
-{
- //@@ TODO:
- //public BaseNodeSeq node_seq;
-
- public BaseNode left;
- public BaseNode right;
-
-};
diff --git a/TAO/tests/OBV/Forward/TreeController.idl b/TAO/tests/OBV/Forward/TreeController.idl
deleted file mode 100644
index 4a9705db918..00000000000
--- a/TAO/tests/OBV/Forward/TreeController.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-
-valuetype BaseNode;
-
-// This TreeController is probably a silly idea.
-// All I want from it is a valutype forward declared
-// in one file and fully defined in another.
-
-valuetype TreeController
-{
- public BaseNode root;
-};
-
-interface Test
-{
- // Returnes the reflected copy of its argument.
- TreeController reflect (in TreeController tc);
-
- // Shutdown the romote ORB
- oneway void shutdown ();
-};
diff --git a/TAO/tests/OBV/Forward/TreeNode.idl b/TAO/tests/OBV/Forward/TreeNode.idl
deleted file mode 100644
index 06010fd7b18..00000000000
--- a/TAO/tests/OBV/Forward/TreeNode.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-#include "TreeBase.idl"
-
-//
-// A concrete node type
-//
-valuetype StringNode : BaseNode
-{
- public string name;
-};
diff --git a/TAO/tests/OBV/Forward/client.cpp b/TAO/tests/OBV/Forward/client.cpp
deleted file mode 100644
index b61d1544147..00000000000
--- a/TAO/tests/OBV/Forward/client.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-// $Id$
-
-
-#include "TreeBaseC.h"
-#include "TreeControllerC.h"
-#include "TreeNodeC.h"
-
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Forward, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-void
-dump_node (BaseNode *bn, int indent)
-{
- if (bn == 0) return;
-
- // This is ugly I know
- int i = indent;
- for (; i != 0; i--) ACE_DEBUG ((LM_DEBUG, " "));
-
- StringNode *sn = StringNode::_downcast (bn);
- if (sn != 0)
- {
- ACE_DEBUG ((LM_DEBUG, "%x <StringNode> %s\n",
- bn,
- sn->name ()));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "%x <BaseNode> \n",
- bn));
- }
-
- dump_node (bn->left (), indent + 1);
- dump_node (bn->right (), indent + 1);
-}
-
-void
-dump_tree (TreeController *tc)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) start tree dump <%x>\n",
- tc));
-
- dump_node (tc->root (), 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) end tree dump <%x>\n",
- tc));
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // All factories are kindly provided by
- // compiler so we just to put everything in a right order.
-
- // Create and register factory for BaseNode.
- BaseNode_init *bn_factory = 0;
- ACE_NEW_RETURN (bn_factory,
- BaseNode_init,
- 1);
-
- orb->register_value_factory (bn_factory->tao_repository_id (),
- bn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- bn_factory->_remove_ref (); // release ownership
-
- // Create and register factory for TreeController.
- TreeController_init *tc_factory = 0;
- ACE_NEW_RETURN (tc_factory,
- TreeController_init,
- 1);
-
- orb->register_value_factory (tc_factory->tao_repository_id (),
- tc_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- tc_factory->_remove_ref (); // release ownership
-
- // Create and register factory for StringNode.
- StringNode_init *sn_factory = 0;
- ACE_NEW_RETURN (sn_factory,
- StringNode_init,
- 1);
-
- orb->register_value_factory (sn_factory->tao_repository_id (),
- sn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- sn_factory->_remove_ref (); // release ownership
-
- //Well, done with factories.
-
- // Obtain reference to the object.
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var test = Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test reference <%s>\n",
- ior),
- 1);
- }
-
- // Now build simple graph (tree in our case).
-
- TreeController_var tc;
- ACE_NEW_RETURN (tc.inout (),
- OBV_TreeController,
- 1);
-
- // Create the root node.
- {
- StringNode_var sn;
- ACE_NEW_RETURN (sn.inout (),
- OBV_StringNode,
- 1);
- sn->name ((const char*)("RootNode"));
- tc->root (sn);
-
- // Create the left leaf.
- {
- StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
- OBV_StringNode,
- 1);
- dummy->name ((const char*)("LeftNode"));
- sn->left (dummy);
- }
-
- // Create the right leaf.
- {
- StringNode_var dummy;
- ACE_NEW_RETURN (dummy.inout (),
- OBV_StringNode,
- 1);
- dummy->name ((const char*)("RightNode"));
- sn->right (dummy);
-
- // dummy->right (sn); // ;-)
- }
- }
-
- // Dump the tree.
- dump_tree (tc.in ());
-
- TreeController_var result_tc =
- test->reflect (tc.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Dump the resulting tree.
- dump_tree (result_tc.in ());
-
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test finished\n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Forward/run_test.pl b/TAO/tests/OBV/Forward/run_test.pl
deleted file mode 100755
index 4424f402e68..00000000000
--- a/TAO/tests/OBV/Forward/run_test.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/Forward/server.cpp b/TAO/tests/OBV/Forward/server.cpp
deleted file mode 100644
index bf17c26cc87..00000000000
--- a/TAO/tests/OBV/Forward/server.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// $Id$
-
-#include "TreeBaseC.h"
-#include "TreeControllerC.h"
-#include "TreeNodeC.h"
-#include "Test_impl.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Forward, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // All factories are kindly provided by
- // compiler so we just to put everything in a right order.
-
- // Create and register factory for BaseNode.
- BaseNode_init *bn_factory = 0;
- ACE_NEW_RETURN (bn_factory,
- BaseNode_init,
- 1);
-
- orb->register_value_factory (bn_factory->tao_repository_id (),
- bn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- bn_factory->_remove_ref (); // release ownership
-
- // Create and register factory for TreeController.
- TreeController_init *tc_factory = 0;
- ACE_NEW_RETURN (tc_factory,
- TreeController_init,
- 1);
-
- orb->register_value_factory (tc_factory->tao_repository_id (),
- tc_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- tc_factory->_remove_ref (); // release ownership
-
- // Create and register factory for StringNode.
- StringNode_init *sn_factory = 0;
- ACE_NEW_RETURN (sn_factory,
- StringNode_init,
- 1);
-
- orb->register_value_factory (sn_factory->tao_repository_id (),
- sn_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- sn_factory->_remove_ref (); // release ownership
-
- //Well, done with factories.
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_impl *test_impl;
- ACE_NEW_RETURN (test_impl,
- Test_impl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- Test_var test = test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/README b/TAO/tests/OBV/README
deleted file mode 100644
index a6796ec644d..00000000000
--- a/TAO/tests/OBV/README
+++ /dev/null
@@ -1,17 +0,0 @@
-// $Id$
-
-The following TAO applications test and illustate various Object
-By Value (OBV or valuetypes) functionality and their usage scenarios.
-
- . Any
-
- The example tests and shows insertion/extraction/passing
- of valuetypes inside CORBA Any type.
-
- . Factory
-
- The example tests OBV factory construct.
-
- . Forward
-
- The example tests forward declared valuetypes. \ No newline at end of file
diff --git a/TAO/tests/OBV/Simple/Client_i.cpp b/TAO/tests/OBV/Simple/Client_i.cpp
deleted file mode 100644
index c3548daf462..00000000000
--- a/TAO/tests/OBV/Simple/Client_i.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//$Id$
-
-#include "Client_i.h"
-#include "OBV_impl.h"
-
-#include "tao/ORB_Core.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_sys_time.h"
-
-int
-Checkpoint_Client_i::run (const char *name,
- int argc,
- char *argv[])
-{
- // Initialize the client (read ior...).
- if (checkpoint.init (name,argc, argv) == -1)
- return -1;
-
- // Set random seed
- ACE_Time_Value now (ACE_OS::gettimeofday ());
- ACE_OS::srand ((unsigned int) now.sec () );
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- ACE_DEBUG ((LM_DEBUG, "Send some random events:\n"));
-
- CORBA::Long value = 64;
- Event_var t_e (static_cast<Event*> (new Event_impl (value)));
- t_e->do_print ();
- checkpoint->put_event (t_e ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- value = 34;
- t_e = new Event_impl (value);
- t_e->do_print ();
- checkpoint->put_event (t_e ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (checkpoint.shutdown () == 1)
- checkpoint->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"\n Exception in RMI");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-// Constructor.
-Checkpoint_Client_i::Checkpoint_Client_i (void)
-{
- //no-op
-}
-
-//Destructor.
-Checkpoint_Client_i::~Checkpoint_Client_i (void)
-{
- //no-op
-}
-
diff --git a/TAO/tests/OBV/Simple/Client_i.h b/TAO/tests/OBV/Simple/Client_i.h
deleted file mode 100644
index 5c705839530..00000000000
--- a/TAO/tests/OBV/Simple/Client_i.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/examples/OBV/Typed_Events
-//
-// = FILENAME
-// Client_i.h
-//
-// = DESCRIPTION
-// This class is a template for a CORBA client.
-// run () sends some valuetypes to a server and
-// gets back a list of valuetypes.
-//
-// = AUTHOR
-//
-// Torsten Kuepper
-// based on the echo example
-// from code from Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ECHO_CLIENT_I_H
-#define ECHO_CLIENT_I_H
-
-#include "OBVC.h"
-#include "Simple_util.h"
-
-class Checkpoint_Client_i
-{
- // = TITLE
- // Checkpoint_Client interface subclass.
- //
- // = DESCRIPTION
- // This class implements the interface between the interface
- // objects and the client .
-public:
- // = Initialization and termination methods.
- Checkpoint_Client_i (void);
- // Constructor
-
- virtual ~Checkpoint_Client_i (void);
- // Destructor
-
- virtual int run (const char *,int, char** );
- // Execute the methods
-
-private:
- Client<Checkpoint, Checkpoint_var> checkpoint;
- // Instantiate the checkpoint object.
-};
-
-
-#endif /* TIME_CLIENT_I_H */
diff --git a/TAO/tests/OBV/Simple/OBV.idl b/TAO/tests/OBV/Simple/OBV.idl
deleted file mode 100644
index f909dc25975..00000000000
--- a/TAO/tests/OBV/Simple/OBV.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-// $Id$
-
-valuetype Event
-{
- void do_print ();
- public long value_;
-};
-
-interface Checkpoint
-{
- void put_event (in Event e);
- // This operation will shutdown the server.
- oneway void shutdown ();
-};
-
-
diff --git a/TAO/tests/OBV/Simple/OBV_Simple.mpc b/TAO/tests/OBV/Simple/OBV_Simple.mpc
deleted file mode 100644
index f8c08720d20..00000000000
--- a/TAO/tests/OBV/Simple/OBV_Simple.mpc
+++ /dev/null
@@ -1,37 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*IDL): taoidldefaults {
- IDL_Files {
- OBV.idl
- }
- custom_only = 1
-}
-
-project(*server): taoserver, utils, valuetype {
- exename = server
- after += *IDL
- Source_Files {
- Server_i.cpp
- OBV_impl.cpp
- server.cpp
- OBVS.cpp
- OBVC.cpp
- }
- IDL_Files {
- }
-}
-
-project(*client): taoserver, utils, valuetype {
- exename = client
- after += *IDL
- Source_Files {
- Client_i.cpp
- OBV_impl.cpp
- client.cpp
- OBVS.cpp
- OBVC.cpp
- }
- IDL_Files {
- }
-}
diff --git a/TAO/tests/OBV/Simple/OBV_impl.cpp b/TAO/tests/OBV/Simple/OBV_impl.cpp
deleted file mode 100644
index f55cee0af44..00000000000
--- a/TAO/tests/OBV/Simple/OBV_impl.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-#include "OBV_impl.h"
-#include "ace/OS_NS_sys_time.h"
-
-// Implementation of the valuetype member functions.
-
-Event_impl::Event_impl ()
-{
-}
-
-Event_impl::Event_impl (CORBA::Long value)
-{
- this->value_ (value);
-}
-
-Event_impl::~Event_impl ()
-{
-}
-
-CORBA::ValueBase*
-Event_impl::_copy_value (void)
-{
- return new Event_impl (this->value_ ());
-}
-
-
-void
-Event_impl::do_print (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG((LM_DEBUG, "(value %d) \n",
- (CORBA::ULong) this->value_()));
-}
-
-Event_factory::~Event_factory ()
-{
-}
-
-TAO_OBV_CREATE_RETURN_TYPE (Event)
-Event_factory::create_for_unmarshal (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return new Event_impl;
-}
-
diff --git a/TAO/tests/OBV/Simple/OBV_impl.h b/TAO/tests/OBV/Simple/OBV_impl.h
deleted file mode 100644
index 1b619553402..00000000000
--- a/TAO/tests/OBV/Simple/OBV_impl.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-#if !defined (OBV_IMPL_H)
-#define OBV_IMPL_H
-
-#include "OBVC.h"
-
-#include "tao/Valuetype/ValueFactory.h"
-
-class Event_impl : public virtual OBV_Event,
- public virtual CORBA::DefaultValueRefCountBase
-{
- public:
- Event_impl ();
- Event_impl (CORBA::Long value);
- virtual ~Event_impl ();
- virtual CORBA::ValueBase* _copy_value (void);
-
-
- virtual void do_print (ACE_ENV_SINGLE_ARG_DECL);
-};
-
-class Event_factory : public CORBA::ValueFactoryBase
-{
-public:
-
- // create (...) would go here
-
-protected:
-
- virtual ~Event_factory ();
-
-private:
-
- TAO_OBV_CREATE_RETURN_TYPE (Event) create_for_unmarshal (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-};
-
-#endif /* OBV_IMPL_H */
diff --git a/TAO/tests/OBV/Simple/Server_i.cpp b/TAO/tests/OBV/Simple/Server_i.cpp
deleted file mode 100644
index a429ce1bc3a..00000000000
--- a/TAO/tests/OBV/Simple/Server_i.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-#include "Server_i.h"
-#include "OBV_impl.h"
-#include "tao/ORB_Core.h"
-
-// Set the ORB pointer, register OBV factories and init the
-// lists declared above.
-
-void
-Checkpoint_i::orb (CORBA::ORB_ptr o)
-{
- this->orb_ = CORBA::ORB::_duplicate (o);
-
- TAO_OBV_REGISTER_FACTORY (Event_factory, Event);
-}
-
-
-// Sidebar on assignment from pointer to _var type.
-//
-// Event_var e_var (event);
-// This is fatal because the reference counter in *event is not increased
-// when a pointer is assigned to a _var. (This happens only
-// in assignments from another Event_var;
-// But Assignment from new is fine, the referencecount is yet one.)
-//
-// ok is
-// CORBA::add_ref (event);
-// Event_var e_var (event);
-//
-// but possibly easier to read it a macro
-#define DUP_REF(vt_ptr) (CORBA::add_ref (vt_ptr), vt_ptr)
-// then it reads: Event_var e_var (DUP_REF (event));
-// (But it may cause desaster if vt_ptr is a function call.)
-//
-// Be careful with assignments from T1_var to T2_var, if T1 and T2 are
-// related through inheritance. Because there are many implicit casts
-// between pointer and _var types possible, the reference counter of
-// the duplicated reference is not increased.
-//
-// Is there any general solution with faulty reference counting ?
-
-
-void
-Checkpoint_i::put_event (Event *event
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Let us see what event has arrived
- event->do_print ();
-
- return;
-}
-
-// Shutdown the server application.
-
-void
-Checkpoint_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n%s\n",
- "The Checkpoint server is shutting down"));
-
- // Instruct the ORB to shutdown.
- this->orb_->shutdown ();
-}
-
-
-// Constructor.
-
-Checkpoint_i::Checkpoint_i (void)
-{
-}
-
-// Destructor.
-
-Checkpoint_i::~Checkpoint_i (void)
-{
-}
diff --git a/TAO/tests/OBV/Simple/Server_i.h b/TAO/tests/OBV/Simple/Server_i.h
deleted file mode 100644
index c1a026c25e2..00000000000
--- a/TAO/tests/OBV/Simple/Server_i.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/Typed_Events
-//
-// = FILENAME
-// Server_i.h
-//
-// = DESCRIPTION
-// This class implements the Event_Types IDL interface.
-//
-// = AUTHOR
-// Torsten Kuepper
-// derived from the Echo example TAO/example/Simple/echo
-// of Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ECHO_I_H
-#define ECHO_I_H
-
-#include "OBVS.h"
-
-
-class Checkpoint_i : public POA_Checkpoint
-{
-public:
- // = Initialization and termination methods.
- Checkpoint_i (void);
- // Constructor.
-
- ~Checkpoint_i (void);
- // Destructor.
-
- virtual void put_event (
- Event * e
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- void orb (CORBA::ORB_ptr o);
- // Set the ORB pointer.
-
-private:
- CORBA::ORB_var orb_;
- // ORB pointer.
-};
-
-#endif /* ECHO_I_H */
-
diff --git a/TAO/tests/OBV/Simple/Simple_util.cpp b/TAO/tests/OBV/Simple/Simple_util.cpp
deleted file mode 100644
index 979bc54cc79..00000000000
--- a/TAO/tests/OBV/Simple/Simple_util.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-// $Id$
-
-// This version of Simple_Util doesn't need to link against orbsvcs
-// On the other hand it has no naming service.
-
-#ifndef SIMPLE_UTIL_C
-#define SIMPLE_UTIL_C
-# include "Simple_util.h"
-# include "tao/debug.h"
-# include "ace/OS_NS_stdio.h"
-# include "ace/OS_NS_fcntl.h"
-# include "ace/OS_NS_unistd.h"
-# include "ace/OS_NS_string.h"
-
-// Constructor.
-
-template <class Servant>
-Server<Servant>::Server (void)
- : ior_output_file_ (0)
-{
- // no-op.
-}
-
-// Destructor.
-
-template <class Servant>
-Server<Servant>::~Server (void)
-{
-}
-
-// Parse the command-line arguments and set options.
-
-template <class Servant> int
-Server<Servant>::parse_args (void)
-{
- ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:ni:");
- int c = 0;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
- if (this->ior_output_file_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- get_opts.opt_arg ()), -1);
- break;
-
- case '?': // display help for use of the server.
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-o] <ior_output_file>"
- "\n",
- argv_ [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-// Initialize the server.
-template <class Servant> int
-Server<Servant>::init (const char *servant_name,
- int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
-{
- // Call the init of <TAO_ORB_Manager> to initialize the ORB and
- // create a child POA under the root POA.
- if (this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "init_child_poa"),
- -1);
-
- ACE_CHECK_RETURN (-1);
-
- this->argc_ = argc;
- this->argv_ = argv;
-
- int retval = this->parse_args ();
-
- if (retval != 0)
- return retval;
-
- CORBA::ORB_var orb = this->orb_manager_.orb ();
-
- // Stash our ORB pointer for later reference.
- this->servant_.orb (orb.in ());
-
- // Activate the servant in its own child POA.
-
- // Make sure that you check for failures here via the ACE_TRY
- // macros?!
- ACE_TRY
- {
- CORBA::String_var str =
- this->orb_manager_.activate_under_child_poa (servant_name,
- &this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "The IOR is: <%s>\n",
- str.in ()));
-
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- str.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in activation of POA");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-template <class Servant>int
-Server<Servant>::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Run the main event loop for the ORB.
- if (this->orb_manager_.run (ACE_ENV_SINGLE_ARG_PARAMETER) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Server_i::run"),
- -1);
-
- return 0;
-}
-
-template <class Servant> int
-Server<Servant>::register_name (void)
-{
- return -1;
-}
-
-// Constructor.
-
-template <class InterfaceObj, class Var>
-Client<InterfaceObj, Var>::Client (void)
- : ior_ (0)
-{
- //no-op
-}
-
-// Reads the Server ior from a file
-
-template <class InterfaceObj, class Var> int
-Client<InterfaceObj, Var>::read_ior (char *filename)
-{
- // Open the file for reading.
- ACE_HANDLE f_handle = ACE_OS::open (filename, 0);
-
- if (f_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- filename),
- -1);
-
- ACE_Read_Buffer ior_buffer (f_handle);
- char *data = ior_buffer.read ();
-
- if (data == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior: %p\n"),
- -1);
-
- this->ior_ = ACE_OS::strdup (data);
- ior_buffer.alloc ()->free (data);
-
- ACE_OS::close (f_handle);
-
- return 0;
-}
-
-// Parses the command line arguments and returns an error status.
-
-template <class InterfaceObj, class Var> int
-Client<InterfaceObj, Var>::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "df:nk:x");
- int c = 0;
- int result = 0;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag
- TAO_debug_level++;
- break;
- case 'k': // ior provide on command line
- this->ior_ = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case 'f': // read the IOR from the file.
- result = this->read_ior (get_opts.opt_arg ());
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.opt_arg ()),
- -1);
- break;
- case 'x': // read the flag for shutting down
- this->shutdown_ = 1;
- break;
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-template <class InterfaceObj, class Var>
-Client<InterfaceObj, Var>::~Client (void)
-{
- ACE_OS::free (this->ior_);
-}
-
-template <class InterfaceObj, class Var> int
-Client<InterfaceObj, Var>::init (const char *name,
- int argc,
- char **argv)
-{
- this->argc_ = argc;
- this->argv_ = argv;
-
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Retrieve the ORB.
- this->orb_ = CORBA::ORB_init (this->argc_,
- this->argv_,
- name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse command line and verify parameters.
- if (this->parse_args () == -1)
- return -1;
-
-
-
- if(this->ior_ != 0)
- {
- CORBA::Object_var server_object =
- this->orb_->string_to_object (this->ior_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- if (CORBA::is_nil (server_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "invalid ior <%s>\n",
- this->ior_),
- -1);
- this->server_ = InterfaceObj::_narrow (server_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "no ior or naming options specified\n"),
- -1);
-
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Client_i::init");
- return -1;
- }
- ACE_ENDTRY;
-
-
- return 0;
-}
-
-
-template <class InterfaceObj, class Var> int
-Client<InterfaceObj, Var>::obtain_initial_references (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
-
- return 0;
-}
-
-template <class InterfaceObj, class Var> int
-Client<InterfaceObj, Var>::shutdown (void )
-{
- // Returns the shutdwon flag
- return shutdown_;
-}
-
-template <class InterfaceObj, class Var> void
-Client<InterfaceObj, Var>::shutdown (int flag)
-{
- // Fills the flag
- shutdown_ = flag;
-}
-
-#endif
diff --git a/TAO/tests/OBV/Simple/Simple_util.h b/TAO/tests/OBV/Simple/Simple_util.h
deleted file mode 100644
index 380dc749dc6..00000000000
--- a/TAO/tests/OBV/Simple/Simple_util.h
+++ /dev/null
@@ -1,170 +0,0 @@
-//$Id$
-
-// This version of Simple_Util doesn't need to link against orbsvcs
-// On the other hand it has no naming service.
-
-// ============================================================================
-//
-// = LIBRARY
-//
-// taken from TAO/tests/Simple
-//
-// = FILENAME
-// Simple_Util.h
-//
-// = DESCRIPTION
-// The classe define the templates for the client and server.
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_UTIL_H
-#define TAO_UTIL_H
-
-#include "tao/Utils/ORB_Manager.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-
-template <class Servant>
-class Server
-{
- // = TITLE
- // A set of useful class Templates for using the TAO CORBA
- // implementation.
- //
- // = DESCRIPTION
- // A template server definition. This template can be used by
- // single server/client projects for defintion of their
- // server/clients. See the directories time, bank, echo for
- // further details of implemenatation.
-public:
- // = Initialization and termination methods.
-
- Server (void);
- // Constructor.
-
- ~Server (void);
- // Destructor.
-
- int init (const char *servant_name,
- int argc,
- char *argv[]
- ACE_ENV_ARG_DECL);
- // Initialize the Server state - parsing arguments and waiting.
- // interface_name is the name used to register the Servant.
-
- int register_name (void);
- // After calling <init>, this method will register the server with
- // the TAO Naming Service using the servant_name passed to <init>.
-
- int run (ACE_ENV_SINGLE_ARG_DECL);
- // Run the orb.
-
-protected:
- Servant servant_;
- // Servant class
-
- const char *name;
- // name of the servant to be used for TAO Naming Service
-
- int parse_args (void);
- // Parses the commandline arguments.
-
- TAO_ORB_Manager orb_manager_;
- // The ORB manager - a helper class for accessing the POA and
- // registering objects.
-
- // TAO_Naming_Server namingServer;
- // helper class for getting access to Naming Service.
-
- FILE *ior_output_file_;
- // File where the IOR of the server object is stored.
-
- int argc_;
- // Number of command line arguments.
-
- char **argv_;
- // The command line arguments.
-};
-
-template <class InterfaceObj, class Var>
-class Client
-{
- // = TITLE
- // Template Client class
- //
- // = DESCRIPTION
- // A template client implementation for a single server/client
- // model. The example usage of these usage can be found in the
- // sub-directories below
-public:
-
- // = Initialization and termination methods.
- Client (void);
- // Constructor.
-
- ~Client (void);
- // Destructor.
-
- int init (const char *name,int argc, char *argv[]);
- // Initialize the client communication endpoint with server.
-
- InterfaceObj *operator-> () { return server_.in ();};
- // Return the interface object pointer.
-
- int shutdown (void );
- // Returns the shutdown flag.
-
- void shutdown (int);
- // Fills in the shutdwon flag.
-
- int obtain_initial_references (ACE_ENV_SINGLE_ARG_DECL);
- // Initialize naming service
-
-protected:
- int read_ior (char *filename);
- // Function to read the server IOR from a file.
-
- int parse_args (void);
- // Parses the arguments passed on the command line.
-
-// TAO_Naming_Client namingClient;
- // helper class for getting access to Naming Service.
-
- int argc_;
- // # of arguments on the command line.
-
- char **argv_;
- // arguments from command line.
-
- char *ior_;
- // IOR of the obj ref of the server.
-
- char *name_;
- // Name to be usred for the naming service
-
- CORBA::ORB_var orb_;
- // Remember our orb.
-
- Var server_;
- // Server object
-
- int naming_;
- // Flag to use the naming service
-
- int shutdown_;
- // Flag for shutting down the server
-
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Simple_util.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Simple_util.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* TAO_UTIL_H */
diff --git a/TAO/tests/OBV/Simple/client.cpp b/TAO/tests/OBV/Simple/client.cpp
deleted file mode 100644
index d4e502a26bd..00000000000
--- a/TAO/tests/OBV/Simple/client.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//$Id$
-
-# include "Client_i.h"
-
-// The client program for the application.
-
-int
-main (int argc, char **argv)
-{
- Checkpoint_Client_i client;
-
-
- ACE_DEBUG ((LM_DEBUG,
- "\nEvent_Types client\n\n"));
-
- if (client.run ("Event_Types_Checkpoint",
- argc,
- argv) == -1)
- return -1;
- else
- return 0;
-
-}
diff --git a/TAO/tests/OBV/Simple/run_test.pl b/TAO/tests/OBV/Simple/run_test.pl
deleted file mode 100755
index 3a125c5703c..00000000000
--- a/TAO/tests/OBV/Simple/run_test.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../../bin";
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("obv.ior");
-
-unlink $iorfile;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", "-f $iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: timed out waiting for file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: the client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/Simple/server.cpp b/TAO/tests/OBV/Simple/server.cpp
deleted file mode 100644
index c5f5140f307..00000000000
--- a/TAO/tests/OBV/Simple/server.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-#include "Simple_util.h"
-#include "Server_i.h"
-
-// This is the main driver program for the time and date server.
-
-int
-main (int argc, char *argv[])
-{
- Server<Checkpoint_i> server;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n\tCheckpoint Event_Types server\n\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- if (server.init ("Event_Types_Checkpoint",
- argc,
- argv
- ACE_ENV_ARG_PARAMETER) == -1)
- return 1;
- else
- {
- server.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
diff --git a/TAO/tests/OBV/Supports/README b/TAO/tests/OBV/Supports/README
deleted file mode 100644
index e708dff9ed8..00000000000
--- a/TAO/tests/OBV/Supports/README
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-The Supports_Test example tests the ability of valuetypes to support concrete
-interfaces. Valuetypes are manipulated both as normal valuetypes and as object
-references.
-
-Since operations of a supported interface are mapped to pure virtual methods in
-the valuetype (and are not inherited), an application using this feature should
-probably not define an implementation of the interface. Doing so will result in
-multiple implementations of the same method - one for objects of the interface,
-and one for valuetypes - and clients will have no way to distiguish between the
-two, other than narrowing objects of the interface type to the
-valuetype. Instead, one can leave the interface unimplemented, and only define
-implementations of its methods in the valuetype.
-
-The steps are as follows:
-
-1. Activate a POA in which the valuetype will reside and create the valuetype.
-2. Call the valuetype's "_this ()" method, which is inherited from the skeleton
- class of the supported interface. This will return an active object reference
- to an object that is the type of the supported interface.
-3. This object reference can be passed as a parameter and supports remote
- operation invokations.
-
-Supports_Test checks proper operation of the following features:
--Valuetypes that support concrete interfaces:
- Using the same valuetype implementation, Supports_Test creates both
- valuetypes and object references, passes them as parameters, and
- invokes both local and remote calls.
--ORB::register_value_factory () return values:
- Supports_Test checks the return values of register_value_factory () to
- ensure compliance with the spec.
diff --git a/TAO/tests/OBV/Supports/Supports_Test.idl b/TAO/tests/OBV/Supports/Supports_Test.idl
deleted file mode 100644
index 4085c5db6a1..00000000000
--- a/TAO/tests/OBV/Supports/Supports_Test.idl
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-///////////////////////////////////////////////////////////////////////////////
-/**
- * \file Supports_Test.idl
- *
- * \author George Edwards <g.edwards@vanderbilt.edu>
- *
- * This file contain definitions of the valuetypes and interfaces of
- * Supports_Test, a test of TAO's OBV capabilities. Specifically, Supports_Test
- * checks proper operation of the following features:
- *
- * -Valuetypes that support concrete interfaces:
- * Using the same valuetype implementation, Supports_Test creates both
- * valuetypes and object references, passes them as parameters, and
- * invokes both local and remote calls.
- * -ORB::register_value_factory () return values:
- * Supports_Test checks the return values of register_value_factory () to
- * ensure compliance with the spec.
- */
-///////////////////////////////////////////////////////////////////////////////
-
-module Supports_Test
-{
-
- valuetype Node;
-
- typedef sequence<Node> Node_List;
-
- /**
- *
- * This valuetype is the basic building block of the vt_graph valuetype,
- * defined below. Some of these operations and state members are not
- * currently used in the test.
- */
- valuetype Node
- {
-
- void print ();
-
- public string name_;
- private long weight_;
- private short degree_;
- private Node_List neighbors_;
-
- void change_weight (in long new_weight);
- void add_edge (in Node neighbor);
- void remove_edge (in Node neighbor);
-
- factory create ();
-
- };
-
- /**
- * \interface graph
- *
- * This interface contains the operations we will invoke on vt_graph
- * valuetypes as well as graph object references. The implementations of
- * these operations will be defined in vt_graph. All graph object refs will
- * be vt_graphs under the hood.
- */
- interface graph
- {
-
- long size ();
- void add_node (in string name);
- void print ();
-
- };
-
- valuetype vt_graph supports graph
- {
-
- private Node_List nodes_;
- factory create ();
-
- };
-
- /**
- * \interface test
- *
- * This interface contains the operations that will perform the tests.
- */
- interface test
- {
-
- void pass_vt_graph_in (in vt_graph vt_graph_param);
- void pass_obj_graph_in (in graph graph_param);
- void pass_vt_graph_out (out vt_graph vt_graph_param);
- void pass_obj_graph_out (out graph graph_param);
- void pass_vt_graph_inout (inout vt_graph vt_graph_param);
- void pass_obj_graph_inout (inout graph graph_param);
- void start ();
- oneway void finish ();
-
- };
-
-};
diff --git a/TAO/tests/OBV/Supports/Supports_Test.mpc b/TAO/tests/OBV/Supports/Supports_Test.mpc
deleted file mode 100644
index 7d9df51c0b7..00000000000
--- a/TAO/tests/OBV/Supports/Supports_Test.mpc
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-project(*Server): taoserver, valuetype, strategies {
- // This is just a dummy_label to prevent the test from being compiled
- // in MPC builds
- requires += dummy_label
- Source_Files {
- server.cpp
- Supports_Test_impl.cpp
- Supports_TestC.cpp
- Supports_TestS.cpp
- }
- Header_Files {
- Supports_Test_impl.h
- Supports_TestC.h
- Supports_TestS.h
- }
-}
-
-project(*Client): taoclient, taoserver, valuetype {
- exename = client
- after += *Server
- // This is just a dummy_label to prevent the test from being compiled
- // in MPC builds
- requires += dummy_label
- Source_Files {
- client.cpp
- Supports_Test_impl.cpp
- Supports_TestC.cpp
- Supports_TestS.cpp
- }
-}
diff --git a/TAO/tests/OBV/Supports/Supports_Test_impl.cpp b/TAO/tests/OBV/Supports/Supports_Test_impl.cpp
deleted file mode 100644
index eeccce8dc1d..00000000000
--- a/TAO/tests/OBV/Supports/Supports_Test_impl.cpp
+++ /dev/null
@@ -1,292 +0,0 @@
-// $Id$
-// FUZZ: disable check_for_streams_include
-
-#include "Supports_Test_impl.h"
-
-#include "ace/streams.h"
-
-/* vt_graph_impl */
-
-vt_graph_impl::vt_graph_impl (void)
-{
-}
-
-// Creates a vt_graph_impl with the given number of nodes. There will be one
-// root node and the rest will be children of it.
-vt_graph_impl::vt_graph_impl (int num_nodes ACE_ENV_ARG_DECL)
-{
- nodes_ ().length (0);
- add_node ("ROOT" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- for (int i = 1; i < num_nodes; i++)
- {
- add_node ("CHILD" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- nodes_ ()[0]->add_edge (nodes_ ()[i] ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-// Get the number of nodes in the vt_graph.
-CORBA::Long vt_graph_impl::size (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return nodes_ ().length ();
-}
-
-// Add a node to the graph with no edges.
-void
-vt_graph_impl::add_node (const char * name ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Supports_Test::Node * new_node = 0;
- ACE_NEW (new_node, node_impl (name));
- nodes_ ().length (nodes_ ().length () + 1);
- nodes_ ()[nodes_ ().length () - 1] = new_node;
-}
-
-// Print out information about each node.
-void
-vt_graph_impl::print (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Printing graph data... \n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Number of nodes: [%d] \n", nodes_ ().length ()));
-
- for (size_t i = 0; i < nodes_ ().length (); i++)
- nodes_ ()[i]->print ();
-}
-
-
-/* vt_graph_init_impl - factory operations */
-
-Supports_Test::vt_graph *
-vt_graph_init_impl::create (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- vt_graph_impl * ret_val = 0;
- ACE_NEW_RETURN (ret_val, vt_graph_impl, 0);
- return ret_val;
-}
-
-CORBA::ValueBase *
-vt_graph_init_impl::create_for_unmarshal (void)
-{
- vt_graph_impl * ret_val = 0;
- ACE_NEW_RETURN (ret_val, vt_graph_impl, 0);
- return ret_val;
-}
-
-
-/* test_impl */
-
-test_impl::test_impl (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-test_impl::~test_impl (void)
-{
- this->orb_->shutdown (0);
-}
-
-void
-test_impl::pass_obj_graph_in (
- Supports_Test::graph * graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
-{
- ACE_ASSERT (graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 3);
- ACE_CHECK;
- graph_param->add_node ("NEW1" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ACE_ASSERT (graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 4);
- ACE_CHECK;
-}
-
-void
-test_impl::pass_vt_graph_in (
- Supports_Test::vt_graph * vt_graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
-{
- ACE_ASSERT (vt_graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 3);
- ACE_CHECK;
- vt_graph_param->add_node ("NEW1" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ACE_ASSERT (vt_graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 4);
- ACE_CHECK;
-}
-
-void
-test_impl::pass_obj_graph_out (
- Supports_Test::graph_out graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
-{
- vt_graph_impl * the_vt_graph = 0;
- ACE_NEW (the_vt_graph, vt_graph_impl (4 ACE_ENV_ARG_PARAMETER));
- ACE_CHECK;
- graph_param = the_vt_graph->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 4);
- ACE_CHECK;
- graph_param->add_node ("NEW1" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ACE_ASSERT (graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 5);
- ACE_CHECK;
-}
-
-void
-test_impl::pass_vt_graph_out (
- Supports_Test::vt_graph_out vt_graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
-{
-
- vt_graph_impl * the_vt_graph = 0;
- ACE_NEW (the_vt_graph, vt_graph_impl (4 ACE_ENV_ARG_PARAMETER));
- ACE_CHECK;
- vt_graph_param = the_vt_graph;
-
- ACE_ASSERT (vt_graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 4);
- ACE_CHECK;
- vt_graph_param->add_node ("NEW1" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ACE_ASSERT (vt_graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 5);
- ACE_CHECK;
-
-}
-
-void
-test_impl::pass_obj_graph_inout (
- Supports_Test::graph * &graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
-{
-
- ACE_ASSERT (graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 6);
- ACE_CHECK;
- graph_param->add_node ("NEW3" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ACE_ASSERT (graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 7);
- ACE_CHECK;
-}
-
-void
-test_impl::pass_vt_graph_inout (
- Supports_Test::vt_graph * &vt_graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
-{
-
- ACE_ASSERT (vt_graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 6);
- ACE_CHECK;
- vt_graph_param->add_node ("NEW3" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- ACE_ASSERT (vt_graph_param->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 7);
- ACE_CHECK;
-
-}
-
-void
-test_impl::start (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-test_impl::finish (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-/* node_impl */
-
-node_impl::node_impl (void)
-{
-}
-
-// Initialize state.
-node_impl::node_impl (const char * name)
-{
- name_ (name);
- weight_ (0);
- degree_ (0);
- neighbors_ ().length (0);
-}
-
-// Add an edge from this node to neighbor.
-void
-node_impl::add_edge (Supports_Test::Node * neighbor ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- degree_ (degree_ () + 1);
- neighbors_ ().length (neighbors_ ().length () + 1);
- neighbors_ ()[neighbors_ ().length () - 1] = neighbor;
- neighbor->_add_ref ();
- return;
-}
-
-// Remove the edge from this node to neighbor.
-void
-node_impl::remove_edge (Supports_Test::Node * neighbor ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- for (unsigned int i = 0; i < neighbors_ ().length (); i++)
- if (neighbors_ ()[i] == neighbor)
- {
- neighbors_ ()[i] = neighbors_ ()[neighbors_ ().length () - 1];
- neighbors_ ().length (neighbors_ ().length () - 1);
- neighbor->_remove_ref ();
- }
-}
-
-void
-node_impl::change_weight (CORBA::Long new_weight ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- weight_ (new_weight);
-}
-
-void
-node_impl::print (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- cout << " Name: " << name_ () << endl;
- cout << " Weight: " << weight_ () << endl;
- cout << " Degree: " << degree_ () << endl;
- cout << " Neighbors: " << endl;
- for (size_t i = 0; i < neighbors_ ().length (); i++)
- cout << " " << neighbors_ ()[i]->name_ () << endl;
-}
-
-/* node_init_impl - factory operations */
-
-Supports_Test::Node *
-node_init_impl::create (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- node_impl * ret_val = 0;
- ACE_NEW_RETURN (ret_val, node_impl, 0);
- return ret_val;
-}
-
-CORBA::ValueBase *
-node_init_impl::create_for_unmarshal (void)
-{
- node_impl * ret_val = 0;
- ACE_NEW_RETURN (ret_val, node_impl, 0);
- return ret_val;
-}
diff --git a/TAO/tests/OBV/Supports/Supports_Test_impl.h b/TAO/tests/OBV/Supports/Supports_Test_impl.h
deleted file mode 100644
index 9d0932b1d87..00000000000
--- a/TAO/tests/OBV/Supports/Supports_Test_impl.h
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#ifndef TAO_SUPPORTS_TEST_IMPL_H
-#define TAO_SUPPORTS_TEST_IMPL_H
-
-#include "Supports_TestS.h"
-#include "ace/Get_Opt.h"
-
-/**
- * \class node_impl
- *
- *
- */
-class node_impl :
- public virtual OBV_Supports_Test::Node,
- public virtual CORBA::DefaultValueRefCountBase
-{
-
-public:
-
- node_impl (void);
-
- node_impl (const char * name);
-
- virtual void add_edge (Supports_Test::Node * neighbor ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void remove_edge (Supports_Test::Node * neighbor ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void change_weight (CORBA::Long new_weight ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void print (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-};
-
-class node_init_impl : public Supports_Test::Node_init
-{
-
- public:
-
- virtual Supports_Test::Node * create (void)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ValueBase * create_for_unmarshal (void);
-
-};
-
-
-class vt_graph_impl :
- public virtual OBV_Supports_Test::vt_graph,
- public virtual POA_Supports_Test::vt_graph,
- public virtual CORBA::DefaultValueRefCountBase
-{
-
- public:
-
- vt_graph_impl (void);
-
- vt_graph_impl (int num_nodes
- ACE_ENV_ARG_DECL);
-
- virtual CORBA::Long size (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void add_node (const char * name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void print (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-};
-
-class vt_graph_init_impl :
- public Supports_Test::vt_graph_init
-{
-
- public:
-
- virtual Supports_Test::vt_graph * create (void)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ValueBase * create_for_unmarshal (void);
-
-};
-
-class test_impl :
- public virtual POA_Supports_Test::test
-{
-
- public:
-
- test_impl (CORBA::ORB_ptr orb);
-
- virtual ~test_impl (void);
-
- virtual void pass_obj_graph_in (Supports_Test::graph * graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void pass_vt_graph_in (Supports_Test::vt_graph * vt_graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void pass_obj_graph_out (Supports_Test::graph_out graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void pass_vt_graph_out (Supports_Test::vt_graph_out vt_graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void pass_obj_graph_inout (Supports_Test::graph * &graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void pass_vt_graph_inout (Supports_Test::vt_graph * &vt_graph_param
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void start (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void finish (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
-
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TAO_SUPPORTS_TEST_IMPL_H */
diff --git a/TAO/tests/OBV/Supports/client.cpp b/TAO/tests/OBV/Supports/client.cpp
deleted file mode 100644
index 076d397dfa4..00000000000
--- a/TAO/tests/OBV/Supports/client.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-// $Id$
-
-#include "Supports_Test_impl.h"
-
-const char * ior = "file://test.ior";
-int num_trials = 1;
-int id = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "t:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 't':
- num_trials = atoi (get_opts.optarg);
- break;
-
- case 'i':
- id = atoi (get_opts.optarg);
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-t <trials> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR," (%P|%t) Nil RootPOA\n"), 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /* Create, register factories */
-
- Supports_Test::Node_init * node_factory = 0;
-
- ACE_NEW_RETURN (node_factory, node_init_impl, 1);
-
- CORBA::ValueFactory returned_factory =
- orb->register_value_factory (node_factory->tao_repository_id (),
- node_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (returned_factory == 0);
-
- node_factory->_remove_ref ();
-
-
- Supports_Test::vt_graph_init * vt_graph_factory = 0;
-
- ACE_NEW_RETURN (vt_graph_factory, vt_graph_init_impl, 1);
-
- returned_factory =
- orb->register_value_factory (vt_graph_factory->tao_repository_id (),
- vt_graph_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (returned_factory == 0);
-
- vt_graph_factory->_remove_ref ();
-
-
- /* Check return values for register_value_factory */
-
- Supports_Test::Node_init * node_factory2 = 0;
-
- ACE_NEW_RETURN (node_factory2, node_init_impl, 1);
-
- returned_factory =
- orb->register_value_factory (node_factory2->tao_repository_id (),
- node_factory2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (returned_factory == node_factory);
-
- node_factory2->_remove_ref ();
-
-
- /* Get test object reference */
-
- CORBA::Object_var tmp = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Supports_Test::test_var my_test =
- Supports_Test::test::_narrow (tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (my_test.in ()))
- ACE_ERROR_RETURN ((LM_DEBUG, "Nil Supports_Test::test obj ref <%s>\n", ior), 1);
-
- my_test->start (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /* Perform test */
-
- for (int i = 0; i < num_trials; i++)
- {
-
- // Create a vt_graph_impl instance and store the reference as a
- // vt_graph_var. Then register the instance with the POA to obtain an
- // object reference, stored as a graph_var. Increment the reference count
- // of the vt_graph_impl instance.
- vt_graph_impl * the_vt_graph = 0;
- ACE_NEW_RETURN (the_vt_graph, vt_graph_impl (3 ACE_ENV_ARG_PARAMETER), 1);
- Supports_Test::vt_graph_var test_vt_graph = the_vt_graph;
-
- Supports_Test::graph_var test_graph =
- the_vt_graph->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (CORBA::is_nil (test_graph.in ()))
- ACE_ERROR_RETURN ((LM_DEBUG, "Nil Supports_Test::graph obj ref\n"), 1);
- the_vt_graph->DefaultValueRefCountBase::_add_ref ();
-
- // At this point, test_vt_graph and test_graph refer to the same object.
- ACE_ASSERT (test_vt_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 3);
- ACE_TRY_CHECK;
- my_test->pass_vt_graph_in (test_vt_graph.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT (test_vt_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 3);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (test_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 3);
- ACE_TRY_CHECK;
- my_test->pass_obj_graph_in (test_graph.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT (test_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 4);
- ACE_TRY_CHECK;
-
- test_vt_graph->add_node ("NEW2" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_graph->add_node ("NEW3" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // After the 'pass_vt_graph_out' call returns, test_vt_graph will refer to
- // a new object.
- ACE_ASSERT (test_vt_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 6);
- ACE_TRY_CHECK;
- my_test->pass_vt_graph_out (test_vt_graph.out () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT (test_vt_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 5);
- ACE_TRY_CHECK;
-
- // 'test_graph' still refers to the original object, but after the
- // 'pass_obj_graph_out' call returns, it will refer to a new object,
- // residing on the server.
- ACE_ASSERT (test_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 6);
- ACE_TRY_CHECK;
- my_test->pass_obj_graph_out (test_graph.out () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT (test_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 5);
- ACE_TRY_CHECK;
-
- // test_vt_graph and test_graph now refer to different objects.
- test_vt_graph->add_node ("NEW2" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_graph->add_node ("NEW2" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (test_vt_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 6);
- ACE_TRY_CHECK;
- my_test->pass_vt_graph_inout (test_vt_graph.inout () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT (test_vt_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 7);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (test_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 6);
- ACE_TRY_CHECK;
- my_test->pass_obj_graph_inout (test_graph.inout () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_ASSERT (test_graph->size (ACE_ENV_SINGLE_ARG_PARAMETER) == 7);
- ACE_TRY_CHECK;
-
- }
-
- my_test->finish (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /* Shut down */
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Client (%P.%t) completed test successfully\n", id));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Supports/run_test.pl b/TAO/tests/OBV/Supports/run_test.pl
deleted file mode 100755
index f871c5cfade..00000000000
--- a/TAO/tests/OBV/Supports/run_test.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-
-$SV = new PerlACE::Process ("server");
-$CL1 = new PerlACE::Process ("client", " -t 16 -i 1");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn ();
-
-$client1 = $CL1->WaitKill (300);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client returned $client1\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/OBV/Supports/server.cpp b/TAO/tests/OBV/Supports/server.cpp
deleted file mode 100644
index f92eee137c5..00000000000
--- a/TAO/tests/OBV/Supports/server.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// $Id$
-
-#include "Supports_Test_impl.h"
-#include "tao/Strategies/advanced_resource.h"
-
-const char * ior_output_file = "test.ior";
-
-int
-main (int argc, char * argv[])
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ())) ACE_ERROR_RETURN ((LM_ERROR," (%P|%t) Nil RootPOA\n"), 1);
-
- PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- /* Create, register factories */
-
- Supports_Test::Node_init * node_factory = 0;
-
- ACE_NEW_RETURN (node_factory, node_init_impl, 1);
-
- CORBA::ValueFactory returned_factory = orb->register_value_factory (node_factory->tao_repository_id (), node_factory ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (returned_factory == 0);
-
- node_factory->_remove_ref ();
-
- Supports_Test::vt_graph_init * vt_graph_factory = 0;
-
- ACE_NEW_RETURN (vt_graph_factory, vt_graph_init_impl, 1);
-
- returned_factory = orb->register_value_factory (vt_graph_factory->tao_repository_id (), vt_graph_factory ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (returned_factory == 0);
-
- vt_graph_factory->_remove_ref ();
-
- test_impl * a_test_impl;
-
- ACE_NEW_RETURN (a_test_impl, test_impl (orb.in ()), 1);
-
- //PortableServer::ServantBase_var owner_transfer = a_test_impl;
-
- Supports_Test::test_ptr a_test = a_test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior = orb->object_to_string (a_test ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- FILE * output_file = ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: %s", ior_output_file), 1);
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
-
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- a_test_impl->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (0, 0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server (%P.%t) completed test successfully\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/TC_Alignment/.cvsignore b/TAO/tests/OBV/TC_Alignment/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/OBV/TC_Alignment/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc b/TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc
deleted file mode 100644
index f9e3d32dc18..00000000000
--- a/TAO/tests/OBV/TC_Alignment/OBV_TC_Alignment.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, valuetype {
- Source_Files {
- testS.cpp
- testC.cpp
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, valuetype {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/OBV/TC_Alignment/README b/TAO/tests/OBV/TC_Alignment/README
deleted file mode 100644
index dc1a595747e..00000000000
--- a/TAO/tests/OBV/TC_Alignment/README
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
-
-@page OBV/TC_ALignment Test README File
-
- This is a test of the traversal of the typecode tree for valuetypes.
-Specifically, elements of the valuetypes typecode that are respresent CORBA
-Short values, for example the value modifier, have been known to cause errors
-when traversing the typecode tree if the previous quantity inserted (in this
-case the repository id) has left the write pointer with an odd offset from
-an 8-byte boundary. This problem has been fixed - the test is to ensure that
-the problem does not recur as a result of future changes to the TAO TypeCode
-class.
-
- Four valuetypes are declared in an IDL file, named in such a way
-that their repository IDs (including the terminal null byte) have lengths
-of 25, 27, 29, and 31. The test method is called 4 times. In each call,
-one of these valuetypes is inserted into an Any and returned to the client,
-who extracts it from the Any and checks the state member for the
-correct value.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
-The script returns 0 if the test was successful.
-
-The command line option -d turns on debugging information for any
-errors that may occur. The script will automatically shut down the
-server by means of a client call. If the test is run by hand, this
-will not happen automatically - the command line option -x must be
-passed to the client.
-
-*/
diff --git a/TAO/tests/OBV/TC_Alignment/client.cpp b/TAO/tests/OBV/TC_Alignment/client.cpp
deleted file mode 100644
index 25da5405c51..00000000000
--- a/TAO/tests/OBV/TC_Alignment/client.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (TC_Alignment,
- client,
- "$Id$")
-
-static const char *ior_input_file = "file://test.ior";
-
-static obvmod::tcOffset1 *vt1 = 0;
-static obvmod::tcOffset003 *vt3 = 0;
-static obvmod::tcOffset00005 *vt5 = 0;
-static obvmod::tcOffset0000007 *vt7 = 0;
-
-int debug = 0;
-int do_shutdown = 0;
-
-int
-register_factories (CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
-{
- // Create and register factories.
-
- obvmod::tcOffset1_init *factory1 = 0;
- ACE_NEW_RETURN (factory1,
- obvmod::tcOffset1_init,
- -1);
-
- orb->register_value_factory (factory1->tao_repository_id (),
- factory1
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- factory1->_remove_ref ();
-
- obvmod::tcOffset003_init *factory3 = 0;
- ACE_NEW_RETURN (factory3,
- obvmod::tcOffset003_init,
- -1);
-
- orb->register_value_factory (factory3->tao_repository_id (),
- factory3
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- factory3->_remove_ref ();
-
- obvmod::tcOffset00005_init *factory5 = 0;
- ACE_NEW_RETURN (factory5,
- obvmod::tcOffset00005_init,
- -1);
-
- orb->register_value_factory (factory5->tao_repository_id (),
- factory5
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- factory5->_remove_ref ();
-
- obvmod::tcOffset0000007_init *factory7 = 0;
- ACE_NEW_RETURN (factory7,
- obvmod::tcOffset0000007_init,
- -1);
-
- orb->register_value_factory (factory7->tao_repository_id (),
- factory7
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- factory7->_remove_ref ();
- return 0;
-}
-
-int
-run_test (test_ptr objref,
- CORBA::Long offset
- ACE_ENV_ARG_DECL)
-{
- CORBA::Any_var result = objref->get_value (offset
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::Boolean status = 0;
- CORBA::Long member_value = 0;
-
- switch (offset)
- {
- case 1:
- status = (result.in () >>= vt1);
- member_value = vt1->mem ();
- break;
- case 3:
- status = (result.in () >>= vt3);
- member_value = vt3->mem ();
- break;
- case 5:
- status = (result.in () >>= vt5);
- member_value = vt5->mem ();
- break;
- case 7:
- status = (result.in () >>= vt7);
- member_value = vt7->mem ();
- break;
- default:
- return -1;
- }
-
- if (status == 0)
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Any extraction failed for repo id length offset"
- " of %d from 8-byte boundary\n",
- offset));
- }
-
- return -1;
- }
-
- return (member_value == offset);
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "dk:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd':
- debug = 1;
- break;
-
- case 'k':
- ior_input_file = get_opts.optarg;
- break;
-
- case 'x':
- do_shutdown = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-d "
- "-k <ior> "
- "-x "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char* argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- {
- return 1;
- }
-
- CORBA::Object_var obj =
- orb->string_to_object (ior_input_file
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int status = register_factories (orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (status != 0)
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "OBV factory registration failed\n"));
- }
-
- return -1;
- }
-
- test_var objref = test::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (CORBA::Long i = 1; i < 8; i += 2)
- {
- status = run_test (objref.in (), i ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (status == 0)
- {
- if (debug)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Incorrect member value - expected %d\n",
- i));
- }
-
- return -1;
- }
- }
-
- if (do_shutdown)
- {
- objref->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/TC_Alignment/run_test.pl b/TAO/tests/OBV/TC_Alignment/run_test.pl
deleted file mode 100755
index 3d33b4e9db5..00000000000
--- a/TAO/tests/OBV/TC_Alignment/run_test.pl
+++ /dev/null
@@ -1,74 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that runs all Naming Service tests. It starts
-# all the servers and clients as necessary.
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-
-$debug = "";
-
-for ($i = 0; $i <= $#ARGV; $i++) {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
- print "Run_Test Perl script for TAO Param Test\n\n";
- print "run_test [-d>]\n";
- print "-d -- runs test in debug mode\n";
- exit 0;
- }
- elsif ($ARGV[$i] eq "-d") {
- $debug = " -d";
- }
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", " -ORBDottedDecimalAddresses 1");
-}
-else {
- $SV = new PerlACE::Process ("server", " -ORBDottedDecimalAddresses 1");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -x $debug");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-print STDERR $CL->CommandLine(), "\n";
-
-$client = $CL->SpawnWaitKill (10);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/TC_Alignment/server.cpp b/TAO/tests/OBV/TC_Alignment/server.cpp
deleted file mode 100644
index ba59b23fa58..00000000000
--- a/TAO/tests/OBV/TC_Alignment/server.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (TC_Alignment,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
- }
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant (orb.in ());
-
- test_var server =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Activated as <%s>\n",
- ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Can't open output file for writing IOR: %s",
- ior_output_file),
- 1);
- }
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Server: exception caught - ");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/TC_Alignment/test.idl b/TAO/tests/OBV/TC_Alignment/test.idl
deleted file mode 100644
index a48a747f219..00000000000
--- a/TAO/tests/OBV/TC_Alignment/test.idl
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/TC_Alignment
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// IDL description of the TypeCode alignment Test interface for valuetypes
-//
-// = AUTHOR
-// Jeff Parsons <j.parsons@vanderbilt.edu>
-//
-// ============================================================================
-
-module obvmod
-{
- valuetype tcOffset1
- {
- public long mem;
- };
-
- valuetype tcOffset003
- {
- public long mem;
- };
-
- valuetype tcOffset00005
- {
- public long mem;
- };
-
- valuetype tcOffset0000007
- {
- public long mem;
- };
-};
-
-interface test
-{
- any get_value (in long type);
- oneway void shutdown ();
-};
diff --git a/TAO/tests/OBV/TC_Alignment/test_i.cpp b/TAO/tests/OBV/TC_Alignment/test_i.cpp
deleted file mode 100644
index b495f0bd3c1..00000000000
--- a/TAO/tests/OBV/TC_Alignment/test_i.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID (TC_Alignment,
- test_i,
- "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (orb)
-{
-}
-
-CORBA::Any *
-test_i::get_value (CORBA::Long offset
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any_ptr retval_ptr = 0;
- ACE_NEW_THROW_EX (retval_ptr,
- CORBA::Any,
- CORBA::NO_MEMORY ());
- CORBA::Any_var retval = retval_ptr;
-
- switch (offset)
- {
- case 1:
- {
- obvmod::tcOffset1 *vt1 = 0;
- ACE_NEW_RETURN (vt1,
- tcOffset1_i,
- 0);
- vt1->mem (offset);
- retval.inout () <<= &vt1;
- break;
- }
- case 3:
- {
- obvmod::tcOffset003 *vt3 = 0;
- ACE_NEW_RETURN (vt3,
- tcOffset3_i,
- 0);
- vt3->mem (offset);
- retval.inout () <<= &vt3;
- break;
- }
- case 5:
- {
- obvmod::tcOffset00005 *vt5 = 0;
- ACE_NEW_RETURN (vt5,
- tcOffset5_i,
- 0);
- vt5->mem (offset);
- retval.inout () <<= &vt5;
- break;
- }
- case 7:
- {
- obvmod::tcOffset0000007 *vt7 = 0;
- ACE_NEW_RETURN (vt7,
- tcOffset7_i,
- 0);
- vt7->mem (offset);
- retval.inout () <<= &vt7;
- break;
- }
- default:
- return 0;
- }
-
- return retval._retn ();
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/OBV/TC_Alignment/test_i.h b/TAO/tests/OBV/TC_Alignment/test_i.h
deleted file mode 100644
index 978cd770426..00000000000
--- a/TAO/tests/OBV/TC_Alignment/test_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/TC_Alignment
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Jeff Parsons <j.parsons@vanderbilt.edu>
-//
-// ============================================================================
-
-#ifndef TAO_OBV_TC_ALIGNMENT_TEST_I_H
-#define TAO_OBV_TC_ALIGNMENT_TEST_I_H
-
-#include "testS.h"
-
-class tcOffset1_i : public OBV_obvmod::tcOffset1
-{
-};
-
-class tcOffset3_i : public OBV_obvmod::tcOffset003
-{
-};
-
-class tcOffset5_i : public OBV_obvmod::tcOffset00005
-{
-};
-
-class tcOffset7_i : public OBV_obvmod::tcOffset0000007
-{
-};
-
-class test_i :public virtual POA_test
-{
-public:
- test_i (CORBA::ORB_ptr orb);
-
- virtual CORBA::Any *get_value (CORBA::Long offset
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_ptr orb_;
-};
-
-#endif /* TAO_OBV_TC_ALIGNMENT_TEST_I_H */
diff --git a/TAO/tests/OBV/Truncatable/Extra.idl b/TAO/tests/OBV/Truncatable/Extra.idl
deleted file mode 100644
index 453b85a92b2..00000000000
--- a/TAO/tests/OBV/Truncatable/Extra.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-// $Id$
-
-//
-// This file contains extra valuetypes which are unknown by the test
-// server. We should be able to pass these values and have the server
-// truncate them to the most derived known type.
-
-#include "Truncatable.idl"
-
-module OBV_TruncatableTest
-{
- //
- // Base valuetype.
- //
- valuetype Extra1 : truncatable TValue1
- {
- public unsigned long edata1;
- };
-};
diff --git a/TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc b/TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc
deleted file mode 100644
index 1dbf29bc7f6..00000000000
--- a/TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver, valuetype {
- Source_Files {
- TruncatableS_impl.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, valuetype {
- after += *Server
- Source_Files {
- ExtraC.cpp
- TruncatableC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/OBV/Truncatable/README b/TAO/tests/OBV/Truncatable/README
deleted file mode 100644
index 74473f9019e..00000000000
--- a/TAO/tests/OBV/Truncatable/README
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
-
-@page OBV/Any Test README File
-
- This test shows and verifies truncatable inheritence functionality.
-
- To run the test either use the run_test.pl script:
-
-$ ./run_test.pl
-
- or start the client and the server manually:
-
-$ server -o ior&
-$ client -k file://ior
-
-To get a detailed test report, run the server manually and then run the client as:
-$ client -v -k file://ior
-
-
-*/
diff --git a/TAO/tests/OBV/Truncatable/Truncatable.idl b/TAO/tests/OBV/Truncatable/Truncatable.idl
deleted file mode 100644
index b86e094c470..00000000000
--- a/TAO/tests/OBV/Truncatable/Truncatable.idl
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id$
-
-//
-// This file contains few valuetypes to show and test truncatable feature of
-// valuetype.
-//
-
-module OBV_TruncatableTest
-{
- //
- // Base valuetype.
- //
- valuetype BaseValue
- {
- public unsigned long basic_data;
- };
-
- //
- // Valuetype with one-level truncatable inheritence.
- //
- valuetype TValue1 : truncatable BaseValue
- {
- public unsigned long data1;
- };
-
- //
- // Valuetype with multi-level truncatable inheritence.
- //
- valuetype TValue2 : truncatable TValue1
- {
- public unsigned long data2;
- };
-
- //
- // Valuetype with multi-level inheritence, but not all truncatable.
- //
- valuetype TValue3 : TValue1
- {
- public unsigned long data3;
- };
-
- //
- // An valuetype nested in a valuetype.
- //
- valuetype NestedValue
- {
- public long data;
- };
-
- //
- // Truncatable valuetype with nested valuetype.
- //
- valuetype TValue4 : truncatable BaseValue
- {
- public NestedValue nv4;
- public unsigned long data4;
- };
-
- //
- // More complex truncatable valuetype.
- //
- valuetype TValue5 : truncatable TValue4
- {
- public string str1;
- public unsigned long data5;
- public NestedValue nv5;
- public string str2;
- };
-
- //
- // No data valuetype with truncatable parent.
- valuetype TValue6 : truncatable BaseValue
- {
- };
-
- //
- // Interface to pass valuetypes.
- //
- interface Test
- {
-
- //NOTE: the "desc" parameter helps verify that truncated values are skipped properly.
- // the output is "<id>: <input desc>"
- void op1 (in string id, in BaseValue iv, out BaseValue ov, inout string desc);
- void op2 (in TValue1 iv, in string id, out TValue1 ov, inout string desc);
- void op3 (in string id, in TValue4 iv, out TValue4 ov, inout string desc);
- BaseValue op4 (in string id,
- in TValue1 iv1,
- in short x,
- in TValue4 iv2,
- in TValue4 iv3,
- in TValue1 iv4,
- inout string desc);
-
- void op5 (in any val, in string id, out TValue1 ov, inout string desc);
-
- // Shutdown the romote ORB
- oneway void shutdown ();
-
- };
-
-};
diff --git a/TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp b/TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp
deleted file mode 100644
index 43601e5c165..00000000000
--- a/TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-// $Id$
-
-#include "TruncatableS_impl.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Truncatable, TruncatableS_impl, "$Id$")
-
-Test_impl::Test_impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_impl::op1 (
- const char * id,
- ::OBV_TruncatableTest::BaseValue * iv,
- ::OBV_TruncatableTest::BaseValue_out ov,
- char *& desc
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op1")
- ACE_TEXT(" id=%s basic_data=%u desc=%s \n"),
- id, iv->basic_data (), desc));
-
- char *tmp =
- CORBA::string_alloc (ACE_OS::strlen (id) + ACE_OS::strlen (desc) + 2);
- ACE_OS::sprintf (tmp, "%s: %s", id, desc);
- CORBA::string_free (desc);
- desc = tmp;
-
- ov = new ::OBV_OBV_TruncatableTest::BaseValue();
- ov->basic_data (iv->basic_data());
- }
-
-
-void
-Test_impl::op2 (
- ::OBV_TruncatableTest::TValue1 * iv,
- const char * id,
- ::OBV_TruncatableTest::TValue1_out ov,
- char *& desc
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op2")
- ACE_TEXT(" id=%s basic_data=%u data1=%u desc=%s \n"),
- id, iv->basic_data (), iv->data1 (), desc));
- char *tmp =
- CORBA::string_alloc (ACE_OS::strlen (id) + ACE_OS::strlen (desc) + 2);
- ACE_OS::sprintf (tmp, "%s: %s", id, desc);
- CORBA::string_free (desc);
- desc = tmp;
-
- ov = new ::OBV_OBV_TruncatableTest::TValue1();
- ov->basic_data (iv->basic_data());
- ov->data1 (iv->data1());
-}
-
-
-void
-Test_impl::op3 (
- const char * id,
- ::OBV_TruncatableTest::TValue4 * iv,
- ::OBV_TruncatableTest::TValue4_out ov,
- char *& desc
- ACE_ENV_ARG_DECL
-)
-ACE_THROW_SPEC ((
- ::CORBA::SystemException
-))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op3")
- ACE_TEXT(" id=%s basic_data=%u data=%u data4=%u desc=%s \n"),
- id, iv->basic_data (), iv->nv4()->data (), iv->data4 (), desc));
-
- char *tmp =
- CORBA::string_alloc (ACE_OS::strlen (id) + ACE_OS::strlen (desc) + 2);
- ACE_OS::sprintf (tmp, "%s: %s", id, desc);
- CORBA::string_free (desc);
- desc = tmp;
-
- ov = new ::OBV_OBV_TruncatableTest::TValue4();
- ::OBV_OBV_TruncatableTest::NestedValue* nv =
- new ::OBV_OBV_TruncatableTest::NestedValue();
- nv->data (iv->nv4()->data ());
- ov->basic_data (iv->basic_data());
- ov->nv4 (nv);
- ov->data4 (iv->data4());
- CORBA::remove_ref(nv);
-}
-
-
-::OBV_TruncatableTest::BaseValue *
-Test_impl::op4 (
- const char * id,
- ::OBV_TruncatableTest::TValue1 * iv1,
- ::CORBA::Short x,
- ::OBV_TruncatableTest::TValue4 * iv2,
- ::OBV_TruncatableTest::TValue4 * iv3,
- ::OBV_TruncatableTest::TValue1 * iv4,
- char *& desc
- ACE_ENV_ARG_DECL
- )
-ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op4")
- ACE_TEXT(" id=%s basic_data=%u data1=%u desc=%s \n"),
- id, iv1->basic_data (), iv1->data1 (), desc));
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op4")
- ACE_TEXT(" id=%s basic_data=%u data=%u data4=%u desc=%s \n"),
- id, iv2->basic_data (), iv2->nv4()->data (),
- iv2->data4 (), desc));
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op4")
- ACE_TEXT(" id=%s basic_data=%u data=%u data4=%u desc=%s \n"),
- id, iv3->basic_data (), iv3->nv4()->data (),
- iv3->data4 (), desc));
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op4")
- ACE_TEXT(" id=%s basic_data=%u data1=%u desc=%s \n"),
- id, iv4->basic_data (), iv4->data1 (), desc));
- }
-
- char *tmp =
- CORBA::string_alloc (ACE_OS::strlen (id) + ACE_OS::strlen (desc) + 2);
- ACE_OS::sprintf (tmp, "%s: %s", id, desc);
- CORBA::string_free (desc);
- desc = tmp;
-
- ::OBV_TruncatableTest::BaseValue * ov =
- new ::OBV_OBV_TruncatableTest::BaseValue();
-
- CORBA::ULong total =
- x * (iv1->basic_data () + iv2->basic_data () +
- iv3->basic_data () + iv4->basic_data ());
- ov->basic_data (total);
-
- return ov;
-}
-
-
-void
-Test_impl::op5 (const CORBA::Any& val,
- const char * id,
- ::OBV_TruncatableTest::TValue1_out ov,
- char *& desc
- ACE_ENV_ARG_DECL )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ))
-{
- ov = new ::OBV_OBV_TruncatableTest::TValue1();
- ::OBV_TruncatableTest::TValue1 *iv = 0;
- CORBA::ValueBase_var target;
- if (!(val >>= CORBA::Any::to_value(target.inout())))
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op5 extract failed\n")));
- ov->basic_data (101);
- ov->data1 (10101);
- }
- else
- {
- iv = ::OBV_TruncatableTest::TValue1::_downcast(target._retn());
- if (TAO_debug_level > 0)
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT("(%P|%t)Test_impl::op5")
- ACE_TEXT(" id=%s basic_data=%u data1=%u desc=%s \n"),
- id, iv->basic_data (), iv->data1 (), desc));
- char *tmp =
- CORBA::string_alloc (ACE_OS::strlen (id) + ACE_OS::strlen (desc) + 2);
- ACE_OS::sprintf (tmp, "%s: %s", id, desc);
- CORBA::string_free (desc);
- desc = tmp;
-
- ov->basic_data (iv->basic_data());
- ov->data1 (iv->data1());
- }
-}
-
-void
-Test_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/OBV/Truncatable/TruncatableS_impl.h b/TAO/tests/OBV/Truncatable/TruncatableS_impl.h
deleted file mode 100644
index 9ae2aa573af..00000000000
--- a/TAO/tests/OBV/Truncatable/TruncatableS_impl.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/Truncatable
-//
-// = FILENAME
-// TruncatableS_impl.h
-//
-// = AUTHOR
-// Boris Kolpackov <bosk@ipmce.ru>
-//
-// ============================================================================
-
-#ifndef TAO_TRUNCATABLE_S_IMPL_H
-#define TAO_TRUNCATABLE_S_IMPL_H
-
-#include "TruncatableS.h"
-
-class Test_impl : public POA_OBV_TruncatableTest::Test
-{
- // = TITLE
- // Implementation of Test interface
- //
- // = DESCRIPTION
- // This interface is provided to produce valuetypes and test
- // marshaling
- //
-public:
- Test_impl (CORBA::ORB_ptr orb);
- // ctor
-
- virtual void op1 (
- const char * id,
- ::OBV_TruncatableTest::BaseValue * iv,
- ::OBV_TruncatableTest::BaseValue_out ov,
- char *& desc
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void op2 (
- ::OBV_TruncatableTest::TValue1 * iv,
- const char * id,
- ::OBV_TruncatableTest::TValue1_out ov,
- char *& desc
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void op3 (
- const char * id,
- ::OBV_TruncatableTest::TValue4 * iv,
- ::OBV_TruncatableTest::TValue4_out ov,
- char *& desc
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual ::OBV_TruncatableTest::BaseValue * op4 (
- const char * id,
- ::OBV_TruncatableTest::TValue1 * iv1,
- ::CORBA::Short x,
- ::OBV_TruncatableTest::TValue4 * iv2,
- ::OBV_TruncatableTest::TValue4 * iv3,
- ::OBV_TruncatableTest::TValue1 * iv4,
- char *& desc
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void op5 (const CORBA::Any& val,
- const char * id,
- ::OBV_TruncatableTest::TValue1_out ov,
- char *& desc
- ACE_ENV_ARG_DECL )
- ACE_THROW_SPEC ((
- ::CORBA::SystemException
- ));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* TAO_TRUNCATABLE_S_IMPL_H */
diff --git a/TAO/tests/OBV/Truncatable/client.cpp b/TAO/tests/OBV/Truncatable/client.cpp
deleted file mode 100644
index c372ce85579..00000000000
--- a/TAO/tests/OBV/Truncatable/client.cpp
+++ /dev/null
@@ -1,542 +0,0 @@
-// $Id$
-
-#include "TruncatableC.h"
-#include "ExtraC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Truncatable, client, "$Id$")
-
- const char *ior = "file://test.ior";
-
-int fail = 0;
-int pretest = 0;
-int verbose = 0;
-
-#define VERIFY(Condition) \
-{ \
- if ((Condition)==0) \
- { \
- fail++; \
- if (!verbose) \
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%P|%t) client - Failure at line %l\n"))); \
- } \
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:v");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.optarg;
- break;
- case 'v':
- verbose = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Create factories.
-
- OBV_TruncatableTest::BaseValue_init *base_factory = 0;
- ACE_NEW_RETURN (base_factory,
- OBV_TruncatableTest::BaseValue_init,
- 1);
-
- orb->register_value_factory (base_factory->tao_repository_id (),
- base_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- base_factory->_remove_ref (); // release ownership
-
-
-
- OBV_TruncatableTest::TValue1_init *value1_factory = 0;
- ACE_NEW_RETURN (value1_factory,
- OBV_TruncatableTest::TValue1_init,
- 1);
-
- orb->register_value_factory (value1_factory->tao_repository_id (),
- value1_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value1_factory->_remove_ref ();
-
-
-
- OBV_TruncatableTest::TValue2_init *value2_factory = 0;
- ACE_NEW_RETURN (value2_factory,
- OBV_TruncatableTest::TValue2_init,
- 1);
-
- orb->register_value_factory (value2_factory->tao_repository_id (),
- value2_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value2_factory->_remove_ref ();
-
-
- OBV_TruncatableTest::TValue3_init *value3_factory = 0;
- ACE_NEW_RETURN (value3_factory,
- OBV_TruncatableTest::TValue3_init,
- 1);
-
- orb->register_value_factory (value3_factory->tao_repository_id (),
- value3_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value3_factory->_remove_ref ();
-
- OBV_TruncatableTest::TValue4_init *value4_factory = 0;
- ACE_NEW_RETURN (value4_factory,
- OBV_TruncatableTest::TValue4_init,
- 1);
-
- orb->register_value_factory (value4_factory->tao_repository_id (),
- value4_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value4_factory->_remove_ref ();
-
- OBV_TruncatableTest::TValue5_init *value5_factory = 0;
- ACE_NEW_RETURN (value5_factory,
- OBV_TruncatableTest::TValue5_init,
- 1);
-
- orb->register_value_factory (value5_factory->tao_repository_id (),
- value5_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value5_factory->_remove_ref ();
-
- OBV_TruncatableTest::NestedValue_init *nested_value_factory = 0;
- ACE_NEW_RETURN (nested_value_factory,
- OBV_TruncatableTest::NestedValue_init,
- 1);
-
- orb->register_value_factory (nested_value_factory->tao_repository_id (),
- nested_value_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- nested_value_factory->_remove_ref ();
-
- // Obtain reference to the object
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- OBV_TruncatableTest::Test_var test =
- OBV_TruncatableTest::Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil OBV_TruncatableTest::Test reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var desc;;
- { //isolate the scope of objects to avoid using wrong values
- OBV_OBV_TruncatableTest::TValue1 v1;
- v1.basic_data (9);
- v1.data1 (99);
-
- OBV_TruncatableTest::BaseValue_var ov1;
-
- desc = CORBA::string_dup ("A<-tB, truncate B to A");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 1: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
-
- test->op1 ("case1", &v1, ov1.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case1: A<-tB, truncate B to A"));
- VERIFY (v1.basic_data () == ov1->basic_data ());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- { //isolate the scope of objects to avoid using wrong values
- OBV_OBV_TruncatableTest::TValue2 v2;
-
- v2.basic_data (9);
- v2.data1 (99);
- v2.data2 (99 * 2);
-
- OBV_TruncatableTest::BaseValue_var ov2;
- desc = CORBA::string_dup ("A<-tB<-tC, truncate C to A");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 2: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
-
- test->op1 ("case2", &v2, ov2.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case2: A<-tB<-tC, truncate C to A"));
- VERIFY (v2.basic_data () == ov2->basic_data ());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
-
- OBV_TruncatableTest::TValue1_var otv1;
- desc = CORBA::string_dup ("A<-tB<-tC, truncate C to B");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 3: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
-
- test->op2 (&v2, "case3", otv1.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case3: A<-tB<-tC, truncate C to B"));
- VERIFY (v2.basic_data () == otv1->basic_data ());
- VERIFY (v2.data1 () == otv1->data1 ());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- { //isolate the scope of objects to avoid using wrong values
- OBV_OBV_TruncatableTest::TValue1 itv1b;
-
- itv1b.basic_data(7);
- itv1b.data1(8);
- OBV_TruncatableTest::TValue1_var otv1b;
- desc = CORBA::string_dup ("A<-tB, truncatable but no truncation");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 3b: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
-
- test->op2 (&itv1b, "case3b", otv1b.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case3b: A<-tB, truncatable but no truncation"));
- VERIFY (itv1b.basic_data () == otv1b->basic_data ());
- VERIFY (itv1b.data1 () == otv1b->data1 ());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- { //isolate the scope of objects to avoid using wrong values
- OBV_OBV_TruncatableTest::TValue3 v3;
- v3.basic_data (9);
- v3.data1 (99);
- v3.data3 (99 * 3);
-
- bool caught_expected_exception = false;
- ACE_TRY_EX (value3)
- {
- OBV_TruncatableTest::BaseValue_var ov3;
- desc = CORBA::string_dup
- ("A<-tB<-C, try truncate C to A, MARSHAL exception");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 4: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- test->op1 ("case4", &v3, ov3.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (value3);
- }
- ACE_CATCH (CORBA::MARSHAL, v3ex)
- {
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("passed\n")));
- caught_expected_exception = true;
- }
- ACE_ENDTRY;
-
- if ( ! caught_expected_exception)
- {
- fail++;
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("faileded\n")));
- }
- } //end marshaling exception test.
-
- { //isolate the scope of objects to avoid using wrong values
- OBV_OBV_TruncatableTest::NestedValue nv;
- nv.data (2);
-
- OBV_OBV_TruncatableTest::TValue5 v5;
-
- v5.basic_data (9);
- v5.nv4 (&nv);
- v5.data4 (99 * 4);
- v5.str1 (CORBA::string_dup ("str1"));
- v5.data5 (99 * 5);
- v5.nv5 (&nv);
- v5.str2 (CORBA::string_dup ("str2"));
-
- OBV_TruncatableTest::BaseValue_var ov5;
- desc = CORBA::string_dup
- ("A<-tB<-tC, B & C have nested value type, truncate C to A");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 5: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
- test->op1 ("case5", &v5, ov5.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case5: A<-tB<-tC, B & C have nested value type, truncate C to A"));
- VERIFY (v5.basic_data () == ov5->basic_data ());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
-
- OBV_TruncatableTest::TValue4_var otv4;
- desc = CORBA::string_dup
- ("A<-tB<-tC, B & C have nested value type, truncate C to B");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 6: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
- test->op3 ("case6", &v5, otv4.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case6: A<-tB<-tC, B & C have nested value type, truncate C to B"));
- VERIFY (v5.basic_data () == otv4->basic_data ());
- VERIFY (v5.nv4 ()->data () == otv4->nv4 ()->data ());
- VERIFY (v5.data4 () == otv4->data4 ());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- { //isolate the scope of objects to avoid using wrong values
- OBV_OBV_TruncatableTest::TValue6 iv;
- iv.basic_data (9);
-
- OBV_TruncatableTest::BaseValue_var ov;
-
- desc = CORBA::string_dup ("A<-tB, B has no data, truncate B to A");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 7: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
- test->op1 ("case7", &iv, ov.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case7: A<-tB, B has no data, truncate B to A"));
- VERIFY (iv.basic_data () == ov->basic_data ());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- { //isolate the scope of objects to avoid using wrong values
- OBV_OBV_TruncatableTest::TValue1 v1;
- v1.basic_data (8);
- v1.data1 (88);
-
- OBV_OBV_TruncatableTest::TValue1 v4;
- v4.basic_data (9);
- v4.data1 (99);
-
- OBV_OBV_TruncatableTest::NestedValue nv;
- nv.data (2);
-
- OBV_OBV_TruncatableTest::TValue4 v2;
-
- v2.basic_data (7);
- v2.nv4 (&nv);
- v2.data4 (77);
-
- OBV_OBV_TruncatableTest::TValue4 v3;
- v3.basic_data (6);
- v3.nv4 (&nv);
- v3.data4 (66);
-
- desc = CORBA::string_dup
- ("multiple IN truncatable valuetype parameters"
- " and return truncatable valuetype");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 8: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
- OBV_TruncatableTest::BaseValue_var ov
- = test->op4 ("case8", &v1, 5, &v2, &v3, &v4, desc.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case8: multiple IN truncatable valuetype parameters"
- " and return truncatable valuetype"));
- CORBA::ULong total = 5 * (v1.basic_data () + v2.basic_data () +
- v3.basic_data () + v4.basic_data ());
- VERIFY (ov->basic_data () == total);
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- {
- OBV_OBV_TruncatableTest::Extra1 v1;
- v1.basic_data (9);
- v1.data1 (99);
- v1.edata1 (1234);
-
- OBV_TruncatableTest::TValue1_var ov1;
-
- desc = CORBA::string_dup ("A<-tB, truncate unknown B to A");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 9: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
-
- test->op2 (&v1, "case9", ov1.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case9: A<-tB, truncate unknown B to A"));
- VERIFY (v1.basic_data () == ov1->basic_data ()
- && v1.data1() == ov1->data1());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
-
- {
- OBV_OBV_TruncatableTest::TValue1 v1;
- v1.basic_data (9);
- v1.data1 (99);
-
- OBV_TruncatableTest::TValue1_var ov1;
- CORBA::Any a;
- a <<= &v1;
- desc = CORBA::string_dup ("A<-tB, known truncatable via Any");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 10: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
-
- test->op5 (a, "case10", ov1.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case10: A<-tB, known truncatable via Any"));
- VERIFY (v1.basic_data () == ov1->basic_data ()
- && v1.data1() == ov1->data1());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- {
- OBV_OBV_TruncatableTest::Extra1 v1;
- v1.basic_data (9);
- v1.data1 (99);
- v1.edata1 (1234);
-
- OBV_TruncatableTest::TValue1_var ov1;
- CORBA::Any a;
- a <<= &v1;
- desc = CORBA::string_dup ("A<-tB, unknown truncatable via Any");
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT("Case 11: %s: "),
- ACE_TEXT_CHAR_TO_TCHAR(desc.in())));
- pretest = fail;
-
- test->op5 (a, "case11", ov1.out (), desc.inout ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- VERIFY (! ACE_OS::strcmp (desc.in (),
- "case11: A<-tB, unknown truncatable via Any"));
- VERIFY (v1.basic_data () == ov1->basic_data ()
- && v1.data1() == ov1->data1());
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ?
- ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - shutdown orb \n"));
-
-
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (fail)
- {
- ACE_ERROR ((LM_ERROR, "(%P|%t) client: test failed \n"));
- return 1;
- }
- else
- ACE_DEBUG((LM_DEBUG, "(%P|%t) client: test passed \n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/Truncatable/run_test.pl b/TAO/tests/OBV/Truncatable/run_test.pl
deleted file mode 100755
index 5a0f4d990f9..00000000000
--- a/TAO/tests/OBV/Truncatable/run_test.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-# This is a Perl script that runs all Naming Service tests. It starts
-# all the servers and clients as necessary.
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/Truncatable/server.cpp b/TAO/tests/OBV/Truncatable/server.cpp
deleted file mode 100644
index c097af17c86..00000000000
--- a/TAO/tests/OBV/Truncatable/server.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// $Id$
-
-#include "TruncatableS_impl.h"
-#include "TruncatableC.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Truncatable, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_impl *test_impl;
- ACE_NEW_RETURN (test_impl,
- Test_impl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- OBV_TruncatableTest::Test_var test =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- OBV_TruncatableTest::BaseValue_init *base_factory = 0;
- ACE_NEW_RETURN (base_factory,
- OBV_TruncatableTest::BaseValue_init,
- 1);
-
- orb->register_value_factory (base_factory->tao_repository_id (),
- base_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- base_factory->_remove_ref (); // release ownership
-
- OBV_TruncatableTest::TValue1_init *value1_factory = 0;
- ACE_NEW_RETURN (value1_factory,
- OBV_TruncatableTest::TValue1_init,
- 1);
-
- orb->register_value_factory (value1_factory->tao_repository_id (),
- value1_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value1_factory->_remove_ref ();
-
- OBV_TruncatableTest::TValue4_init *value4_factory = 0;
- ACE_NEW_RETURN (value4_factory,
- OBV_TruncatableTest::TValue4_init,
- 1);
-
- orb->register_value_factory (value4_factory->tao_repository_id (),
- value4_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- value4_factory->_remove_ref ();
-
- OBV_TruncatableTest::NestedValue_init *nested_value_factory = 0;
- ACE_NEW_RETURN (nested_value_factory,
- OBV_TruncatableTest::NestedValue_init,
- 1);
-
- orb->register_value_factory (nested_value_factory->tao_repository_id (),
- nested_value_factory
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- nested_value_factory->_remove_ref ();
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OBV/ValueBox/Test_impl.cpp b/TAO/tests/OBV/ValueBox/Test_impl.cpp
deleted file mode 100644
index 2c74111f3f3..00000000000
--- a/TAO/tests/OBV/ValueBox/Test_impl.cpp
+++ /dev/null
@@ -1,528 +0,0 @@
-// $Id$
-
-#include "Test_impl.h"
-
-ACE_RCSID(Forward,
- Test_impl,
- "$Id$")
-
-Test_impl::Test_impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-//***************************************************************************
-// Rotate characters in string, last character becomes the first and
-// all others are shifted to the right.
-//***************************************************************************
-void rotate_string(char *s)
-{
- unsigned char c;
- size_t l;
-
- l = strlen(s);
- if (l>1)
- {
- c = s[l-1];
- memmove(&s[1], &s[0], l-1);
- s[0] = c;
- }
-}
-
-
-VBlong *
-Test_impl::basic_op1 (VBlong * p1, VBlong *& p2, VBlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_NEW_RETURN (p3,
- VBlong (p2->_value()*5),
- 0);
-
- p2->_value (p2->_value() * 3);
-
- VBlong *retval = 0;
- ACE_NEW_RETURN (retval,
- VBlong (p1->_value()*3),
- 0);
-
- return retval;
-}
-
-vb_basic::M_VBlong *
-Test_impl::basic_op2 (vb_basic::M_VBlong * p1,
- vb_basic::M_VBlong *& p2,
- vb_basic::M_VBlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_NEW_RETURN (p3,
- vb_basic::M_VBlong (p2->_value()*5),
- 0);
-
- p2->_value (p2->_value() * 3);
-
- vb_basic::M_VBlong *retval = 0;
- ACE_NEW_RETURN (retval,
- vb_basic::M_VBlong (p1->_value()*3),
- 0);
-
- return retval;
-}
-
-::CORBA::Long
-Test_impl::basic_op3 (::CORBA::Long p1, ::CORBA::Long& p2,
- ::CORBA::Long_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- p3 = p2 * 5;
-
- p2 = p2 * 3;
-
- return p1 * 3;
-}
-
-
-VBstring *
-Test_impl::string_op1 (::VBstring * p1,
- ::VBstring *& p2,
- ::VBstring_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- rotate_string (p2->_boxed_inout ());
-
- ACE_NEW_RETURN (p3,
- VBstring (p2->_value ()),
- 0);
-
- rotate_string (p1->_boxed_inout ());
-
- VBstring *retval = 0;
- ACE_NEW_RETURN (retval,
- VBstring (p1->_value ()),
- 0);
-
- return retval;
-}
-
-char *
-Test_impl::string_op2 (const char * p1,
- char *& p2,
- CORBA::String_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- rotate_string (p2);
-
- p3 = CORBA::string_alloc (strlen(p2));
- strcpy (p3, p2);
-
- rotate_string ((char *) p1);
-
- char *return_string;
- return_string = CORBA::string_alloc (strlen(p1));
- strcpy (return_string, p1);
-
- return return_string;
-}
-
-::VBseqlong *
-Test_impl::seq_op1 (::VBseqlong * p1,
- ::VBseqlong *& p2,
- ::VBseqlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_NEW_RETURN (p3,
- VBseqlong(*p2),
- 0);
- CORBA::ULong i;
- for (i=0; i<p3->_value().length(); i++)
- {
- (*p3)[i] *= 5;
- }
-
- for (i=0; i<p2->_value().length(); i++)
- {
- (*p2)[i] *= 3;
- }
-
- VBseqlong *retval = 0;
- ACE_NEW_RETURN (retval,
- VBseqlong(*p1),
- 0);
-
- return retval;
-}
-
-void
-Test_impl::seq_op2 (const ::TDseqlong & p1,
- ::TDseqlong & p2,
- ::TDseqlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_NEW (p3,
- TDseqlong(p1));
- CORBA::ULong i;
- for (i=0; i<p3->length(); i++)
- {
- (*p3)[i] *= 5;
- }
-
- for (i=0; i<p2.length(); i++)
- {
- p2[i] *= 3;
- }
-}
-
-::VBfixed_struct1 *
-Test_impl::struct_op1 (::VBfixed_struct1 * p1,
- ::VBfixed_struct1 *& p2,
- ::VBfixed_struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_NEW_RETURN (p3,
- VBfixed_struct1 (p2->_value()),
- 0);
- // transform p3 values
- p3->l (p3->l() * 5);
- p3->abstruct().s1 = (p3->abstruct()).s1 * 5;
- p3->abstruct().s2 = (p3->abstruct()).s2 * 5;
-
- // transform p2 values
- p2->l (p2->l() * 3);
- p2->abstruct().s1 = (p2->abstruct()).s1 * 3;
- p2->abstruct().s2 = (p2->abstruct()).s2 * 3;
-
- VBfixed_struct1 *retval = 0;
- ACE_NEW_RETURN (retval,
- VBfixed_struct1 (p1->_value()),
- 0);
-
- return retval;
-}
-
-void
-Test_impl::struct_op2 (const ::Fixed_Struct1 & p1,
- ::Fixed_Struct1 & p2,
- ::Fixed_Struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- p3 = p1;
-
- p2.l *= 3;
- p2.abstruct.s1 *= 3;
- p2.abstruct.s2 *= 3;
-}
-
-::VBvariable_struct1 *
-Test_impl::struct_op3 (::VBvariable_struct1 * p1,
- ::VBvariable_struct1 *& p2,
- ::VBvariable_struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // transform p2 values
- p2->l (p2->l() * 3);
- rotate_string ((CORBA::Char *)p2->str());
-
- ACE_NEW_RETURN (p3,
- VBvariable_struct1 (p2->_value()),
- 0);
-
- VBvariable_struct1 *retval = 0;
- ACE_NEW_RETURN (retval,
- VBvariable_struct1 (p1->_value()),
- 0);
-
- return retval;
-}
-
-
-void
-Test_impl::struct_op4 (const ::Variable_Struct1 & p1,
- ::Variable_Struct1 & p2,
- ::Variable_Struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_NEW (p3,
- Variable_Struct1());
- p3->l = p1.l;
- p3->str = p1.str;
-
- p2.l *= 3;
- rotate_string ((CORBA::Char *)p2.str.in());
-}
-
-
-::VBlongarray *
-Test_impl::array_op1 (::VBlongarray * p1,
- ::VBlongarray *& p2,
- ::VBlongarray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- long array_len = sizeof(LongArray) / sizeof(CORBA::Long);
-
- for (long i=0; i<array_len; i++)
- {
- (*p2)[i] *= 3;
- }
-
- ACE_NEW_RETURN (p3,
- VBlongarray(*p2),
- 0);
-
- VBlongarray *retval = 0;
- ACE_NEW_RETURN (retval,
- VBlongarray(*p1),
- 0);
-
- return retval;
-}
-
-void
-Test_impl::array_op2 (const ::LongArray p1,
- ::LongArray p2,
- ::LongArray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- long array_len = sizeof(LongArray) / sizeof(CORBA::Long);
-
- long i;
- for (i=0; i<array_len; i++)
- {
- p2[i] *= 3;
- }
-
- for (i=0; i<array_len; i++)
- {
- p3[i] = p1[i];
- }
-}
-
-
-::VBstringarray *
-Test_impl::array_op3 (::VBstringarray * p1,
- ::VBstringarray *& p2,
- ::VBstringarray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- long array_len = sizeof( ::StringArray ) / sizeof( StringArray_slice );
-
- char * p;
- for (long i=0; i<array_len; i++)
- {
- p = (CORBA::Char *)((*p2)[i]).in();
- rotate_string (p);
- }
-
- ACE_NEW_RETURN (p3,
- VBstringarray(*p2),
- 0);
-
- VBstringarray *retval = 0;
- ACE_NEW_RETURN (retval,
- VBstringarray(*p1),
- 0);
-
- return retval;
-}
-
-void
-Test_impl::array_op4 (const ::StringArray p1,
- ::StringArray p2,
- ::StringArray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- long array_len = sizeof( ::StringArray ) / sizeof( StringArray_slice );
-
- char * p;
- long i;
- for (i=0; i<array_len; i++)
- {
- p = (CORBA::Char *)(p2[i]).in();
- rotate_string (p);
- }
-
- StringArray_slice *sa = StringArray_alloc ();
-
- for (i=0; i<array_len; i++)
- {
- sa[i] = p1[i];
- }
-
- p3 = sa;
-
-}
-
-
-::VBfixed_union1 *
-Test_impl::union_op1 (::VBfixed_union1 * p1,
- ::VBfixed_union1 *& p2,
- ::VBfixed_union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Long longValue;
- CORBA::Short shortValue;
- ACE_NEW_RETURN (p3,
- VBfixed_union1 (),
- 0);
- VBfixed_union1 *rv = 0;
- ACE_NEW_RETURN (rv,
- VBfixed_union1 (),
- 0);
-
- // Set output and return values
- switch (p1->_d ())
- {
- case 1: // Long
- longValue = p1->m1 () * 3;
- p3->m1 (longValue);
- rv->m1 (longValue);
- break;
- case 2: // Short
- shortValue = p1->m2 () * 3;
- p3->m2 (shortValue);
- rv->m2 (shortValue);
- break;
- }
-
- // Set new "inout" parameter value
- switch (p2->_d())
- {
- case 1: // Long
- p2->m1 (p2->m1 () * 3);
- break;
- case 2: // Short
- p2->m2 (p2->m2 () * 3);
- break;
- }
-
- return rv;
-}
-
-void
-Test_impl::union_op2 (const ::Fixed_Union1 & p1,
- ::Fixed_Union1 & p2,
- ::Fixed_Union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- p3 = p1;
-
- // Set new "inout" parameter value
- switch (p2._d())
- {
- case 1: // Long
- p2.m1 (p2.m1 () * 3);
- break;
- case 2: // Short
- p2.m2 (p2.m2 () * 3);
- break;
- }
-}
-
-::VBvariable_union1 *
-Test_impl::union_op3 (::VBvariable_union1 * p1,
- ::VBvariable_union1 *& p2,
- ::VBvariable_union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Long longValue;
- CORBA::String_var stringValue;
- ACE_NEW_RETURN (p3,
- VBvariable_union1 (),
- 0);
- VBvariable_union1 *rv = 0;
- ACE_NEW_RETURN (rv,
- VBvariable_union1 (),
- 0);
-
-
- // Set output and return values
- switch (p1->_d ())
- {
- case 1: // Long
- longValue = p1->m1 ();
- p3->m1 (longValue);
- rv->m1 (longValue);
- break;
- case 2: // String
- stringValue = p1->m2 ();
- p3->m2 (stringValue);
- rv->m2 (stringValue);
- break;
- }
-
- // Set new "inout" parameter value
- switch (p2->_d())
- {
- case 1: // Long
- p2->m1 (p2->m1 () * 3);
- break;
- case 2: // String
- stringValue = p2->m2 ();
- rotate_string (stringValue);
- p2->m2 (stringValue);
- break;
- }
-
- return rv;
-}
-
-void
-Test_impl::union_op4 (const ::Variable_Union1 & p1,
- ::Variable_Union1 & p2,
- ::Variable_Union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var stringValue;
-
- // Return value of "in" parameter to "out" parameter
- ACE_NEW (p3,
- Variable_Union1());
-
- switch (p1._d ())
- {
- case 1: // Long
- p3->m1 (p1.m1 ());
- break;
- case 2: // String
- p3->m2 (p1.m2 ());
- break;
- }
-
- // Set new "inout" parameter value
- switch (p2._d())
- {
- case 1: // Long
- p2.m1 (p2.m1 () * 3);
- break;
- case 2: // String
- stringValue = p2.m2 ();
- rotate_string (stringValue);
- p2.m2 (stringValue);
- break;
- }
-}
-
-
-void
-Test_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/OBV/ValueBox/Test_impl.h b/TAO/tests/OBV/ValueBox/Test_impl.h
deleted file mode 100644
index c870e7270ef..00000000000
--- a/TAO/tests/OBV/ValueBox/Test_impl.h
+++ /dev/null
@@ -1,157 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OBV/ValueBox
-//
-// = FILENAME
-// Test_impl.h
-//
-// = AUTHOR
-// Gary Maxey
-//
-// ============================================================================
-
-
-#ifndef TAO_TEST_IMPL_H
-#define TAO_TEST_IMPL_H
-
-#include "valueboxS.h"
-
-
-class Test_impl : public POA_Test
-{
-public:
- Test_impl (CORBA::ORB_ptr orb);
- // ctor
-
- virtual VBlong * basic_op1 (
- VBlong * p1,
- VBlong *& p2,
- VBlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual vb_basic::M_VBlong * basic_op2(vb_basic::M_VBlong * p1,
- vb_basic::M_VBlong *& p2,
- vb_basic::M_VBlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CORBA::Long basic_op3 (
- ::CORBA::Long p1,
- ::CORBA::Long& p2,
- ::CORBA::Long_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual VBstring * string_op1 (::VBstring * p1,
- ::VBstring *& p2,
- ::VBstring_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual char * string_op2 (const char * p1,
- char *& p2,
- CORBA::String_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::VBseqlong * seq_op1 (::VBseqlong * p1,
- ::VBseqlong *& p2,
- ::VBseqlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void seq_op2 (const ::TDseqlong & p1,
- ::TDseqlong & p2,
- ::TDseqlong_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::VBfixed_struct1 * struct_op1 (
- ::VBfixed_struct1 * p1,
- ::VBfixed_struct1 *& p2,
- ::VBfixed_struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void struct_op2 (const ::Fixed_Struct1 & p1,
- ::Fixed_Struct1 & p2,
- ::Fixed_Struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::VBvariable_struct1 * struct_op3 (::VBvariable_struct1 * p1,
- ::VBvariable_struct1 *& p2,
- ::VBvariable_struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual void struct_op4 (const ::Variable_Struct1 & p1,
- ::Variable_Struct1 & p2,
- ::Variable_Struct1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::VBlongarray * array_op1 (::VBlongarray * p1,
- ::VBlongarray *& p2,
- ::VBlongarray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual void array_op2 (const ::LongArray p1,
- ::LongArray p2,
- ::LongArray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::VBstringarray * array_op3 (::VBstringarray * p1,
- ::VBstringarray *& p2,
- ::VBstringarray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void array_op4 (const ::StringArray p1,
- ::StringArray p2,
- ::StringArray_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::VBfixed_union1 * union_op1 (::VBfixed_union1 * p1,
- ::VBfixed_union1 *& p2,
- ::VBfixed_union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void union_op2 (const ::Fixed_Union1 & p1,
- ::Fixed_Union1 & p2,
- ::Fixed_Union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::VBvariable_union1 * union_op3 (::VBvariable_union1 * p1,
- ::VBvariable_union1 *& p2,
- ::VBvariable_union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void union_op4 (const ::Variable_Union1 & p1,
- ::Variable_Union1 & p2,
- ::Variable_Union1_out p3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* TAO_TEST_IMPL_H */
diff --git a/TAO/tests/OBV/ValueBox/client.cpp b/TAO/tests/OBV/ValueBox/client.cpp
deleted file mode 100644
index 12a3eb2bbd9..00000000000
--- a/TAO/tests/OBV/ValueBox/client.cpp
+++ /dev/null
@@ -1,1533 +0,0 @@
-// $Id$
-
-#include "valueboxC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(ValueBox,
- client,
- "$Id$")
-
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-#define VERIFY(Condition) \
-{ \
- if ((Condition)==0) \
- { \
- fail++; \
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Failure at line %l\n")); \
- } \
-}
-
-//
-// Templated function for testing various aspects of valuetypes.
-// valuebox is a type created by the user, with UT as the underlying type.
-// It is assumed that, on entry, valuebox->_value() != val1, and that
-// val1 and val2 are distinct.
-//
-template <class BoxT, class UT>
-int box_test1 (BoxT *valuebox, UT val1, UT val2)
-{
- int fail = 0;
- BoxT *valuebox_clone = 0;
- ACE_NEW_RETURN (valuebox_clone,
- BoxT (val1),
- 1);
-
- // should be a deep copy of val1...
- VERIFY ( &valuebox_clone->_boxed_inout () != &valuebox->_boxed_inout () );
-
- // but values should be equal
- VERIFY ( valuebox_clone->_value () == valuebox->_value () );
-
- // Check that modifier is working.
- valuebox_clone->_value ( val2 );
- VERIFY ( valuebox_clone->_value () != valuebox->_value () );
-
- // use operator=
- *valuebox = val2;
- VERIFY ( valuebox_clone->_value () == valuebox->_value () );
-
- // Check that _value and _boxed_in are the same.
- VERIFY ( valuebox_clone->_value () == valuebox_clone->_boxed_in () );
- VERIFY ( valuebox->_value () == valuebox->_boxed_in () );
-
- // Used _boxed_inout to change the value
- VERIFY ( valuebox->_value () != val1 );
- valuebox->_boxed_inout () = val1;
- VERIFY ( valuebox->_value () == val1 );
-
- // Use _boxed_out to access the value
- VERIFY ( valuebox_clone->_value () != val1 );
- valuebox_clone->_boxed_out () = val1;
- VERIFY ( valuebox_clone->_value () == val1 );
-
- // Test _copy_value
- CORBA::ValueBase *copy = valuebox->_copy_value ();
- VERIFY ( copy != 0 );
- // check add_ref, remove_ref
- copy->_add_ref ();
- copy->_remove_ref ();
-
- // try downcast...then we can check that copy was correct.
- BoxT *down = BoxT::_downcast (copy);
- if (down == 0)
- {
- fail++;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Failure at line %l\n"));
- }
- else
- {
- VERIFY ( down->_value () == val1 );
- down->_value ( val2 );
- VERIFY ( down->_value () != valuebox->_value () );
- VERIFY ( down->_value () == val2 );
- }
-
- CORBA::remove_ref (copy);
-
- // cleanup. Use purify on the PC to check for leaks.
- CORBA::remove_ref (valuebox_clone);
-
- return fail;
-}
-
-template <class BoxT, class UT>
-int simple_box_test ()
-{
- int fail = 0;
- BoxT *p = 0;
- ACE_NEW_RETURN (p,
- BoxT (101),
- 1);
- fail += box_test1<BoxT, UT> (p, 101, 202);
-
- CORBA::remove_ref (p);
-
- return fail;
-
-}
-
-//
-// Test boxed values that use an underlying UT&
-//
-template <class BoxT, class UT>
-int box_test_ref (BoxT *valuebox, UT &val1, UT &val2)
-{
- int fail = 0;
- BoxT *p = 0;
- ACE_NEW_RETURN (p,
- BoxT (val1),
- 1);
-
- // should be a deep copy of val1...
- VERIFY ( &p->_boxed_inout () != &valuebox->_boxed_inout () );
-
- p->_value ( val2 ); // deep copy
- VERIFY ( &p->_boxed_inout () != &valuebox->_boxed_inout () );
-
- *valuebox = val2; // deep copy, too.
- VERIFY ( &p->_boxed_inout () != &valuebox->_boxed_inout () );
-
- CORBA::remove_ref (p);
-
- return fail;
-}
-
-int test_basic (void)
-{
- int fail = 0;
-
- // Basic types
- fail += simple_box_test<VBshort, CORBA::Short> ();
- fail += simple_box_test<VBlong, CORBA::Long> ();
- fail += simple_box_test<VBlonglong, CORBA::LongLong> ();
- fail += simple_box_test<VBushort, CORBA::UShort> ();
- fail += simple_box_test<VBulong, CORBA::ULong> ();
- fail += simple_box_test<VBulonglong, CORBA::ULongLong> ();
- fail += simple_box_test<VBwchar, CORBA::WChar> ();
- fail += simple_box_test<VBoctet, CORBA::Octet> ();
- fail += simple_box_test<VBfloat, CORBA::Float> ();
- fail += simple_box_test<VBdouble, CORBA::Double> ();
-
- VBchar *pchar = 0;
- ACE_NEW_RETURN (pchar,
- VBchar ('A'),
- 1);
- fail += box_test1<VBchar, CORBA::Char> (pchar, 'A', 'Z');
- CORBA::remove_ref (pchar);
-
- VBboolean *pbool = 0;
- ACE_NEW_RETURN (pbool,
- VBboolean (true),
- 1);
- fail += box_test1<VBboolean, CORBA::Boolean> (pbool, true, false);
- CORBA::remove_ref (pbool);
-
- // Typedef of basic types
- fail += simple_box_test<VBTDshort, CORBA::Short> ();
- fail += simple_box_test<VBTDlong, CORBA::Long> ();
- fail += simple_box_test<VBTDlonglong, CORBA::LongLong> ();
- fail += simple_box_test<VBTDushort, CORBA::UShort> ();
- fail += simple_box_test<VBTDulong, CORBA::ULong> ();
- fail += simple_box_test<VBTDulonglong, CORBA::ULongLong> ();
- fail += simple_box_test<VBTDwchar, CORBA::WChar> ();
- fail += simple_box_test<VBTDoctet, CORBA::Octet> ();
- fail += simple_box_test<VBTDfloat, CORBA::Float> ();
- fail += simple_box_test<VBTDdouble, CORBA::Double> ();
-
- VBTDchar *pchar2 = 0;
- ACE_NEW_RETURN (pchar2,
- VBTDchar ('A'),
- 1);
- fail += box_test1<VBTDchar, CORBA::Char> (pchar2, 'A', 'Z');
- CORBA::remove_ref (pchar2);
-
- VBTDboolean *pbool2 = 0;
- ACE_NEW_RETURN (pbool2,
- VBTDboolean (true),
- 1);
- fail += box_test1<VBTDboolean, CORBA::Boolean> (pbool2, true, false);
- CORBA::remove_ref (pbool2);
-
- // Enumerated type
- VBenum *penum = 0;
- ACE_NEW_RETURN (penum,
- VBenum (yellow),
- 1);
- fail += box_test1<VBenum, Color> (penum, yellow, red);
- CORBA::remove_ref (penum);
-
- // Typedef of enumerated type
- VBTDenum *penum2 = 0;
- ACE_NEW_RETURN (penum2,
- VBTDenum (yellow),
- 1);
- fail += box_test1<VBTDenum, Color> (penum2, yellow, red);
- CORBA::remove_ref (penum2);
-
- // Any
- CORBA::Any *a1 = 0;
- ACE_NEW_RETURN (a1,
- CORBA::Any (),
- 1);
- CORBA::Any_var any1 (a1);
-
- CORBA::Any *a2 = 0;
- ACE_NEW_RETURN (a2,
- CORBA::Any (),
- 1);
- CORBA::Any_var any2 (a2);
-
- VBany *pany = 0;
- ACE_NEW_RETURN (pany,
- VBany (any1.in ()),
- 1);
- fail += box_test_ref<VBany, CORBA::Any> (pany, any1.inout (),
- any2.inout ());
- CORBA::remove_ref (pany);
-
- // Typedef of Any
- VBTDany *pany2 = 0;
- ACE_NEW_RETURN (pany2,
- VBTDany (any1.in ()),
- 1);
- fail += box_test_ref<VBTDany, CORBA::Any> (pany2, any1.inout (),
- any2.inout ());
- CORBA::remove_ref (pany2);
-
- return fail;
-}
-
-int test_basic_invocations (Test * test_object)
-{
- int fail = 0;
-
- ACE_TRY_NEW_ENV
- {
-
- //============================================================
- // 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;
-
- VERIFY (p1->_value () == 25);
- VERIFY (p2->_value () == 53);
-
- VBlong_var result =
- test_object->basic_op1(p1, p2, p3);
- ACE_TRY_CHECK;
-
- VERIFY (p2->_value () == (53*3));
- VERIFY (p3->_value () == (53*5));
- VERIFY (result->_value () == (p1->_value () *3));
-
- //============================================================
- // 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;
-
- VERIFY (mp1->_value () == 25);
- VERIFY (mp2->_value () == 53);
-
- vb_basic::M_VBlong_var mresult =
- test_object->basic_op2(mp1, mp2, mp3);
- ACE_TRY_CHECK;
-
- VERIFY (mp2->_value () == (53*3));
- VERIFY (mp3->_value () == (53*5));
- VERIFY (mresult->_value () == (mp1->_value () *3));
-
- //============================================================
- // Test _boxed_in(), _boxed_inout(), and _boxed_out())
- //============================================================
-
- p1->_value(67);
- p2->_value(93);
-
- long lresult =
- test_object->basic_op3(p1->_boxed_in(), p2->_boxed_inout(),
- p3->_boxed_out());
- ACE_TRY_CHECK;
-
- VERIFY (p2->_value () == (93*3));
- VERIFY (p3->_value () == (93*5));
- VERIFY (lresult == (p1->_value()*3));
-
- p1->_remove_ref ();
- p2->_remove_ref ();
- p3->_remove_ref ();
-
- mp1->_remove_ref ();
- mp2->_remove_ref ();
- mp3->_remove_ref ();
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "test_basic_invocations");
- fail = 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) test_basic_invocations: caught a C++ exception \n"));
- fail = 1;
- }
- ACE_ENDTRY;
-
- return fail;
-}
-
-
-int test_boxed_string()
-{
- int fail = 0;
- const char *string1 = "First-string";
- const char *string2 = "Second-string";
-
- // Establish that we have data setup correctly...
- VERIFY (strcmp (string1, string2) < 0);
- VERIFY (strcmp (string2, string1) > 0);
- VERIFY (strcmp (string1, string1) == 0);
-
- // Make some objects, using our data
- VBstring *temp = 0;
- ACE_NEW_RETURN (temp,
- VBstring(string1),
- 1);
- VBstring_var vbstring1 (temp);
-
- VBstring *vbstring2 = 0;
- ACE_NEW_RETURN (vbstring2,
- VBstring(string1), // tests const char * ctor.
- 1);
-
- VERIFY (strcmp (vbstring1->_value(), string1) == 0);
- VERIFY (strcmp (vbstring2->_value(), string1) == 0);
-
- // Test assignment operators
- char *carray1 = 0;
- ACE_NEW_RETURN (carray1,
- char[15],
- 1);
- memcpy(carray1, string2, strlen(string2));
- *vbstring2 = carray1; // char * (adopted by box)
- VERIFY ((*vbstring2)[0] == 'S');
- *vbstring2 = string1;
- VERIFY ((*vbstring2)[0] == 'F');
- CORBA::String_var svar(string2);
- *vbstring2 = svar;
- VERIFY ((*vbstring2)[0] == 'S');
-
- // Test _value modifiers--like assignment drill above.
- char *carray2 = 0;
- ACE_NEW_RETURN (carray2,
- char[15],
- 1);
- memcpy(carray2, string1, strlen(string1));
- vbstring2->_value(carray2); // char * (adopted by box)
- VERIFY ((*vbstring2)[0] == 'F');
- vbstring2->_value(string2); // const char *
- VERIFY ((*vbstring2)[0] == 'S');
- (*vbstring2)[0] = 'Y';
- VERIFY ((*vbstring2)[0] != 'S');
- vbstring2->_value(svar);
- VERIFY ((*vbstring2)[0] == 'S');
- // test value accessor
- VERIFY ( (vbstring2->_value())[0] == 'S' );
-
- //
- // Test ctors.
- // const boxed string
- VBstring *vbstring3 = 0;
- ACE_NEW_RETURN (vbstring3,
- VBstring(*vbstring2),
- 1);
- VERIFY ((*vbstring3)[0] == 'S');
- (*vbstring3)[0] = 'W';
- VERIFY ((*vbstring3)[0] == 'W' && (*vbstring2)[0] == 'S');
- vbstring3->_remove_ref ();
-
- //
- // char *
- char *carray3 = 0;
- ACE_NEW_RETURN (carray3,
- char[15],
- 1);
- memcpy(carray3, string1, strlen(string1));
- VBstring *vbstring4 = 0;
- ACE_NEW_RETURN (vbstring4,
- VBstring(carray3),
- 1);
- VERIFY ((*vbstring4)[0] == 'F');
- vbstring4->_remove_ref ();
-
- //
- // test CORBA::String_var ctor
- VBstring *vbstring5 = 0;
- ACE_NEW_RETURN (vbstring5,
- VBstring(svar),
- 1);
- VERIFY ((*vbstring5)[0] == 'S');
- (*vbstring5)[0] = 'W';
- VERIFY ((*vbstring5)[0] == 'W' && (svar.in())[0] == 'S');
- vbstring5->_remove_ref ();
-
- // release, as usual
- vbstring2->_remove_ref ();
- return fail;
-}
-
-
-int test_boxed_string_invocations (Test * test_object)
-{
- int fail = 0;
-
- ACE_TRY_NEW_ENV
- {
-
- //============================================================
- // 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;
-
- VERIFY (strcmp(p1->_value (), "string1") == 0);
- VERIFY (strcmp(p2->_value (), "string2") == 0);
-
- VBstring_var result = test_object->string_op1(p1, p2, p3);
- ACE_TRY_CHECK;
-
- VERIFY (strcmp(p2->_value (), "2string") == 0);
- VERIFY (strcmp(p3->_value (), "2string") == 0);
- VERIFY (strcmp(result->_value (), "1string") == 0);
-
- //============================================================
- // Test _boxed_in(), _boxed_inout(), and _boxed_out())
- //============================================================
-
- p2->_value(CORBA::string_dup ("second string2"));
-
- CORBA::String_var sresult =
- test_object->string_op2(p1->_boxed_in(), p2->_boxed_inout(),
- p3->_boxed_out());
- ACE_TRY_CHECK;
-
- VERIFY (strcmp(p2->_value (), "2second string") == 0);
- VERIFY (strcmp(p3->_value (), "2second string") == 0);
- VERIFY (strcmp(sresult.in (), "1string") == 0);
-
- p1->_remove_ref ();
- p2->_remove_ref ();
- p3->_remove_ref ();
-
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "test_boxed_string_invocations");
- fail = 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) test_boxed_string_invocations: "
- "caught a C++ exception \n"));
- fail = 1;
- }
- ACE_ENDTRY;
-
- return fail;
-}
-
-//
-// Test boxed sequence types.
-//
-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);
- VERIFY (vbseqlong1->length() == 0);
- VERIFY (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);
- VERIFY (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;
- VERIFY (vbseqlong2->length() == 3);
- VBseqlong &vbseqlong5 = *vbseqlong2.inout();
- VERIFY (vbseqlong5[2] == 303);
- vbseqlong5[2] = 444;
- VERIFY (vbseqlong5[2] == 444);
- VERIFY (seqlong1[0] == 101 && seqlong1[2] == 303);
- VERIFY ((*vbseqlong4)[0] == 101 && (*vbseqlong4)[2] == 303);
- seqlong1[0] = 111;
- VERIFY ((*vbseqlong4)[0] == 111);
- VERIFY (vbseqlong4->maximum() == 10);
- *vbseqlong4 = vbseqlong1->_value();
- VERIFY (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
- {
- VERIFY (vbseqlong6->length() == 0);
- vbseqlong6->_remove_ref ();
- }
-
- // release
- vbseqlong1->_remove_ref ();
- vbseqlong4->_remove_ref ();
-
- return fail;
-}
-
-
-
-int test_boxed_sequence_invocations (Test * test_object)
-{
- int fail = 0;
-
- ACE_TRY_NEW_ENV
- {
-
- //============================================================
- // 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;
-
- VERIFY ((*p1)[0] == 10);
- VERIFY ((*p1)[1] == 9);
- VERIFY ((*p1)[2] == 8);
- VERIFY ((*p1)[3] == 7);
-
- VBseqlong_var result = test_object->seq_op1(p1, p2, p3);
- ACE_TRY_CHECK;
-
- VERIFY ((*p2)[0] == 100*3);
- VERIFY ((*p2)[1] == 99*3);
- VERIFY ((*p2)[2] == 98*3);
- VERIFY ((*p3)[0] == 100*5);
- VERIFY ((*p3)[1] == 99*5);
- VERIFY ((*p3)[2] == 98*5);
- VERIFY ((*result.in ())[0] == 10);
- VERIFY ((*result.in ())[1] == 9);
- VERIFY ((*result.in ())[2] == 8);
- VERIFY ((*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());
- ACE_TRY_CHECK;
-
- VERIFY ((*p2)[0] == 100*3*3);
- VERIFY ((*p2)[1] == 99*3*3);
- VERIFY ((*p2)[2] == 98*3*3);
- VERIFY ((*p3)[0] == (*p1)[0]*5);
- VERIFY ((*p3)[1] == (*p1)[1]*5);
- VERIFY ((*p3)[2] == (*p1)[2]*5);
- VERIFY ((*p3)[3] == (*p1)[3]*5);
-
- p1->_remove_ref ();
- p2->_remove_ref ();
- p3->_remove_ref ();
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "test_boxed_sequence_invocations");
- fail = 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) test_boxed_sequence_invocations: "
- "caught a C++ exception \n"));
- fail = 1;
- }
- ACE_ENDTRY;
-
- return fail;
-}
-
-
-//
-// Test a boxed struct type. This is not templated since the struct
-// members are accessed by name, so this is specific to a certain IDL.
-//
-int test_boxed_struct (void)
-{
- 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);
-
- // Test boxed copy ctor.
- VBfixed_struct1* valuebox2_ptr = 0;
- ACE_NEW_RETURN (valuebox2_ptr,
- VBfixed_struct1 (*valuebox1),
- 1);
- VBfixed_struct1_var valuebox2 = valuebox2_ptr;
-
- VERIFY (valuebox1->l () == valuebox2->l ());
- VERIFY ((valuebox1->abstruct ()).s1 == (valuebox2->abstruct ()).s1 );
- VERIFY ((valuebox1->abstruct ()).s2 == (valuebox2->abstruct ()).s2 );
-
- // Change an element
- valuebox1->l (505);
- VERIFY (valuebox1->l () != valuebox2->l ());
-
- // Change some more, to test other types.
- (valuebox2->abstruct ()).s1 = 667;
- VERIFY ((valuebox1->abstruct ()).s1 != (valuebox2->abstruct ()).s1 );
- (valuebox2->abstruct ()).s2 = 1667;
- VERIFY ((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);
-
- // Test assignment operator
- *valuebox3 = *fixed_struct_b;
-
- VERIFY (valuebox3->l () == fixed_struct_b->l);
- VERIFY ((valuebox3->abstruct ()).s1 == fixed_struct_b->abstruct.s1);
- VERIFY ((valuebox3->abstruct ()).s2 == fixed_struct_b->abstruct.s2);
-
- // Test _value modifier method
- valuebox2->_value (*fixed_struct_b);
- VERIFY (valuebox2->l () == fixed_struct_b->l);
- VERIFY ((valuebox2->abstruct ()).s1 == fixed_struct_b->abstruct.s1);
- VERIFY ((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
- {
- VERIFY (valuebox4->l () == fixed_struct_b->l);
- VERIFY ((valuebox4->abstruct ()).s1 == fixed_struct_b->abstruct.s1);
- VERIFY ((valuebox4->abstruct ()).s2 == fixed_struct_b->abstruct.s2);
- }
-
- //
- // 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;
-
- //
- // Other types are _var so their dtors will clean up remaining
- // allocations.
-
- return fail;
-}
-
-
-
-int test_boxed_struct_invocations (Test * test_object)
-{
- int fail = 0;
-
- ACE_TRY_NEW_ENV
- {
-
- //============================================================
- // 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);
-
- 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 *p3;
-
- VERIFY (p1->l() == 29);
- VERIFY ((p1->abstruct()).s1 == 117);
- VERIFY ((p1->abstruct()).s2 == 21);
-
- VBfixed_struct1_var result = test_object->struct_op1(p1, p2, p3);
- ACE_TRY_CHECK;
-
- VERIFY (p2->l() == 92*3);
- VERIFY ((p2->abstruct()).s1 == 171*3);
- VERIFY ((p2->abstruct()).s2 == 12*3);
-
- VERIFY (p3->l() == 92*5);
- VERIFY ((p3->abstruct()).s1 == 171*5);
- VERIFY ((p3->abstruct()).s2 == 12*5);
-
- VERIFY (result->l() == fs1.l);
- VERIFY ((result->abstruct()).s1 == fs1.abstruct.s1);
- VERIFY ((result->abstruct()).s2 == fs1.abstruct.s2);
-
- //============================================================
- // Fixed struct
- // Test _boxed_in(), _boxed_inout(), and _boxed_out())
- //============================================================
-
- test_object->struct_op2(p1->_boxed_in(), p2->_boxed_inout(),
- p3->_boxed_out());
-
- VERIFY (p2->l() == 92*3*3);
- VERIFY ((p2->abstruct()).s1 == 171*3*3);
- VERIFY ((p2->abstruct()).s2 == 12*3*3);
-
- VERIFY (p3->l() == fs1.l);
- VERIFY ((p3->abstruct()).s1 == fs1.abstruct.s1);
- VERIFY ((p3->abstruct()).s2 == fs1.abstruct.s2);
-
-
- p1->_remove_ref ();
- p2->_remove_ref ();
- p3->_remove_ref ();
-
-
- //============================================================
- // Variable struct
- // Test method invocation with boxed value
- //============================================================
-
- Variable_Struct1 vs1;
- vs1.l = 29;
- vs1.str = CORBA::string_dup ("variable1");
-
- VBvariable_struct1 *p4 = 0;
- ACE_NEW_RETURN (p4,
- VBvariable_struct1 (vs1),
- 1);
-
- Variable_Struct1 vs2;
- vs2.l = 37;
- vs2.str = "variable2";
-
- VBvariable_struct1 *p5 = 0;
- ACE_NEW_RETURN (p5,
- VBvariable_struct1 (vs2),
- 1);
-
- VBvariable_struct1 *p6;
-
-
- VERIFY (p4->l() == 29);
- VERIFY (strcmp(p4->str(), "variable1") == 0);
-
- VBvariable_struct1_var result2 = test_object->struct_op3(p4, p5, p6);
- ACE_TRY_CHECK;
-
- VERIFY (p5->l() == vs2.l*3);
- VERIFY (strcmp(p5->str(), "2variable") == 0);
-
- VERIFY (p6->l() == vs2.l*3);
- VERIFY (strcmp(p6->str(), "2variable") == 0);
-
- VERIFY (result2->l() == vs1.l);
- VERIFY (strcmp(result2->str(), vs1.str) == 0);
-
-
- //============================================================
- // Variable struct
- // Test _boxed_in(), _boxed_inout(), and _boxed_out())
- //============================================================
-
- test_object->struct_op4(p4->_boxed_in(), p5->_boxed_inout(),
- p6->_boxed_out());
- ACE_TRY_CHECK;
-
- VERIFY (p5->l() == vs2.l*3*3);
- VERIFY (strcmp(p5->str(), "e2variabl") == 0);
-
- VERIFY (p6->l() == vs1.l);
- VERIFY (strcmp(p6->str(), vs1.str) == 0);
-
-
- p4->_remove_ref ();
- p5->_remove_ref ();
- p6->_remove_ref ();
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "test_boxed_struct_invocations");
- fail = 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) test_boxed_struct_invocations: "
- "caught a C++ exception \n"));
- fail = 1;
- }
- ACE_ENDTRY;
-
- return fail;
-}
-
-//
-// Test boxed array types.
-//
-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);
-
- VERIFY ((*valuebox2)[0] == 101
- && valuebox2->_value()[1] == 202
- && valuebox2->_value()[2] == 303);
-
- VERIFY ((*valuebox3)[0] == 101
- && (*valuebox3)[1] == 202
- && (*valuebox3)[2] == 303);
-
- (*valuebox3)[0] = 111;
- valuebox3->_value()[1] = 222;
-
- VERIFY ((*valuebox2)[0] == 101
- && (*valuebox2)[1] == 202
- && (*valuebox2)[2] == 303);
-
- VERIFY ((*valuebox3)[0] == 111
- && (*valuebox3)[1] == 222
- && (*valuebox3)[2] == 303);
-
- *valuebox1 = la;
-
- VERIFY ((*valuebox1)[0] == 101
- && valuebox1->_value()[1] == 202
- && valuebox1->_value()[2] == 303);
-
- valuebox2->_value(la);
-
- VERIFY ((*valuebox2)[0] == 101
- && valuebox2->_value()[1] == 202
- && valuebox2->_value()[2] == 303);
-
- LongArray_var lv_la(LongArray_dup(la));
- *valuebox2 = lv_la.in();
-
- *valuebox2 = valuebox3->_value();
- valuebox3->_value()[1] = 777;
- VERIFY ((*valuebox2)[0] == 111
- && valuebox2->_value()[1] == 222
- && valuebox2->_value()[2] == 303);
-
- // release
- valuebox1->_remove_ref ();
- valuebox2->_remove_ref ();
- valuebox3->_remove_ref ();
-
- return fail;
-}
-
-
-
-int test_boxed_array_invocations (Test * test_object)
-{
- int fail = 0;
-
- ACE_TRY_NEW_ENV
- {
- //============================================================
- // Array (fixed)
- // Test method invocation with boxed value
- //============================================================
-
- LongArray la;
- la[0] = 101;
- la[1] = 202;
- la[2] = 303;
-
- VBlongarray *p1 = 0;
- ACE_NEW_RETURN (p1,
- VBlongarray (la),
- 1);
-
- LongArray la2;
- la2[0] = 3101;
- la2[1] = 3202;
- la2[2] = 3303;
-
- VBlongarray *p2 = 0;
- ACE_NEW_RETURN (p2,
- VBlongarray (la2),
- 1);
-
- VERIFY ((*p1)[0] == 101
- && (*p1)[1] == 202
- && (*p1)[2] == 303);
-
- VBlongarray *p3;
-
- VBlongarray_var result = test_object->array_op1 (p1, p2, p3);
- ACE_TRY_CHECK;
-
- VERIFY ((*p2)[0] == (3101*3)
- && (*p2)[1] == (3202*3)
- && (*p3)[2] == (3303*3));
-
- VERIFY ((*p3)[0] == (3101*3)
- && (*p3)[1] == (3202*3)
- && (*p3)[2] == (3303*3));
-
- VERIFY ((*result.in ())[0] == 101
- && (*result.in ())[1] == 202
- && (*result.in ())[2] == 303);
-
- //============================================================
- // 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());
- ACE_TRY_CHECK;
-
- VERIFY ((*p2)[0] == (3101*3*3)
- && (*p2)[1] == (3202*3*3)
- && (*p2)[2] == (3303*3*3));
-
- VERIFY ((*p3)[0] == (*p1)[0]
- && (*p3)[1] == (*p1)[1]
- && (*p3)[2] == (*p1)[2]);
-#endif
-
- p1->_remove_ref ();
- p2->_remove_ref ();
- p3->_remove_ref ();
-
- //============================================================
- // Array (variable)
- // Test method invocation with boxed value
- //============================================================
-
- 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);
-
- 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);
-
- VERIFY (strcmp((*p4)[0], sa[0]) == 0);
- VERIFY (strcmp((*p4)[1], sa[1]) == 0);
-
- VBstringarray *p6;
-
- VBstringarray_var result2 = test_object->array_op3 (p4, p5, p6);
-
- VERIFY (strcmp((*p5)[0], "1inout string") == 0);
- VERIFY (strcmp((*p5)[1], "2inout string") == 0);
- VERIFY (strcmp((*p6)[0], "1inout string") == 0);
- VERIFY (strcmp((*p6)[1], "2inout string") == 0);
- VERIFY (strcmp((*result2.in ())[0], sa[0]) == 0);
- VERIFY (strcmp((*result2.in ())[1], sa[1]) == 0);
-
- //============================================================
- // Array (variable)
- // Test _boxed_in(), _boxed_inout(), and _boxed_out())
- //============================================================
-
-// Disable the following for now. Need to troubleshoot it.
-#if 0
-// Following gets compilation error on parameter 3
-// test_object->array_op4(p4->_boxed_in(), p5->_boxed_inout(),
-// p6->_boxed_out());
-
-// 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])));
- VERIFY (strcmp((*p5)[0], "g1inout strin") == 0);
- VERIFY (strcmp((*p5)[1], "g2inout strin") == 0);
- VERIFY (strcmp((*p6)[0], sa[0]) == 0);
- VERIFY (strcmp((*p6)[1], sa[1]) == 0);
-#endif
-
- p4->_remove_ref ();
- p5->_remove_ref ();
- p6->_remove_ref ();
-
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "test_boxed_array_invocations");
- fail = 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) test_boxed_array_invocations: "
- "caught a C++ exception \n"));
- fail = 1;
- }
- ACE_ENDTRY;
-
- return fail;
-}
-
-
-//
-// Test a boxed union type.
-//
-int test_boxed_union()
-{
- int fail = 0;
-
- 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);
- VERIFY (valuebox1->m1 () == 37);
- VERIFY (valuebox1->_d () == 1 || valuebox1->_d () == 2);
-
- // Explicitly set discriminant, make sure thats the only thing
- // that changes.
- valuebox1->_d (2);
- VERIFY (valuebox1->_d () == 2);
- VERIFY (valuebox1->m1 () == 37);
- valuebox1->_d (1);
- VERIFY (valuebox1->_d () == 1);
- VERIFY (valuebox1->m1 () == 37);
-
- // Use _value() to access
- valuebox1->_value ()._d (2);
- VERIFY (valuebox1->_d () == 2);
-
- // Use _value as modifier.
- valuebox1->_value (fixed_union1.in());
- VERIFY (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);
- VERIFY (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);
- VERIFY (valuebox3->_d () == 2);
- VERIFY (valuebox3->m2 () == 333);
-
- // Test assignment op
- valuebox3->m2 (456);
- *valuebox3.in () = valuebox2->_value ();
- VERIFY (valuebox3->_d () == 2);
- VERIFY (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);
- VERIFY (valuebox4->m2 () == 137);
- VERIFY (valuebox4->_d () == 1 || valuebox4->_d () == 2);
-
- return fail;
-}
-
-
-
-
-int test_boxed_union_invocations (Test * test_object)
-{
- int fail = 0;
-
- ACE_TRY_NEW_ENV
- {
- //============================================================
- // 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);
-
- VERIFY (p1->_d () == 1);
- VERIFY (p1->m1 () == 321);
- VERIFY (p2->_d () == 2);
- VERIFY (p2->m2 () == 789);
-
- VBfixed_union1 * p3;
-
- VBfixed_union1_var result = test_object->union_op1 (p1, p2, p3);
- ACE_TRY_CHECK;
-
- VERIFY (p2->_d () == 2);
- VERIFY (p2->m2 () == 789*3);
- VERIFY (p3->_d () == 1);
- VERIFY (p3->m1 () == 321*3);
- VERIFY (result->_d () == 1);
- VERIFY (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());
-
- VERIFY (p2->_d () == 2);
- VERIFY (p2->m2 () == 789*3*3);
-
- VERIFY (p3->_d () == 1);
- VERIFY (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);
-
- VERIFY (p4->_d () == 1);
- VERIFY (p4->m1 () == 321);
- VERIFY (p5->_d () == 2);
- VERIFY (strcmp(p5->m2 (), "abracadabra") == 0);
-
- VBvariable_union1 * p6;
-
- VBvariable_union1_var result2 = test_object->union_op3 (p4, p5, p6);
- ACE_TRY_CHECK;
-
- VERIFY (p5->_d () == 2);
- VERIFY (strcmp(p5->m2 (), "aabracadabr") == 0);
- VERIFY (p6->_d () == 1);
- VERIFY (p6->m1 () == 321);
- VERIFY (result2->_d () == 1);
- VERIFY (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());
- ACE_TRY_CHECK;
-
- VERIFY (p5->_d () == 2);
- VERIFY (strcmp(p5->m2 (), "raabracadab") == 0);
-
- VERIFY (p6->_d () == 1);
- VERIFY (p6->m1 () == 1722);
-
- p4->_remove_ref ();
- p5->_remove_ref ();
- p6->_remove_ref ();
-
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "test_boxed_union_invocations");
- fail = 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) test_boxed_union_invocations: "
- "caught a C++ exception \n"));
- fail = 1;
- }
- ACE_ENDTRY;
-
- return fail;
-}
-
-int
-main (int argc, char *argv[])
-{
- Test_var test_object;
- CORBA::ORB_var orb;
-
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY_EX (init)
- {
- orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (init);
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Obtain reference to the object.
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (init);
-
- test_object = Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (init);
-
- if (CORBA::is_nil (test_object.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test reference <%s>\n",
- ior),
- 1);
- }
- }
- ACE_CATCH (CORBA::Exception, ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Initialization failure");
- return 1;
- }
- ACE_CATCHALL
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Initialization failure: caught a C++ exception \n"));
- return 1;
- }
- ACE_ENDTRY;
-
- int fail = 0;
-
- fail = test_basic ();
-
- fail += test_basic_invocations (test_object.in ());
-
- fail += test_boxed_string ();
-
- fail += test_boxed_string_invocations (test_object.in ());
-
- fail += test_boxed_sequence ();
-
- fail += test_boxed_sequence_invocations (test_object.in ());
-
- fail += test_boxed_struct ();
-
- fail += test_boxed_struct_invocations (test_object.in ());
-
- fail += test_boxed_array ();
-
- fail += test_boxed_array_invocations (test_object.in ());
-
- fail += test_boxed_union();
-
- fail += test_boxed_union_invocations (test_object.in ());
-
-
- ACE_TRY_EX (cleanup)
- {
- test_object->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (cleanup);
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - test finished\n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (cleanup);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return (fail) ? 1 : 0;
-}
diff --git a/TAO/tests/OBV/ValueBox/run_test.pl b/TAO/tests/OBV/ValueBox/run_test.pl
deleted file mode 100755
index de69f709455..00000000000
--- a/TAO/tests/OBV/ValueBox/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OBV/ValueBox/server.cpp b/TAO/tests/OBV/ValueBox/server.cpp
deleted file mode 100644
index 4eaa84c6db0..00000000000
--- a/TAO/tests/OBV/ValueBox/server.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-
-#include "Test_impl.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(ValueBox,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.optarg;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_impl *test_impl;
- ACE_NEW_RETURN (test_impl,
- Test_impl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- Test_var test = test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ex._tao_print_exception ("Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
diff --git a/TAO/tests/OBV/ValueBox/valuebox.idl b/TAO/tests/OBV/ValueBox/valuebox.idl
deleted file mode 100644
index 6af684b75aa..00000000000
--- a/TAO/tests/OBV/ValueBox/valuebox.idl
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id$
-
-#include "vb_basic.idl"
-#include "vb_struct.idl"
-#include "vb_union.idl"
-
-//
-// Boxed Strings
-//
-valuetype VBstring string;
-valuetype VBwstring wstring;
-
-//
-// Boxed Sequences
-//
-typedef sequence<long> TDseqlong;
-valuetype VBseqlong TDseqlong;
-
-//
-// Boxed array ("fixed")
-//
-typedef long LongArray[3];
-valuetype VBlongarray LongArray;
-
-//
-// Boxed array ("variable")
-//
-typedef string StringArray[2];
-valuetype VBstringarray StringArray;
-
-interface Test
-{
- // Boxed basic types
- VBlong basic_op1(in VBlong p1, inout VBlong p2, out VBlong p3);
-
- vb_basic::M_VBlong basic_op2(in vb_basic::M_VBlong p1,
- inout vb_basic::M_VBlong p2,
- out vb_basic::M_VBlong p3);
-
- long basic_op3 (in long p1, inout long p2, out long p3);
-
- // Boxed string
- VBstring string_op1(in VBstring p1, inout VBstring p2, out VBstring p3);
-
- string string_op2(in string p1, inout string p2, out string p3);
-
- // Boxed sequence
- VBseqlong seq_op1(in VBseqlong p1, inout VBseqlong p2,
- out VBseqlong p3);
-
- void seq_op2(in TDseqlong p1, inout TDseqlong p2, out TDseqlong p3);
-
- // Boxed struct
- VBfixed_struct1 struct_op1(in VBfixed_struct1 p1,
- inout VBfixed_struct1 p2,
- out VBfixed_struct1 p3);
-
- void struct_op2(in Fixed_Struct1 p1,
- inout Fixed_Struct1 p2,
- out Fixed_Struct1 p3);
-
- VBvariable_struct1 struct_op3(in VBvariable_struct1 p1,
- inout VBvariable_struct1 p2,
- out VBvariable_struct1 p3);
-
- void struct_op4(in Variable_Struct1 p1,
- inout Variable_Struct1 p2,
- out Variable_Struct1 p3);
-
- // Boxed array (fixed)
- VBlongarray array_op1 (in VBlongarray p1, inout VBlongarray p2,
- out VBlongarray p3);
-
- void array_op2 (in LongArray p1, inout LongArray p2, out LongArray p3);
-
- // Boxed array (variable)
- VBstringarray array_op3 (in VBstringarray p1, inout VBstringarray p2,
- out VBstringarray p3);
-
- void array_op4 (in StringArray p1, inout StringArray p2,
- out StringArray p3);
-
- // Boxed union
- VBfixed_union1 union_op1(in VBfixed_union1 p1,
- inout VBfixed_union1 p2,
- out VBfixed_union1 p3);
-
- void union_op2(in Fixed_Union1 p1,
- inout Fixed_Union1 p2,
- out Fixed_Union1 p3);
-
- VBvariable_union1 union_op3(in VBvariable_union1 p1,
- inout VBvariable_union1 p2,
- out VBvariable_union1 p3);
-
- void union_op4(in Variable_Union1 p1,
- inout Variable_Union1 p2,
- out Variable_Union1 p3);
-
- // Shutdown the remote ORB
- oneway void shutdown ();
-};
diff --git a/TAO/tests/OBV/ValueBox/valuebox.mpc b/TAO/tests/OBV/ValueBox/valuebox.mpc
deleted file mode 100644
index 64145b1880f..00000000000
--- a/TAO/tests/OBV/ValueBox/valuebox.mpc
+++ /dev/null
@@ -1,34 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, valuetype {
- IDL_Files {
- vb_basic.idl
- vb_struct.idl
- vb_union.idl
- valuebox.idl
- }
- Source_Files {
- vb_basicC.cpp
- vb_basicS.cpp
- vb_structC.cpp
- vb_structS.cpp
- vb_unionC.cpp
- vb_unionS.cpp
- valueboxC.cpp
- valueboxS.cpp
- Test_impl.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, valuetype {
- after += *Server
- Source_Files {
- vb_basicC.cpp
- vb_structC.cpp
- vb_unionC.cpp
- valueboxC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/OBV/ValueBox/vb_basic.idl b/TAO/tests/OBV/ValueBox/vb_basic.idl
deleted file mode 100644
index 3c4c5f09c54..00000000000
--- a/TAO/tests/OBV/ValueBox/vb_basic.idl
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id$
-
-//=========================================================================
-// Valuebox of basic types
-//=========================================================================
-
-// Valuebox of all basic types defined at outermost scope:
-
-enum Color { red, orange, yellow, green, blue, indigo, violet };
-
-valuetype VBshort short;
-valuetype VBlong long;
-valuetype VBlonglong long long;
-valuetype VBushort unsigned short;
-valuetype VBulong unsigned long;
-valuetype VBulonglong unsigned long long;
-valuetype VBchar char;
-valuetype VBwchar wchar;
-valuetype VBboolean boolean;
-valuetype VBoctet octet;
-valuetype VBfloat float;
-valuetype VBdouble double;
-valuetype VBlongdouble long double;
-valuetype VBenum Color;
-
-// Typedefs of basic types
-typedef short TDshort;
-typedef long TDlong;
-typedef long long TDlonglong;
-typedef unsigned short TDushort;
-typedef unsigned long TDulong;
-typedef unsigned long long TDulonglong;
-typedef char TDchar;
-typedef wchar TDwchar;
-typedef boolean TDboolean;
-typedef octet TDoctet;
-typedef float TDfloat;
-typedef double TDdouble;
-typedef long double TDlongdouble;
-typedef Color TDenum;
-
-// Value box of typedef of basic types
-valuetype VBTDshort TDshort;
-valuetype VBTDlong TDlong;
-valuetype VBTDlonglong TDlonglong;
-valuetype VBTDushort TDushort;
-valuetype VBTDulong TDulong;
-valuetype VBTDulonglong TDulonglong;
-valuetype VBTDchar TDchar;
-valuetype VBTDwchar TDwchar;
-valuetype VBTDboolean TDboolean;
-valuetype VBTDoctet TDoctet;
-valuetype VBTDfloat TDfloat;
-valuetype VBTDdouble TDdouble;
-valuetype VBTDlongdouble TDlongdouble;
-valuetype VBTDenum TDenum;
-// $Id$
-
-// Any and typedef of any
-valuetype VBany any;
-typedef any TDany;
-valuetype VBTDany TDany;
-
-module vb_basic
-{
- // Valuebox defined within a module scope
- valuetype M_VBlong long;
-
- interface Test
- {
- M_VBlong basic_op1(in M_VBlong p1, inout M_VBlong p2,
- out M_VBlong p3);
- };
-};
-
-// Valuebox of an interface
-valuetype VBinterface vb_basic::Test;
diff --git a/TAO/tests/OBV/ValueBox/vb_struct.idl b/TAO/tests/OBV/ValueBox/vb_struct.idl
deleted file mode 100644
index 318653e5009..00000000000
--- a/TAO/tests/OBV/ValueBox/vb_struct.idl
+++ /dev/null
@@ -1,68 +0,0 @@
-// $Id$
-
-//=========================================================================
-// Valuebox of structs
-//=========================================================================
-
-// "Fixed" struct
-struct Fixed_Struct1
-{ long l;
- struct Bstruct {short s1; short s2; } abstruct;
-};
-
-// "Variable" struct
-struct Variable_Struct1
-{ long l;
- string str;
-};
-
-typedef Variable_Struct1 TDvariable_struct1;
-
-interface InterfaceFwd;
-
-interface Interface1
-{
- long getval(in short s);
-};
-
-enum Pet { dog, cat, fish, rhinoceros };
-typedef short short_array[15];
-
-union Union1 switch(long)
-{
- case 1: long m1;
- case 2: Pet m2;
-};
-
-typedef sequence<long> LongSeq;
-
-// Use all possible types inside a struct
-struct Variable_Struct2
-{
- long len; // predefined type
- any whatever; // predefined type
- Pet apet; // enum
- octet octet_array[10]; // array
- short_array td_array; // typedefed array
- Interface1 intf1; // interface
- InterfaceFwd intf2; // interface fwd
- string str; // string
- wstring wstr; // string
- LongSeq ls; // typedef sequence
- sequence <Pet> sqq; // sequence
- struct NestedStruct1 { short s; string str2; } ns1; // structure
- Variable_Struct1 NestedStruct2;
- TDvariable_struct1 NestedStruct3;
- Union1 un; // union
-};
-
-valuetype VBfixed_struct1 Fixed_Struct1;
-
-valuetype VBvariable_struct1 Variable_Struct1;
-
-valuetype VBvariable_struct2 Variable_Struct2;
-
-interface InterfaceFwd
-{
- long getval(in short s);
-};
diff --git a/TAO/tests/OBV/ValueBox/vb_union.idl b/TAO/tests/OBV/ValueBox/vb_union.idl
deleted file mode 100644
index 0a05be46651..00000000000
--- a/TAO/tests/OBV/ValueBox/vb_union.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-//=========================================================================
-// Valuebox of unions
-//=========================================================================
-
-union Fixed_Union1 switch(long)
-{
- case 1: long m1;
- case 2: short m2;
-};
-
-union Variable_Union1 switch(long)
-{
- case 1: long m1;
- case 2: string m2;
-};
-
-
-valuetype VBfixed_union1 Fixed_Union1;
-
-valuetype VBvariable_union1 Variable_Union1;
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/Bug_1459.mpc b/TAO/tests/ORB_Local_Config/Bug_1459/Bug_1459.mpc
deleted file mode 100644
index 31c098be24e..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/Bug_1459.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-
-project(*) : taoserver {
- exename = Test
- includes += ../lib
- Source_Files {
- Test.cpp
- }
-}
-
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/README b/TAO/tests/ORB_Local_Config/Bug_1459/README
deleted file mode 100644
index 590c65fc374..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/README
+++ /dev/null
@@ -1,2 +0,0 @@
-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/TAO/tests/ORB_Local_Config/Bug_1459/Test.cpp b/TAO/tests/ORB_Local_Config/Bug_1459/Test.cpp
deleted file mode 100644
index 346ca6ae926..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/Test.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-
-// @author Jeff Mirwaisi <jeff_mirwaisi@yahoo.com>
-// @author Iliyan Jeliazkov <iliyan2ociweb.com>
-
-// the following is a simplification of the above problems (see
-// bugzilla 1459) and the different scenarios minus the creation of
-// the servant the service manager or threads even without the servant
-// to demonstrate that the server is capable of responding (which in
-// some cases it isnt) problems can allready be seen in the multiple
-// orb scenarios AB b isnt prompted for a new certificate password, MA
-// ssliop isnt loaded at all etc
-
-
-#include "tao/corba.h"
-#include "ace/ARGV.h"
-#include "ace/Dynamic_Service.h"
-
-/// The combination of orb instances and their configurations to test
-#define MORB_MA
-
-ACE_RCSID (tests, server, "$Id$")
-
-
-#include "Service_Configuration_Per_ORB.h"
-
-const char argA[] = "AAA -ORBId ORB-A -ORBSvcConf a.conf";
-
-// dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:server_key.pem -SSLCertificate PEM:server_cert.pem";
-// static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
-
-const char argB[] = "BBB -ORBSvcConf b.conf";
-
-// dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:client_key.pem -SSLCertificate PEM:client_cert.pem"
-// static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
-
-const char argM[] = "MMM -ORBId ORB-M -ORBSvcConf m.conf";
-
-// dynamic UIPMC_Factory Service_Object * TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() ""
-// static Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIPMC_Factory"
-// #static PortableGroup_Loader ""
-// dynamic PortableGroup_Loader Service_Object * TAO_PortableGroup:_make_TAO_PortableGroup_Loader() ""
-
-int
-testBug1459 (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testBug1459");
-
- try
- {
-
-#ifdef MORB_AB
- ACE_ARGV arg0(argA);
- int n = arg0.argc();
- CORBA::ORB_var ORBA = CORBA::ORB_init(n,arg0.argv());
-
- ACE_ARGV arg1(argB);
- n = arg1.argc();
- CORBA::ORB_var ORBB = CORBA::ORB_init(n,arg1.argv());
-#else
- ACE_UNUSED_ARG (argA);
- ACE_UNUSED_ARG (argB);
-#endif /* MORB_AB */
-
-
-
-#ifdef MORB_AM
- ACE_ARGV arg0(argA);
- int n = arg0.argc();
- CORBA::ORB_var ORBA = CORBA::ORB_init(n,arg0.argv());
-
- ACE_ARGV arg1(argM);
- n = arg1.argc();
- CORBA::ORB_var ORBB = CORBA::ORB_init(n,arg1.argv());
-#else
- ACE_UNUSED_ARG (argA);
- ACE_UNUSED_ARG (argM);
-#endif /* MORB_AM */
-
-
-
-#ifdef MORB_MA
- int n = 0;
- ACE_ARGV arg0(argM);
- n = arg0.argc();
- CORBA::ORB_var ORBA = CORBA::ORB_init(n, arg0.argv());
- if (ORBA.in () == 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to get an ORB\n")), -1);
-
- ACE_ARGV arg1(argA);
- n = arg1.argc();
- CORBA::ORB_var ORBB = CORBA::ORB_init(n, arg1.argv());
- if (ORBB.in () == 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to get a second ORB\n")), -1);
-
- if (ORBA.in () == ORBB.in ())
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Unexpected to find the two ORBs the same\n")), -1);
-
- // Look ma!! No ... services?!
-
- ACE_Service_Object *so = 0;
- int error = 0;
- so = ACE_Dynamic_Service<ACE_Service_Object>::instance ("SSLIOP_Factory");
- if (so != 0)
- {
- error++;
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT("Unexpected to find SSLIOP_Factory globally\n")));
- }
-
- so = ACE_Dynamic_Service<ACE_Service_Object>::instance ("UIPMC_Factory");
- if (so != 0)
- {
- error++;
- ACE_ERROR ((LM_DEBUG,
- ACE_TEXT("Unexpected to find ")
- ACE_TEXT("UIPMC_Factory globally\n")));
- }
-
- // Since each svc conf file causes the ORB to load the services in
- // its own service space no services are reachable through the
- // global service repo
-
- ORBA->destroy();
-
- ORBB->destroy();
-
- if (error > 0)
- return -1;
-#endif /* MORB_MA */
-
- }
- catch(const CORBA::Exception& ex)
- {
- ACE_PRINT_EXCEPTION (ex, "Unhandled exception caught");
- return -1;
- }
- catch(...)
- {
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Unexpected exception\n")), -1);
- }
-
- return 0;
-}
-
-// @brief the main driver
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- return testBug1459(argc, argv);
-}
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/a.conf b/TAO/tests/ORB_Local_Config/Bug_1459/a.conf
deleted file mode 100644
index 042a572964b..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/a.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-dynamic UIOP_Factory Service_Object * TAO_Strategies:_make_TAO_UIOP_Protocol_Factory() ""
-dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBProtocolFactory UIOP_Factory"
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/b.conf b/TAO/tests/ORB_Local_Config/Bug_1459/b.conf
deleted file mode 100644
index 9452bc3f56a..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/b.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:client_key.pem -SSLCertificate PEM:client_cert.pem"
-static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
-
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/m.conf b/TAO/tests/ORB_Local_Config/Bug_1459/m.conf
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/m.conf
+++ /dev/null
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/m1.conf b/TAO/tests/ORB_Local_Config/Bug_1459/m1.conf
deleted file mode 100644
index d9fad55aeb9..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/m1.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-dynamic PortableGroup_Loader Service_Object * TAO_PortableGroup:_make_TAO_PortableGroup_Loader() ""
-dynamic UIPMC_Factory Service_Object * TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() ""
-static Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIPMC_Factory"
-
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/run_test.pl b/TAO/tests/ORB_Local_Config/Bug_1459/run_test.pl
deleted file mode 100755
index 2b7f1395785..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- my $t1 = new PerlACE::Process ($executable, ($arguments ? $arguments : ""));
- my $status = $t1->SpawnWaitKill (10);
- if ($status != 0) {
- print STDERR "ERROR: test failed, status=$status\n";
- }
- return $status;
-}
-
-my $status = 0;
-$status |= test("Test");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/server_cert.pem b/TAO/tests/ORB_Local_Config/Bug_1459/server_cert.pem
deleted file mode 100644
index e616730ca63..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/server_cert.pem
+++ /dev/null
@@ -1,16 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICeDCCAiKgAwIBAgIBADANBgkqhkiG9w0BAQQFADBjMQswCQYDVQQGEwJVUzEL
-MAkGA1UECBMCTU8xDDAKBgNVBAcTA1NUTDELMAkGA1UEChMCV1UxDDAKBgNVBAsT
-A0RPQzELMAkGA1UEAxMCS0ExETAPBgkqhkiG9w0BCQEWAktBMB4XDTAxMDgyNzE2
-NTUxMVoXDTAxMDkyNjE2NTUxMVowYzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1P
-MQwwCgYDVQQHEwNTVEwxCzAJBgNVBAoTAldVMQwwCgYDVQQLEwNET0MxCzAJBgNV
-BAMTAktBMREwDwYJKoZIhvcNAQkBFgJLQTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC
-QQD12e2DchVPE/D1YrTcGZncLnOLRuuFf5Q2B55s6JZhT0OoLyNrqCgUHh3iRTyO
-iyeUxm/IQp8qcvs23Pqb3vLxAgMBAAGjgcAwgb0wHQYDVR0OBBYEFL8LnC8csuIX
-+TUw6FCoReB27PHoMIGNBgNVHSMEgYUwgYKAFL8LnC8csuIX+TUw6FCoReB27PHo
-oWekZTBjMQswCQYDVQQGEwJVUzELMAkGA1UECBMCTU8xDDAKBgNVBAcTA1NUTDEL
-MAkGA1UEChMCV1UxDDAKBgNVBAsTA0RPQzELMAkGA1UEAxMCS0ExETAPBgkqhkiG
-9w0BCQEWAktBggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADQQAZP9CT
-TVRxAz3Acxxxn32rsnwSeNJr1uTA4hew7f4QZ187oZia+rcFLOILrwgCmtqEmWVj
-dj6COUrqKo60BI5V
------END CERTIFICATE-----
diff --git a/TAO/tests/ORB_Local_Config/Bug_1459/server_key.pem b/TAO/tests/ORB_Local_Config/Bug_1459/server_key.pem
deleted file mode 100644
index 6facae6f3dd..00000000000
--- a/TAO/tests/ORB_Local_Config/Bug_1459/server_key.pem
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIBOwIBAAJBAPXZ7YNyFU8T8PVitNwZmdwuc4tG64V/lDYHnmzolmFPQ6gvI2uo
-KBQeHeJFPI6LJ5TGb8hCnypy+zbc+pve8vECAwEAAQJAE/fmZbW/a1PYT2X8AKCH
-sa2ILvjMqmQpWpYV1QyzIiYQPEmQ/5GMUj/t3PZd/17BOH8aPakBT/c1Gp+os6vR
-zQIhAP2RDmm6UyMrJhAtAcNC5s8nbfhKPG80Q0DZ2kiodjQfAiEA+DXqwEZlCh0j
-VPzEXY7vrdQa641zQ5XIX1S/+WbCdu8CIDT9m4V86uLuoYW/4h5sXM/t7Y119itH
-QMbMwFFu40UBAiEA9z+mN6An2BpMbsVXyiavREYMBuahkgprTeM7VHHzdssCIQCY
-QEgmpzGzfdZoREy9B7ooNeRO919lR9qvbte9vvJvWQ==
------END RSA PRIVATE KEY-----
diff --git a/TAO/tests/ORB_Local_Config/Bunch/Bunch.mpc b/TAO/tests/ORB_Local_Config/Bunch/Bunch.mpc
deleted file mode 100644
index 31c098be24e..00000000000
--- a/TAO/tests/ORB_Local_Config/Bunch/Bunch.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-
-project(*) : taoserver {
- exename = Test
- includes += ../lib
- Source_Files {
- Test.cpp
- }
-}
-
diff --git a/TAO/tests/ORB_Local_Config/Bunch/Test.cpp b/TAO/tests/ORB_Local_Config/Bunch/Test.cpp
deleted file mode 100644
index 313f9904e86..00000000000
--- a/TAO/tests/ORB_Local_Config/Bunch/Test.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-// $Id$
-
-// The following is required to be able to access
-// ace_svc_desc_TAO_*_Parser, below
-#include "tao/CORBALOC_Parser.h"
-#include "tao/CORBANAME_Parser.h"
-
-#include "ace/ARGV.h"
-#include "ace/Service_Config.h"
-#include "ace/Dynamic_Service.h"
-
-ACE_RCSID (tests, server, "$Id$")
-
-
-#include "Service_Configuration_Per_ORB.h"
-
-// @brief The "new" interfaces must be compatible with the "old" ones
-
-int
-testCompatibility (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testCompatibility");
-
- // This uses the same default ACE_Service_Repository
- ACE_Service_Gestalt_Test glob;
-
- // Use the "old" interface
- if (0 != ACE_Service_Config::process_directive
- (ace_svc_desc_TAO_CORBANAME_Parser))
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Failed to process %s\n"), ace_svc_desc_TAO_CORBANAME_Parser), -1);
-
- if(0 != ACE_Service_Config::process_directive
- (ace_svc_desc_TAO_CORBALOC_Parser))
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Failed to process %s\n"), ace_svc_desc_TAO_CORBALOC_Parser), -1);
-
- const ACE_TCHAR * svcname = 0;
-
- {
- // This uses the same default ACE_Service_Repository
- ACE_Service_Gestalt_Test one;
-
- svcname = "CORBANAME_Parser";
-
- ACE_Service_Object* p20 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, svcname);
- if ((p20 == 0))
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s locally, in one\n"), svcname), -1);
-
- svcname = "CORBALOC_Parser";
-
- ACE_Service_Object* p21 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, svcname);
- if ((p21 == 0))
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s locally, in one\n"), svcname), -1);
-
- // Exiting this scope should fini all services in the glob ...
- }
-
- svcname = "CORBANAME_Parser";
-
- ACE_Service_Object* p20 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&glob, svcname);
- if ((p20 != 0))
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s globally, too\n"), svcname), -1);
-
- svcname = "CORBALOC_Parser";
-
- ACE_Service_Object* p21 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&glob, svcname);
- if ((p21 != 0))
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s globally, too\n"), svcname), -1);
-
- return 0;
-}
-
-// @brief Test commandline processing
-
-
-int
-testCommandLineDirectives (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testCommandLineDirectives");
-
- ACE_ARGV new_argv;
- if (new_argv.add (ACE_TEXT ("-f")) == -1
- || new_argv.add (ACE_TEXT ("-S")) == -1
- || new_argv.add (ACE_TEXT ("d1")) == -1
- || new_argv.add (ACE_TEXT ("-S")) == -1
- || new_argv.add (ACE_TEXT ("d2")) == -1)
- {
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Unable to create an argv\n")), -1);
- }
-
- ACE_Service_Gestalt_Test g(5);
- if (g.parse_args (new_argv.argc (),
- new_argv.argv ()) == -1
- && errno != ENOENT)
- {
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Failed to parse the argv\n")), -1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "\tg.command_line_directives_count () -> %d\n",
- g.command_line_directives_count ()));
-
- if (2 != g.command_line_directives_count ())
- ACE_ERROR_RETURN ((LM_DEBUG,
- ACE_TEXT("Expected %d, but found %d command line directives\n"),
- 2,
- g.command_line_directives_count ()),
- -1);
-
- return 0;
-}
-
-
-
-// @brief Test the helper components used to implement the temporary
-// substitution of the repository currently used as "global" for the
-// sake of registering static services, which are dependent on a dynamic
-// service
-
-int
-testTSSGestalt (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testTSSGestalt");
-
- ACE_Service_Gestalt_Test one (10); // Localized ones go here
-
- ACE_Service_Gestalt *global_instance = ACE_Service_Config::instance ();
-
- // Sanity check
- if (global_instance == &one)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Invalid global gestalt\n")), -1);
-
- {
- // Make one be the ACE_Service_Config::instance () ...
- ACE_Service_Config_Guard temporary (&one);
-
- ACE_Service_Gestalt *global_instance2 = ACE_Service_Config::instance ();
-
- if (global_instance == global_instance2)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to see a different global from before\n")), -1);
-
- if (global_instance2 != &one)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected one to be the global gestalt instance\n")), -1);
-
- // The guard is dead! Long live the global gestalt that was previously global!
- }
-
- if (global_instance != ACE_Service_Config::instance ())
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected the original global gestalt\n")), -1);
-
- if (global_instance == &one)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Found the wrong instance is still being global\n")), -1);
-
- return 0;
-}
-
-
-
-// @brief the main driver
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- return
- testCompatibility (argc, argv)
- && testCommandLineDirectives (argc, argv)
- && testTSSGestalt(argc, argv);
-}
-
-
-
-
diff --git a/TAO/tests/ORB_Local_Config/Bunch/run_test.pl b/TAO/tests/ORB_Local_Config/Bunch/run_test.pl
deleted file mode 100755
index 2b7f1395785..00000000000
--- a/TAO/tests/ORB_Local_Config/Bunch/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- my $t1 = new PerlACE::Process ($executable, ($arguments ? $arguments : ""));
- my $status = $t1->SpawnWaitKill (10);
- if ($status != 0) {
- print STDERR "ERROR: test failed, status=$status\n";
- }
- return $status;
-}
-
-my $status = 0;
-$status |= test("Test");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_Local_Config/ORB_Local_Config.mwc b/TAO/tests/ORB_Local_Config/ORB_Local_Config.mwc
deleted file mode 100644
index b5b8a6b963e..00000000000
--- a/TAO/tests/ORB_Local_Config/ORB_Local_Config.mwc
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-workspace {
- lib
- Bunch
- Bug_1459
- Separation
- Service_Dependency
- Shared
- Simple
- Two_DLL_ORB
-}
diff --git a/TAO/tests/ORB_Local_Config/README b/TAO/tests/ORB_Local_Config/README
deleted file mode 100644
index 013590337f7..00000000000
--- a/TAO/tests/ORB_Local_Config/README
+++ /dev/null
@@ -1,50 +0,0 @@
-# $Id$
-
-This is a collection of tests for the refactoring of the Service Configurator.
-The following executables are self-sufficient test suites:
-
-These tests require ACE_wrappers/tests/Test_Output.
-
-test-bunch
-
- A collection of miscellaneous tests for
- * (testCompatibility) Compatibility of the new interfaces with the old;
- * (testCommandLineDirectives) Processing of the command-line directives;
- * (testOpenDynamicServices) Loading dynamic services in a local repository;
- * (testORBInitializer_Registry) Loading the ORBInitializer_Registry locally;
- * (testTSSGestalt) Test the helper components used to implement the
- temporary substitution of the repository currently used as "global" for the
- sake of registering static services, which are dependent on a dynamic
- service;
-
-test-dependency
-
- * Tests the working of the ACE_Dynamic_Service_Dependency class;
-
-test-new-cfg
-
- *
-
-test-orb-service
-
- * Loading a dynamic service, which initializes its own ORB;
-
-test-reusing-globals
-
- * If all default-constructor-created Service Config instances refer to the
- The One Global Configuration;
-
-test-separation
-
- * Services registered with separate repositories must remain separate
- and inaccessible through anyone but the one they were registered with
-
-test-simple
-
- * Dynamic services loading through the new interfaces;
-
-test-too-many
-
- * Testing the size limits of a gestalt
-
-The executables can be run independently, or together using the run_test.pl
diff --git a/TAO/tests/ORB_Local_Config/Separation/Separation.mpc b/TAO/tests/ORB_Local_Config/Separation/Separation.mpc
deleted file mode 100644
index 31c098be24e..00000000000
--- a/TAO/tests/ORB_Local_Config/Separation/Separation.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-
-project(*) : taoserver {
- exename = Test
- includes += ../lib
- Source_Files {
- Test.cpp
- }
-}
-
diff --git a/TAO/tests/ORB_Local_Config/Separation/Test.cpp b/TAO/tests/ORB_Local_Config/Separation/Test.cpp
deleted file mode 100644
index 043b68087ea..00000000000
--- a/TAO/tests/ORB_Local_Config/Separation/Test.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id$
-
-#include "tao/CORBANAME_Parser.h"
-#include "tao/CORBALOC_Parser.h"
-#include "tao/IIOP_Factory.h"
-
-#include "ace/Service_Config.h"
-#include "ace/Dynamic_Service.h"
-
-#include "Service_Configuration_Per_ORB.h"
-
-// @brief Services registered with separate repositories must remain separate
-// and inaccesible through anyone but the one they were gegistered with
-
-int
-testSeparation(int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testSeparation");
-
- ACE_Service_Gestalt_Test one (10);
- one.process_directive (ace_svc_desc_TAO_CORBANAME_Parser);
-
- ACE_Service_Gestalt_Test two (10);
- two.process_directive (ace_svc_desc_TAO_CORBALOC_Parser);
-
- const ACE_TCHAR * svcname = "IIOP_Factory";
-
- TAO_Protocol_Factory* p10 =
- ACE_Dynamic_Service<TAO_Protocol_Factory>::instance (&one, svcname);
- if (p10 != 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Not expected %s locally in one\n"), svcname), -1);
-
- TAO_Protocol_Factory* p11 =
- ACE_Dynamic_Service<TAO_Protocol_Factory>::instance (&two, "IIOP_Factory");
- if (p11 != 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Not expected %s locally in two\n"), svcname), -1);
-
- svcname = "CORBANAME_Parser";
-
- ACE_Service_Object* p20 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, svcname);
- if (p20 == 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s locally, in one\n"), svcname), -1);
-
- ACE_Service_Object* p31 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&two, svcname);
- if (p31 != 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Not expected %s locally, in two\n"), svcname), -1);
-
- svcname = "CORBALOC_Parser";
-
- ACE_Service_Object* p21 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, svcname);
- if (p21 != 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Not expected %s locally, in one\n"), svcname), -1);
-
- ACE_Service_Object* p30 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&two, svcname);
- if (p30 == 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s locally, in two\n"), svcname), -1);
-
- return 0;
-}
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- return testSeparation (argc, argv);
-}
-
-
diff --git a/TAO/tests/ORB_Local_Config/Separation/run_test.pl b/TAO/tests/ORB_Local_Config/Separation/run_test.pl
deleted file mode 100755
index 2b7f1395785..00000000000
--- a/TAO/tests/ORB_Local_Config/Separation/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- my $t1 = new PerlACE::Process ($executable, ($arguments ? $arguments : ""));
- my $status = $t1->SpawnWaitKill (10);
- if ($status != 0) {
- print STDERR "ERROR: test failed, status=$status\n";
- }
- return $status;
-}
-
-my $status = 0;
-$status |= test("Test");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.cpp b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.cpp
deleted file mode 100644
index 2ffbdab6f80..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// -*- C++ -*-
-
-#include "Service_Config_DLL.h"
-#include "ace/Service_Config.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (tests,
- Service_Config_DLL,
- "$Id$")
-
-static ACE_THR_FUNC_RETURN
-invoke_service_config (void *arg)
-{
- const ACE_TCHAR *directive = reinterpret_cast<const ACE_TCHAR *> (arg);
-
-
- // Process a Service Configurator directive in the current thread.
- if (ACE_Service_Config::process_directive (directive) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Service_Config_DLL::svc() - ")
- ACE_TEXT ("process_directive() failed for:\n")
- ACE_TEXT ("\"%s\"\n"),
- directive));
-
- return 0;
-}
-
-Service_Config_DLL::Service_Config_DLL (void)
-{
- ACE_OS::memset (this->directive_[0], 0, BUFSIZ * sizeof (ACE_TCHAR));
- ACE_OS::memset (this->directive_[1], 0, BUFSIZ * sizeof (ACE_TCHAR));
-}
-
-int
-Service_Config_DLL::init (int argc, ACE_TCHAR *argv[])
-{
- if (argc == 2)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Loading Test_Object_%s and Test_Object_%s\n"),
- argv[0],
- argv[1]));
-
- ACE_OS::sprintf (this->directive_[0],
-#if (ACE_USES_CLASSIC_SVC_CONF == 1)
- ACE_TEXT ("dynamic Test_Object_%s Service_Object * Service_Config_Dependent_DLL:_make_Service_Config_DLL() \"Test_Object_%s\""),
-#else
- ACE_TEXT ("<?xml version='1.0'?> <dynamic id='Test_Object_%s' type='service_object'> <initializer init='_make_Service_Config_DLL' path='Service_Config_Dependent_DLL' params='Test_Object_%s'/> </dynamic>"),
-#endif
- argv[0],
- argv[0]);
-
- ACE_OS::sprintf (this->directive_[1],
-#if (ACE_USES_CLASSIC_SVC_CONF == 1)
- ACE_TEXT ("dynamic Test_Object_%s Service_Object * Service_Config_Dependent_DLL:_make_Service_Config_DLL() \"Test_Object_%s\""),
-#else
- ACE_TEXT ("<?xml version='1.0'?> <dynamic id='Test_Object_%s' type='service_object'> <initializer init='_make_Service_Config_DLL' path='Service_Config_Dependent_DLL' params='Test_Object_%s'/> </dynamic>"),
-#endif
-
- argv[1],
- argv[1]);
-
- if (ACE_Service_Config::process_directive (this->directive_[0]) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Service_Config_DLL::init() - ")
- ACE_TEXT ("process_directive() failed for:\n")
- ACE_TEXT ("\"%s\"\n"),
- this->directive_[0]));
-
-#if defined (ACE_HAS_THREADS)
-
- // Become an Active Object if more than one argument passed.
- // Two arguments indicate two "test objects" to be dynamically
- // loaded.
- return this->activate ();
-
-#endif /* ACE_HAS_THREADS */
-
- }
- else if (argc == 1)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Service_Config_DLL::init () - %s\n"),
- argv[0]));
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Incorrect number of arguments ")
- ACE_TEXT ("(%d) passed to Service_Config_DLL::init ()"),
- argc),
- -1);
- }
-
- return 0;
-}
-
-int
-Service_Config_DLL::fini (void)
-{
- return 0;
-}
-
-int
-Service_Config_DLL::svc (void)
-{
- if (ACE_Thread_Manager::instance ()->spawn (invoke_service_config,
- this->directive_[1]) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Unable to spawn thread to ")
- ACE_TEXT ("invoke Service Configurator.\n")),
- -1);
-
- return 0;
-}
-
-// The same class (Service_Config_DLL) is used to implement each of the
-// Service Objects whose service descriptors are defined below.
-
-// -----------------------------------------------------------------
-
-ACE_STATIC_SVC_DEFINE (Test_Object_1,
- ACE_TEXT ("Test_Object_1"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Service_Config_DLL),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-// -----------------------------------------------------------------
-
-ACE_STATIC_SVC_DEFINE (Test_Object_2,
- ACE_TEXT ("Test_Object_2"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Service_Config_DLL),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-// -----------------------------------------------------------------
-
-ACE_STATIC_SVC_DEFINE (Test_Object_3,
- ACE_TEXT ("Test_Object_3"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Service_Config_DLL),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-// -----------------------------------------------------------------
-
-ACE_STATIC_SVC_DEFINE (Test_Object_4,
- ACE_TEXT ("Test_Object_4"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Service_Config_DLL),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-// -----------------------------------------------------------------
-
-ACE_STATIC_SVC_DEFINE (Test_Object_5,
- ACE_TEXT ("Test_Object_5"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Service_Config_DLL),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-// -----------------------------------------------------------------
-
-ACE_STATIC_SVC_DEFINE (Test_Object_6,
- ACE_TEXT ("Test_Object_6"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Service_Config_DLL),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-// -----------------------------------------------------------------
-
-ACE_STATIC_SVC_DEFINE (Final_Object,
- ACE_TEXT ("Final_Object"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Service_Config_DLL),
- ACE_Service_Type::DELETE_THIS
- | ACE_Service_Type::DELETE_OBJ,
- 0)
-
-// -----------------------------------------------------------------
-
-// Same factory is used for all service descriptors defined above.
-ACE_FACTORY_DEFINE (Service_Config_DLL, Service_Config_DLL)
-
-
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.h b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.h
deleted file mode 100644
index 3875b70aef8..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Service_Config_DLL.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef SERVICE_CONFIG_DLL_H
-#define SERVICE_CONFIG_DLL_H
-
-#include /**/ "ace/pre.h"
-
-#include "Service_Config_DLL_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.h"
-
-/**
- * @class Service_Config_DLL
- *
- * @brief The Service_Config_DLL that is instantiated when the
- * client-side test module/library is dynamically loaded.
- *
- * This class is the implementation used for all service instances
- * (i.e. those declared using the ACE_FACTORY_* macros).
- */
-class Service_Config_DLL_Export Service_Config_DLL : public ACE_Task_Base
-{
-public:
-
- /// Constructor.
- Service_Config_DLL (void);
-
- /// Initializes object when dynamic linking occurs.
- virtual int init (int argc, ACE_TCHAR *argv[]);
-
- /// Terminates object when dynamic unlinking occurs.
- virtual int fini (void);
-
- /// Run by a daemon thread.
- /**
- * Each thread will invoke the Service Configurator via this
- * method unless the object is the "FINAL" object.
- */
- virtual int svc (void);
-
-private:
-
- /// Directives to be passed to be processed by the Service
- /// Configurator in seperate threads.
- ACE_TCHAR directive_[2][BUFSIZ];
-
-};
-
-
-ACE_FACTORY_DECLARE (Service_Config_DLL, Service_Config_DLL)
-
-
-#include /**/ "ace/post.h"
-
-#endif /* SERVICE_CONFIG_DLL_H */
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL_Export.h b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL_Export.h
deleted file mode 100644
index 1688a745350..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_DLL_Export.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef SERVICE_CONFIG_DLL_EXPORT_H
-#define SERVICE_CONFIG_DLL_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (SERVICE_CONFIG_DLL_HAS_DLL)
-# define SERVICE_CONFIG_DLL_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && ! SERVICE_CONFIG_DLL_HAS_DLL */
-
-#if !defined (SERVICE_CONFIG_DLL_HAS_DLL)
-# define SERVICE_CONFIG_DLL_HAS_DLL 1
-#endif /* ! TEST_HAS_DLL */
-
-#if defined (SERVICE_CONFIG_DLL_HAS_DLL) && (SERVICE_CONFIG_DLL_HAS_DLL == 1)
-# if defined (SERVICE_CONFIG_DLL_BUILD_DLL)
-# define Service_Config_DLL_Export ACE_Proper_Export_Flag
-# define TEST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* SERVICE_CONFIG_DLL_BUILD_DLL */
-# define Service_Config_DLL_Export ACE_Proper_Import_Flag
-# define TEST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* SERVICE_CONFIG_DLL_BUILD_DLL */
-#else /* SERVICE_CONFIG_DLL_HAS_DLL == 1 */
-# define Service_Config_DLL_Export
-# define TEST_SINGLETON_DECLARATION(T)
-# define TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* SERVICE_CONFIG_DLL_HAS_DLL == 1 */
-
-#endif /* SERVICE_CONFIG_DLL_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.conf b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.conf
deleted file mode 100644
index e5d36fd215f..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.conf
+++ /dev/null
Binary files differ
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.conf.xml b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.conf.xml
deleted file mode 100644
index 1d75d2763c0..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.UTF-16.conf.xml
+++ /dev/null
Binary files differ
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.conf b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.conf
deleted file mode 100644
index a36db0600c9..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.conf
+++ /dev/null
Binary files differ
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.conf.xml b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.conf.xml
deleted file mode 100644
index 88e7c26e8eb..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.WCHAR_T.conf.xml
+++ /dev/null
Binary files differ
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf
deleted file mode 100644
index 9001bd8266b..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# Dynamically loading each of the Service Objects below causes a
-# number of threads to be spawned, each one invoking the Service
-# Configurator (e.g. ACE_Service_Config::process_directive(). If the
-# Service Configurator is thread safe and reentrant, then parsing of
-# this `Service_Config_Test.conf' file should run to completion
-# without error.
-#
-# Test_Object_1 will cause Test_Object_2 and Test_Object_3 to be
-# dynamically loaded. Dynamic loading of each of object will occur in
-# a separate thread.
-dynamic Test_Object_1 Service_Object * Service_Config_Dependent_DLL:_make_Service_Config_DLL() "2 3"
-
-# Test_Object_4 will cause Test_Object_5 and Test_Object_6 to be
-# dynamically loaded. Dynamic loading of each of object will occur in
-# a separate thread.
-dynamic Test_Object_4 Service_Object * Service_Config_Dependent_DLL:_make_Service_Config_DLL() "5 6"
-
-# Final_Object does nothing but print a completion message.
-dynamic Final_Object Service_Object * Service_Config_Dependent_DLL:_make_Service_Config_DLL() "FINAL"
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf.xml b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf.xml
deleted file mode 100644
index f3273f0cb93..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Config_Test.conf.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from Service_Config_Test.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Dynamically loading each of the Service Objects below causes a -->
- <!-- number of threads to be spawned, each one invoking the Service -->
- <!-- Configurator (e.g. ACE_Service_Config::process_directive(). If the -->
- <!-- Service Configurator is thread safe and reentrant, then parsing of -->
- <!-- this `Service_Config_Test.conf' file should run to completion -->
- <!-- without error. -->
- <!-- -->
- <!-- Test_Object_1 will cause Test_Object_2 and Test_Object_3 to be -->
- <!-- dynamically loaded. Dynamic loading of each of object will occur in -->
- <!-- a separate thread. -->
- <dynamic id="Test_Object_1" type="Service_Object">
- <initializer init="_make_Service_Config_DLL" path="Service_Config_DLL" params="2 3"/>
- </dynamic>
- <!-- Test_Object_4 will cause Test_Object_5 and Test_Object_6 to be -->
- <!-- dynamically loaded. Dynamic loading of each of object will occur in -->
- <!-- a separate thread. -->
- <dynamic id="Test_Object_4" type="Service_Object">
- <initializer init="_make_Service_Config_DLL" path="Service_Config_DLL" params="5 6"/>
- </dynamic>
- <!-- Final_Object does nothing but print a completion message. -->
- <dynamic id="Final_Object" type="Service_Object">
- <initializer init="_make_Service_Config_DLL" path="Service_Config_DLL" params="FINAL"/>
- </dynamic>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Dependency.mpc b/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Dependency.mpc
deleted file mode 100644
index 4db591a7c44..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Service_Dependency.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*) : taoserver {
- after += Service_Config_Dependent_DLL TAO
- exename = Test
- includes += ../lib
- Source_Files {
- Test.cpp
- }
-}
-
-project(Service Config Dependent DLL) : acelib {
- sharedname = Service_Config_Dependent_DLL
- dynamicflags = SERVICE_CONFIG_DLL_BUILD_DLL
-
- includes += ../lib
-
- Source_Files {
- Service_Config_DLL.cpp
- }
- Header_Files {
- Service_Config_DLL.h
- Service_Config_DLL_Export.h
- }
-}
-
-
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp b/TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp
deleted file mode 100644
index 79991afccc0..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp
+++ /dev/null
@@ -1,345 +0,0 @@
-// $Id$
-
-#include "tao/Codeset_Descriptor_Base.h"
-#include "tao/Codeset_Manager_Factory_Base.h"
-#include "tao/Codeset_Manager.h"
-#include "tao/ORBInitializer_Registry_Adapter.h"
-
-#include "ace/ARGV.h"
-#include "ace/Dynamic_Service.h"
-#include "ace/Dynamic_Service_Dependency.h"
-#include "ace/Thread_Manager.h"
-
-#include "Service_Configuration_Per_ORB.h"
-
-// Return the name of the service configuration file, based on the current ACE
-// support for wide characters and unicode
-/// Borrowing this from the $ACE_ROOT/test/Service_Config_Test
-/// The various config files have the same effect of loading 5
-/// new service objects.
-
-const ACE_TCHAR*
-file_Service_Config_Test ()
-{
-#if defined (ACE_USES_WCHAR)
- // When using full Unicode support, use the version of the Service
- // Configurator file appropriate to the platform.
- // For example, Windows Unicode uses UTF-16.
- //
- // iconv(1) found on Linux and Solaris, for example, can
- // be used to convert between encodings.
- //
- // Byte ordering is also an issue, so we should be
- // generating this file on-the-fly from the UTF-8 encoded
- // file by using functions like iconv(1) or iconv(3).
-# if defined (ACE_WIN32)
- static const ACE_TCHAR svc_conf[] =
- ACE_TEXT ("Service_Config_Test.UTF-16")
- ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT);
-# else
- static const ACE_TCHAR svc_conf[] =
- ACE_TEXT ("Service_Config_Test.WCHAR_T")
- ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT);
-# endif /* ACE_WIN32 */
-#else
- // ASCII (UTF-8) encoded Service Configurator file.
- static const ACE_TCHAR svc_conf[] =
- ACE_TEXT ("Service_Config_Test")
- ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT);
-#endif /* ACE_USES_WCHAR */
-
- return svc_conf;
-}
-
-
-// @brief Loading dynamic services in a local repository
-
-int
-testOpenDynamicServices (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testOpenDynamicServices");
-
- ACE_ARGV new_argv;
-
- // Process the Service Configurator directives in this test's
- if (false == (new_argv.add (ACE_TEXT ("bogus")) != -1
- && new_argv.add (ACE_TEXT ("-f")) != -1
- && new_argv.add (file_Service_Config_Test ()) != -1))
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Failed to build an argv\n")));
- return -1;
- }
-
- // We need this scope to make sure that the destructor for the
- // <ACE_Service_Config> gets called.
- ACE_Service_Gestalt_Test daemon(10);
-
- if (daemon.open (new_argv.argc (),
- new_argv.argv ()) == -1 && errno == ENOENT)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to open service config\n")));
- return -1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\tdaemon.services_count () -> %d\n",
- daemon.services_count ()));
-
- if (5 != daemon.services_count ())
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Expected %d service, but found %d instead\n"), 5, daemon.services_count ()));
- return -1;
- }
-
- // Since the loaded services start their own threads, wait until all
- // of them are done to avoid pulling the rug under their feet.
- ACE_Thread_Manager::instance ()->wait ();
- return 0;
-}
-
-
-
-
-
-// @brief Try loading the ORBInitializer_Registry locally
-
-int
-testORBInitializer_Registry (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testORBInitializer_Registry");
-
- ACE_Service_Gestalt_Test glob; // for global service registrations
- ACE_Service_Gestalt_Test one (10); // Localized ones go here
-
- size_t glob_size = glob.services_count ();
- size_t loca_size = one.services_count ();
-
- // It is expected to be empty at this point since it is not using
- // the global repo
- if (loca_size != 0)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Expected empty repository\n")));
- return -1;
- }
-
- // Lookup it up.
- TAO::ORBInitializer_Registry_Adapter* oir =
- ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
- (&one, "ORBInitializer_Registry");
-
-#if defined (TAO_AS_STATIC_LIBS)
- if ((oir == 0))
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Expected to find staticaly linked ORBInitializer_Registry\n")));
- return -1;
- }
-#else
- if (oir != 0)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Not expected to find ORBInitializer_Registry\n")));
- return -1;
- }
-#endif
-
-
-#if !defined (TAO_AS_STATIC_LIBS)
- // In case we build shared, try to load the PI Client library, in a
- // static build we just can't do this, so don't try it, lower layers
- // output an error then.
- if (oir == 0)
- {
- one.process_directive (
- ACE_DYNAMIC_SERVICE_DIRECTIVE("ORBInitializer_Registry",
- "TAO_PI",
- "_make_ORBInitializer_Registry",
- ""));
- oir =
- ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
- (&one, "ORBInitializer_Registry");
- }
- if (oir == 0)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Expected to find ORBInitializer_Registry\n")));
- return -1;
- }
-#endif
-
-
- if (glob_size != glob.services_count ())
- {
- ACE_ERROR ((LM_ERROR,
- "Expected %d local static service registrations, found %d\n",
- glob_size,
- glob.services_count ()));
- return -1;
- }
-
- // The local repository must have asquired also the static services
- // registered within the dynamic service we just loaded. As of this
- // writing, loading ORBInitializer_Registry causes the registration of
- // four other (static) services. The PolicyFactory_Loader,
- // ClientRequestInterceptor_Adapter_Factory and PICurrent_Loader are
- // registred explicitely, while CodecFactory_Loader - indirectly.
-
- if (loca_size == one.services_count ())
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Expected to find additional services present\n")));
- return -1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) try global dynamic service"
- " on ORBInitializer_Registry ...\n"));
-
- // Try to instantiate the dynamic service from the global repository ...
- TAO::ORBInitializer_Registry_Adapter* oir1 =
- ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
- ("ORBInitializer_Registry");
-
-
-// Right! It should not have been global.
- if (oir1 != 0)
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Unexpected to find ORBInitializer_Registry\n")),
- -1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) try local dynamic service"
- " on ORBInitializer_Registry ...\n"));
-
- // Try to instantiate the dynamic service from the local repository ...
- TAO::ORBInitializer_Registry_Adapter* oir2 =
- ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
- (&one, "ORBInitializer_Registry");
-
- // Right! That's local.
- if (oir2 == 0)
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Expected to find ORBInitializer_Registry locally\n")),
- -1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Explicitely initialize ORBInitializer_Registry"
- " (although Dynamic_Service already did it) ...\n"));
-
- // ... initialize, but note that without the guard there is nothing to tell
- // the service which gestalt must be used. If init() does static service
- // registrations, those may end up in the wrong (global) gestalt and will
- // be in memory, which may not be mapped by finalization time!
- {
- ACE_Service_Config_Guard guard (&one);
- oir2->init (0,0);
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Try dynamic_service on a "
- "dependent static service (CodecFactory_Loader) ...\n"));
-
- // ... and also one of the dependent static services
- if (0 == ACE_Dynamic_Service <ACE_Service_Object>::instance
- (&one, "CodecFactory_Loader"))
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Expected to find CodecFactory_Loader locally\n")),
- -1);
-
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Explicitely dynamic_service PolicyFactory_Loader"
- " (although ORBInitializer_Registry already did it) ...\n"));
-
- one.process_directive
- (ACE_DYNAMIC_SERVICE_DIRECTIVE("PolicyFactory_Loader",
- "TAO_PI",
- "_make_TAO_PolicyFactory_Loader",
- ""));
-
-
- if (0 == ACE_Dynamic_Service <ACE_Service_Object>::instance
- (&one, "PolicyFactory_Loader"))
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Expected to find PolicyFactory_Loader locally\n")),
- -1);
-
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) We're done testing.\n"));
- return 0;
-}
-
-
-
-// @brief ...
-
-
-int
-testServiceDependency (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testServiceDependency");
-
- ACE_DEBUG ((LM_DEBUG, "sizeof (ACE_DLL) == %d\n", sizeof (ACE_DLL)));
- ACE_DEBUG ((LM_DEBUG, "sizeof (ACE_Dynamic_Service_Dependency) == %d\n",
- sizeof (ACE_Dynamic_Service_Dependency)));
-
- TAO_Codeset_Manager *codeset_manager = 0;
- ACE_Dynamic_Service_Dependency *pdep = 0;
-
- {
- // Start a block to limit the lifespan of a gestalt
- ACE_Service_Gestalt_Test one (10);
-
- int result = one.process_directive
- (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_Codeset",
- "TAO_Codeset",
- "_make_TAO_Codeset_Manager_Factory",
- ""));
- if (result != 0)
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Expected to register TAO_Codeset successfuly\n")),
- -1);
-
- TAO_Codeset_Manager_Factory_Base *factory =
- ACE_Dynamic_Service<TAO_Codeset_Manager_Factory_Base>::instance
- (&one, "TAO_Codeset");
-
- if (factory == 0)
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Expected to obtain an instance successfuly\n")),
- -1);
-
- codeset_manager = factory->create ();
- if (codeset_manager == 0)
-
- ACE_DEBUG ((LM_DEBUG, "Creating dependency ...\n"));
-
- // [1]
- //
- // Stating that a thing depends on that dynamic service. Why?
- // Read on ...
-
- pdep = new ACE_Dynamic_Service_Dependency (&one, "TAO_Codeset");
-
- // This would ordinarily cause the dynamic services to get
- // unloaded and their DLL's unmapped ...
- }
-
- // ... therefore the following code would crash miserably because it
- // needs the ~TAO_Codeset_Manager()'s code, which is in the
- // (unlodaed) DLL's text segment ...
- delete codeset_manager;
-
- // ... unless of course we used the magic dependency statement,
- // above - [1]
- delete pdep;
-
- return 0;
-}
-
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- return
- testServiceDependency (argc, argv)
- && testOpenDynamicServices (argc, argv)
- && testORBInitializer_Registry(argc, argv);
-}
diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/run_test.pl b/TAO/tests/ORB_Local_Config/Service_Dependency/run_test.pl
deleted file mode 100755
index 2b7f1395785..00000000000
--- a/TAO/tests/ORB_Local_Config/Service_Dependency/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- my $t1 = new PerlACE::Process ($executable, ($arguments ? $arguments : ""));
- my $status = $t1->SpawnWaitKill (10);
- if ($status != 0) {
- print STDERR "ERROR: test failed, status=$status\n";
- }
- return $status;
-}
-
-my $status = 0;
-$status |= test("Test");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_Local_Config/Shared/Shared.mpc b/TAO/tests/ORB_Local_Config/Shared/Shared.mpc
deleted file mode 100644
index 31c098be24e..00000000000
--- a/TAO/tests/ORB_Local_Config/Shared/Shared.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-
-project(*) : taoserver {
- exename = Test
- includes += ../lib
- Source_Files {
- Test.cpp
- }
-}
-
diff --git a/TAO/tests/ORB_Local_Config/Shared/Test.cpp b/TAO/tests/ORB_Local_Config/Shared/Test.cpp
deleted file mode 100644
index 9aefa087a93..00000000000
--- a/TAO/tests/ORB_Local_Config/Shared/Test.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-#include "tao/CORBANAME_Parser.h"
-#include "tao/CORBALOC_Parser.h"
-#include "tao/Protocol_Factory.h"
-#include "ace/Dynamic_Service.h"
-
-#include "Service_Configuration_Per_ORB.h"
-
-// @brief All default-constructor-created Service Config instabces referr to the
-// The One Global Configuration
-
-int
-testReusingGlobals (int , ACE_TCHAR *[])
-{
- ACE_TRACE ("testReusingGlobals");
-
- {
- ACE_Service_Gestalt/*_Test*/ one (10, false) ; // The ACE_Service_Gestalt_Test will teardown all!
- one.process_directive (ace_svc_desc_TAO_CORBANAME_Parser);
- one.process_directive (ace_svc_desc_TAO_CORBALOC_Parser);
-
- const ACE_TCHAR *svcname = ACE_TEXT ("IIOP_Factory");
- TAO_Protocol_Factory* p1 =
- ACE_Dynamic_Service<TAO_Protocol_Factory>::instance (&one, svcname);
-
- if (p1 != 0)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Not expected to find %s locally\n"), svcname));
- return -1;
- }
-
- svcname = ACE_TEXT ("CORBANAME_Parser");
- ACE_Service_Object* p2 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, svcname);
-
- if (p2 == 0)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Expected to find %s localy\n"), svcname));
- return -1;
- }
-
- svcname = ACE_TEXT ("CORBALOC_Parser");
- ACE_Service_Object* p3 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, svcname);
-
- if (p3 == 0)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Expected to find %s locally\n"), svcname));
- return -1;
- }
- }
-
-
- ACE_Service_Gestalt_Test two; // Use the ACE_Service_Repository::instance ()
-
- const ACE_TCHAR *svcname = ACE_TEXT ("IIOP_Factory");
- TAO_Protocol_Factory* p1 =
- ACE_Dynamic_Service<TAO_Protocol_Factory>::instance (&two, svcname);
-
- if (p1 != 0)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Not expected to find %s in the global repo\n"), svcname));
- return -1;
- }
-
- svcname = ACE_TEXT ("CORBANAME_Parser");
- ACE_Service_Object* p2 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&two, svcname);
-
- if (p2 == 0) // You should be able to find the same stuff here, too
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Not expected to find %s in the global repo\n"), svcname));
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- return testReusingGlobals (argc, argv);
-}
-
diff --git a/TAO/tests/ORB_Local_Config/Shared/run_test.pl b/TAO/tests/ORB_Local_Config/Shared/run_test.pl
deleted file mode 100755
index 2b7f1395785..00000000000
--- a/TAO/tests/ORB_Local_Config/Shared/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- my $t1 = new PerlACE::Process ($executable, ($arguments ? $arguments : ""));
- my $status = $t1->SpawnWaitKill (10);
- if ($status != 0) {
- print STDERR "ERROR: test failed, status=$status\n";
- }
- return $status;
-}
-
-my $status = 0;
-$status |= test("Test");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_Local_Config/Simple/Simple.mpc b/TAO/tests/ORB_Local_Config/Simple/Simple.mpc
deleted file mode 100644
index 31c098be24e..00000000000
--- a/TAO/tests/ORB_Local_Config/Simple/Simple.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-
-project(*) : taoserver {
- exename = Test
- includes += ../lib
- Source_Files {
- Test.cpp
- }
-}
-
diff --git a/TAO/tests/ORB_Local_Config/Simple/Test.cpp b/TAO/tests/ORB_Local_Config/Simple/Test.cpp
deleted file mode 100644
index a93e129d932..00000000000
--- a/TAO/tests/ORB_Local_Config/Simple/Test.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// $Id$
-
-#include "tao/CORBANAME_Parser.h"
-#include "tao/CORBALOC_Parser.h"
-#include "tao/Protocol_Factory.h"
-#include "ace/Dynamic_Service.h"
-
-#include "Service_Configuration_Per_ORB.h"
-
-
-// @brief Dynamic services loading
-
-int
-ACE_TMAIN (int, ACE_TCHAR *[])
-{
- ACE_Service_Gestalt_Test one; // Use the ACE_Service_Repository::instance ()
-
- one.process_directive (ace_svc_desc_TAO_CORBANAME_Parser);
- one.process_directive (ace_svc_desc_TAO_CORBALOC_Parser);
-
- TAO_Protocol_Factory* p1 =
- ACE_Dynamic_Service<TAO_Protocol_Factory>::instance (&one, "IIOP_Factory");
-
- if (p1 != 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Unexpected to find IIOP_Factory\n")), -1);
-
- ACE_Service_Object* p2 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, "CORBANAME_Parser");
-
- if (p2 == 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to find CORBANAME_Parser\n")), -1);
-
- ACE_Service_Object* p3 =
- ACE_Dynamic_Service<ACE_Service_Object>::instance (&one, "CORBALOC_Parser");
-
- if (p3 == 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to find CORBALOC_Parser\n")), -1);
-
- return 0;
-}
diff --git a/TAO/tests/ORB_Local_Config/Simple/run_test.pl b/TAO/tests/ORB_Local_Config/Simple/run_test.pl
deleted file mode 100755
index 2b7f1395785..00000000000
--- a/TAO/tests/ORB_Local_Config/Simple/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- my $t1 = new PerlACE::Process ($executable, ($arguments ? $arguments : ""));
- my $status = $t1->SpawnWaitKill (10);
- if ($status != 0) {
- print STDERR "ERROR: test failed, status=$status\n";
- }
- return $status;
-}
-
-my $status = 0;
-$status |= test("Test");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp
deleted file mode 100644
index 5e1e673e8c3..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// -*- C++ -*-
-
-#include "ORB_DLL.h"
-#include "ace/Service_Config.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_strings.h"
-
-#include "ace/Arg_Shifter.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (tests,
- ORB_DLL,
- "$Id$")
-
-
-//
-Abstract_Worker::Abstract_Worker (const char* s)
- : ior_file_ (s)
-{
-}
-
-//
-Abstract_Worker::~Abstract_Worker (void)
-{
-}
-
-
-//
-Service_Config_ORB_DLL::Service_Config_ORB_DLL (void)
- : is_server_ (-1)
- , worker_ (0)
- , argv_ (0)
-{
-}
-
-//
-Service_Config_ORB_DLL::~Service_Config_ORB_DLL (void)
-{
-}
-
-//
-int
-Service_Config_ORB_DLL::init (int argc, ACE_TCHAR *argv[])
-{
- ACE_Arg_Shifter arg_shifter (argc, argv);
-
- while (arg_shifter.is_anything_left ())
- {
- if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-c")) == 0)
- {
- this->is_server_ = 0;
- arg_shifter.consume_arg();
- }
- else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-s")) == 0)
- {
- this->is_server_ = 1;
- arg_shifter.consume_arg();
- }
- else
- arg_shifter.ignore_arg();
- }
-
- if (this->is_server_ < 0)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) You must specify -c(lient) or -s(erver) argument. Aborting."), -1);
-
- ACE_TCHAR **temp_argv = new ACE_TCHAR*[argc+1];
- for (int i = 0; i < argc; i++)
- {
- temp_argv[i] = new ACE_TCHAR[ACE_OS::strlen(argv[i])+1];
- ACE_OS::strcpy (temp_argv[i],argv[i]);
- }
- temp_argv[argc] = 0;
-
- ACE_ARGV* tmp = 0;
- ACE_NEW_RETURN (tmp, ACE_ARGV (temp_argv), -1);
- this->argv_.reset (tmp);
- for (int i = 0; i < argc; i++)
- delete [] temp_argv[i];
- delete [] temp_argv;
-
- Abstract_Worker* worker = 0;
- if (this->is_server_)
- {
- ACE_NEW_RETURN (worker, Server_Worker, -1);
- }
- else
- {
- ACE_NEW_RETURN (worker, Client_Worker, -1);
- }
- this->worker_.reset (worker);
-
-#if defined (ACE_HAS_THREADS)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) About to activate %s, argv[%d]=\'%s\' ...\n"),
- this->worker_->kind (),
- this->argv_->argc (),
- this->argv_->buf ()));
-
- // Become an Active Object if more than one argument passed.
- // Two arguments indicate two "test objects" to be dynamically
- // loaded.
- return this->activate ();
-#else
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) Threading support is required for this test. Aborting.")), -1);
-#endif /* ACE_HAS_THREADS */
-}
-
-int
-Service_Config_ORB_DLL::svc (void)
-{
- ACE_ASSERT (this->worker_.get () != 0);
- ACE_ASSERT (this->argv_.get () != 0);
-
- ACE_DECLARE_NEW_ENV;
- ACE_TRY
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) %@ %s is active, argv[%d]=\'%s\'\n"),
- this,
- this->worker_->kind (),
- this->argv_->argc (),
- this->argv_->buf ()));
-
- int ret = this->worker_->test_main (this->argv_->argc (),
- this->argv_->argv ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) %@ %s bows out - so long, cruel world! (%d)\n"),
- this,
- this->worker_->kind (),
- ret));
- return ret;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION(ACE_ANY_EXCEPTION, ACE_TEXT("Failure:"));
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Aborting.\n")),
- -1);
- }
- ACE_ENDTRY;
-
-}
-
-
-// Define our service for using with the Service Configurator
-ACE_FACTORY_DEFINE (Service_Config_ORB_DLL, Service_Config_ORB_DLL)
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h
deleted file mode 100644
index 014c185315d..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ORB_DLL.h
- *
- * $Id$
- *
- * @author Iliyan Jeliazkov <iliyan@ociweb.com>
- */
-//=============================================================================
-
-#ifndef SERVICE_CONFIG_ORB_DLL_H
-#define SERVICE_CONFIG_ORB_DLL_H
-
-#include /**/ "ace/pre.h"
-
-#include "ORB_DLL_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.h"
-#include "ace/ARGV.h"
-#include "ace/String_Base.h"
-#include "tao/ORB.h"
-
-///
-class Abstract_Worker
-{
-public:
- Abstract_Worker (const char* ior);
- virtual ~Abstract_Worker (void);
- virtual int test_main (int argc,
- ACE_TCHAR *argv[] ACE_ENV_ARG_DECL_WITH_DEFAULTS) = 0;
- virtual const ACE_TCHAR * kind (void) const = 0;
-protected:
- ACE_TString ior_file_;
-};
-
-/**
- * A server kind of test
- */
-class Server_Worker : public Abstract_Worker
-{
-public:
- Server_Worker ();
- ~Server_Worker (void);
- int test_main (int argc, ACE_TCHAR *argv[] ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- const ACE_TCHAR * kind (void) const;
-
-private:
- int parse_args (int argc, ACE_TCHAR *argv[]);
-};
-
-/**
- * A client kind of test
- */
-class Client_Worker : public Abstract_Worker
-{
-public:
- Client_Worker ();
- ~Client_Worker (void);
- int test_main (int argc, ACE_TCHAR *argv[] ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- const ACE_TCHAR * kind (void) const;
-
-private:
- int parse_args (int argc, ACE_TCHAR *argv[]);
-};
-
-
-/**
- * @class Service_Config_ORB_DLL
- *
- * @brief The Service_Config_ORB_DLL that is instantiated when the
- * client-side test module/library is dynamically loaded.
- *
- */
-class Service_Config_ORB_DLL_Export Service_Config_ORB_DLL
- : public ACE_Task_Base
-{
-public:
-
- /// Constructor.
- Service_Config_ORB_DLL (void);
- ~Service_Config_ORB_DLL (void);
-
- /// Initializes object when dynamic linking occurs.
- virtual int init (int argc, ACE_TCHAR *argv[]);
-
- /// Run by a daemon thread.
- /**
- * Each thread will invoke the Service Configurator via this
- * method unless the object is the "FINAL" object.
- */
- virtual int svc (void);
-
-private:
- signed char is_server_;
- ACE_Auto_Ptr<Abstract_Worker> worker_;
- ACE_Auto_Ptr<ACE_ARGV> argv_;
-};
-
-
-ACE_FACTORY_DECLARE (Service_Config_ORB_DLL, Service_Config_ORB_DLL)
-
-
-
-#include /**/ "ace/post.h"
-
-#endif /* SERVICE_CONFIG_ORB_DLL_H */
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL_Export.h b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL_Export.h
deleted file mode 100644
index f9f8860f2cd..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL_Export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl Service_Config_ORB_DLL
-// ------------------------------
-#ifndef SERVICE_CONFIG_ORB_DLL_EXPORT_H
-#define SERVICE_CONFIG_ORB_DLL_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (SERVICE_CONFIG_ORB_DLL_HAS_DLL)
-# define SERVICE_CONFIG_ORB_DLL_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && SERVICE_CONFIG_ORB_DLL_HAS_DLL */
-
-#if !defined (SERVICE_CONFIG_ORB_DLL_HAS_DLL)
-# define SERVICE_CONFIG_ORB_DLL_HAS_DLL 1
-#endif /* ! SERVICE_CONFIG_ORB_DLL_HAS_DLL */
-
-#if defined (SERVICE_CONFIG_ORB_DLL_HAS_DLL) && (SERVICE_CONFIG_ORB_DLL_HAS_DLL == 1)
-# if defined (SERVICE_CONFIG_ORB_DLL_BUILD_DLL)
-# define Service_Config_ORB_DLL_Export ACE_Proper_Export_Flag
-# define SERVICE_CONFIG_ORB_DLL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define SERVICE_CONFIG_ORB_DLL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* SERVICE_CONFIG_ORB_DLL_BUILD_DLL */
-# define Service_Config_ORB_DLL_Export ACE_Proper_Import_Flag
-# define SERVICE_CONFIG_ORB_DLL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define SERVICE_CONFIG_ORB_DLL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* SERVICE_CONFIG_ORB_DLL_BUILD_DLL */
-#else /* SERVICE_CONFIG_ORB_DLL_HAS_DLL == 1 */
-# define Service_Config_ORB_DLL_Export
-# define SERVICE_CONFIG_ORB_DLL_SINGLETON_DECLARATION(T)
-# define SERVICE_CONFIG_ORB_DLL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* SERVICE_CONFIG_ORB_DLL_HAS_DLL == 1 */
-
-// Set SERVICE_CONFIG_ORB_DLL_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (SERVICE_CONFIG_ORB_DLL_NTRACE)
-# if (ACE_NTRACE == 1)
-# define SERVICE_CONFIG_ORB_DLL_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define SERVICE_CONFIG_ORB_DLL_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !SERVICE_CONFIG_ORB_DLL_NTRACE */
-
-#if (SERVICE_CONFIG_ORB_DLL_NTRACE == 1)
-# define SERVICE_CONFIG_ORB_DLL_TRACE(X)
-#else /* (SERVICE_CONFIG_ORB_DLL_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define SERVICE_CONFIG_ORB_DLL_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (SERVICE_CONFIG_ORB_DLL_NTRACE == 1) */
-
-#endif /* SERVICE_CONFIG_ORB_DLL_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/README b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/README
deleted file mode 100644
index a49e8cea08c..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/README
+++ /dev/null
@@ -1,24 +0,0 @@
-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
-implemented in a DLL of its own and each DLL is loaded through a svc
-conf file.
-
-1) If SSLIOP has been compiled, it creates an IIOP server and a
- SSLIOP-capable client.
-
-2) In the absence of SSLIOP, the test uses a CSD dispatching strategy,
- which is made available to the server only.
-
-The test automatically will select which scenario to run, based on the
-availability of a certain pre-processor macro. See Test.cpp for
-details. By default the scenario 2 is tested, as SSLIOP is not built
-by default.
-
-The significance of the SSLIOP scenario is in SSLIOP's implementation,
-which turned out precludes using SSLIOP in an ORB-specific
-configuration. SSLIOP creates a process-wide singleton, which is
-destroyed *before* the TAO SSLIOP service. At shutdown time, an
-attempt to access the ACE_SSL_Context results in a SEGV. That is why
-the test primary conf file loads the SSLIOP service first, so it ends
-up in the global service configuration.
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.cpp
deleted file mode 100644
index 9190e37b13a..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id$
-
-#include "ace/ARGV.h"
-#include "ace/Thread_Manager.h"
-
-#include "Service_Configuration_Per_ORB.h"
-
-// Uncomment this line to test the SSLIOP scenario, as described in
-//the README.
-// #define TEST_WITH_SSLIOP
-
-const ACE_TCHAR*
-config_file_name ()
-{
- // ASCII (UTF-8) encoded Service Configurator file.
- static const ACE_TCHAR svc_conf[] =
-#ifdef TEST_WITH_SSLIOP
- ACE_TEXT ("primary-ssl")
-#else
- ACE_TEXT ("primary-csd")
-#endif
- ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT);
-
- return svc_conf;
-}
-
-
-// @brief Loading a dynamic services in a local repository, which
-// initializes its own ORB
-
-int
-testLoadingTwoOrbs (int , ACE_TCHAR *argv[])
-{
- ACE_ARGV new_argv;
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Looking for conf file %s\n"),
- config_file_name ()));
-
- // Process the Service Configurator directives in this test's
- if (new_argv.add (argv) == -1
- || new_argv.add (ACE_TEXT ("-f")) == -1
- || new_argv.add (config_file_name ()) == -1)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT("ARGV initialization failed\n")));
- return -1;
- }
-
- if (ACE_Service_Config::instance() ->open (new_argv.argc (),
- new_argv.argv ()) == -1)
- {
- if (errno == ENOENT)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("No service config file found\n")));
- else
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Service Config open failed: %m\n")));
-
- return -1;
- }
-
- // Since the loaded services start their own threads, wait until all of them
- // are done to avoid pulling the rug under their feet.
- ACE_Thread_Manager::instance ()->wait ();
- return 0;
-}
-
-int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-{
- return testLoadingTwoOrbs (argc, argv);
-}
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.idl b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.cpp
deleted file mode 100644
index 97c8347258a..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Test_i.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.h b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Test_i.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc
deleted file mode 100644
index ff5720826da..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(ORB DLL Server) : taolib_with_idl, portableserver {
- sharedname = ORB_DLL_Server
- dynamicflags = SERVICE_CONFIG_ORB_DLL_BUILD_DLL
- requires = threads
-
- IDL_Files {
- Test.idl
- }
-
- Source_Files {
- ORB_DLL.cpp
- Test_i.cpp
- TestC.cpp
- TestS.cpp
- server.cpp
- client.cpp
- }
- Header_Files {
- ORB_DLL.h
- ORB_DLL_Export.h
- }
- Resource_Files {
- }
-}
-
-project(ORB DLL Client) : taolib_with_idl, portableserver {
- sharedname = ORB_DLL_Client
- dynamicflags = SERVICE_CONFIG_ORB_DLL_BUILD_DLL
-
- IDL_Files {
- Test.idl
- }
-
- Source_Files {
- ORB_DLL.cpp
- Test_i.cpp
- TestC.cpp
- TestS.cpp
- client.cpp
- server.cpp
- }
- Header_Files {
- ORB_DLL.h
- ORB_DLL_Export.h
- }
- Resource_Files {
- }
-}
-
-
-project(*) : taoserver {
- after += lib ORB_DLL_Client ORB_DLL_Server
- exename = Test
- includes += ../lib
- Source_Files {
- Test.cpp
- }
-}
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp
deleted file mode 100644
index 2ae4c53e2c6..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// $Id$
-
-#include "Test_i.h"
-#include "ORB_DLL.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-Client_Worker::Client_Worker ()
- : Abstract_Worker ("file://test.ior")
-{
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) %@ Client::<ctor>\n", this));
-}
-
-const ACE_TCHAR *
-Client_Worker::kind (void) const
-{
- return ACE_TEXT ("Client");
-}
-
-Client_Worker::~Client_Worker (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) %@ Client::<dtor>\n", this));
-}
-
-int
-Client_Worker::parse_args (int argc, ACE_TCHAR *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:",0);
-
- for( int c = 0; ((c = get_opts ()) != -1); )
- switch (c)
- {
- case 'k':
- this->ior_file_ = get_opts.opt_arg ();
- break;
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-Client_Worker::test_main (int argc, ACE_TCHAR *argv[] ACE_ENV_ARG_DECL)
-{
-
- ACE_Argv_Type_Converter cvt (argc, argv);
-
- CORBA::ORB_var orb = CORBA::ORB_init (cvt.get_argc (), cvt.get_ASCII_argv () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (cvt.get_argc (), cvt.get_ASCII_argv ()) != 0)
- ACE_ERROR_RETURN ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Could not parse the arguments\n")),
- 1);
-
- // Doing this dance to allow the server some time to come up.
- CORBA::Object_ptr co = 0;
- for (int attempts_left=5; attempts_left > 0; --attempts_left)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Client is ready to proceed - awaiting the server ...\n")));
- ACE_OS::sleep (1);
-
- ACE_TRY
- {
- co = orb->string_to_object(ior_file_.c_str () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (co == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Unable to obtain object reference yet. Retrying.\n")));
- continue;
- }
- CORBA::Object_var tmp (co);
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Nil Test::Hello reference <%s>. Retrying.\n"),
- ior_file_.c_str ()));
- continue;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Successfuly narrowed the Hello interface\n")));
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) String returned from the server <%s>\n"),
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- attempts_left = 0; // We're done here!
-
- }
- ACE_CATCH (CORBA::TRANSIENT, ex)
- {
- if (!attempts_left)
- ACE_RE_THROW;
-
- ACE_PRINT_EXCEPTION (ex, "Temporary problem encountered");
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Client was too quick. Pausing ")
- ACE_TEXT ("while the server gets ready.\n")));
- ACE_OS::sleep (5);
- }
- ACE_ENDTRY;
- }
-
- orb->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
-}
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-csd.conf b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-csd.conf
deleted file mode 100644
index 1c1df417c5f..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-csd.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-dynamic ORB_DLL_Server Service_Object * ORB_DLL_Server:_make_Service_Config_ORB_DLL() "-s -ORBDebugLevel 1 -ORBId SERVER -ORBSvcConf secondary-empty.conf"
-dynamic ORB_DLL_Client Service_Object * ORB_DLL_Client:_make_Service_Config_ORB_DLL() "-c -ORBDebugLevel 1 -ORBId CLIENT -ORBSvcConf secondary-csd.conf"
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-ssl.conf b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-ssl.conf
deleted file mode 100644
index 8f89db1b08d..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/primary-ssl.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLNOProtection"
-dynamic ORB_DLL_Server Service_Object * ORB_DLL_Server:_make_Service_Config_ORB_DLL() "-s -ORBDebugLevel 1 -ORBId SERVER -ORBSvcConf secondary-empty.conf"
-dynamic ORB_DLL_Client Service_Object * ORB_DLL_Client:_make_Service_Config_ORB_DLL() "-c -ORBDebugLevel 1 -ORBId CLIENT -ORBSvcConf secondary-ssl.conf"
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/run_test.pl b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/run_test.pl
deleted file mode 100755
index 7e0af25173b..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- my $t1 = new PerlACE::Process ($executable, ($arguments ? $arguments : ""));
- my $status = $t1->SpawnWaitKill (600);
- if ($status != 0) {
- print STDERR "ERROR: test failed, status=$status\n";
- }
- return $status;
-}
-
-my $status = test("Test");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-csd.conf b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-csd.conf
deleted file mode 100644
index 6fde3ce799f..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-csd.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-dynamic TAO_CSD_TP_Strategy_Factory Service_Object * TAO_CSD_ThreadPool:_make_TAO_CSD_TP_Strategy_Factory() "-CSDtp RootPOA:2"
-static Resource_Factory ""
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-empty.conf b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-empty.conf
deleted file mode 100644
index 477c4795007..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-empty.conf
+++ /dev/null
@@ -1 +0,0 @@
-# Nothing so far
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-ssl.conf b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-ssl.conf
deleted file mode 100644
index 3e718372d8c..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/secondary-ssl.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLNOProtection"
-static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp
deleted file mode 100644
index b1c130c6057..00000000000
--- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-
-#include "Test_i.h"
-#include "ORB_DLL.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/Argv_Type_Converter.h"
-
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-//
-Server_Worker::Server_Worker ()
- : Abstract_Worker ("test.ior")
-{
-}
-
-//
-const ACE_TCHAR *
-Server_Worker::kind (void) const
-{
- return ACE_TEXT ("Server");
-}
-
-//
-Server_Worker::~Server_Worker (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) %@ Server::<dtor>\n", this));
-}
-
-//
-int
-Server_Worker::parse_args (int argc, ACE_TCHAR *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:",0);
-
- for( int c = 0; ((c = get_opts ()) != -1); )
- switch (c)
- {
- case 'o':
- this->ior_file_ = get_opts.opt_arg ();
- break;
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-//
-int
-Server_Worker::test_main (int argc, ACE_TCHAR *argv[] ACE_ENV_ARG_DECL)
-{
- // Making sure there are no stale ior files to confuse a client
- ACE_OS::unlink (ior_file_.c_str ());
-
- ACE_Argv_Type_Converter cvt (argc, argv);
- CORBA::ORB_var orb = CORBA::ORB_init (cvt.get_argc (),
- cvt.get_ASCII_argv () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Panic: nil RootPOA\n")),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (cvt.get_argc (), cvt.get_ASCII_argv ()) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (hello_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var hello_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow (hello_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Server activated POA manager\n")));
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_file_.c_str (), "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Cannot open output file for writing IOR: %s"),
- ior_file_.c_str ()),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Server entering the event loop\n")));
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Server exiting the event loop\n")));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // During normal test execution the ORB would have been destroyed
- // by a request from the client.
-
- // orb->shutdown (0 ACE_ENV_ARG_PARAMETER);
- // ACE_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
-}
diff --git a/TAO/tests/ORB_Local_Config/lib/Service_Configuration_Per_ORB.h b/TAO/tests/ORB_Local_Config/lib/Service_Configuration_Per_ORB.h
deleted file mode 100644
index 7d02ce2ba35..00000000000
--- a/TAO/tests/ORB_Local_Config/lib/Service_Configuration_Per_ORB.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id$
-
-#ifndef SERVICE_CONFIGURATION_PER_ORB_H
-# define SERVICE_CONFIGURATION_PER_ORB_H
-
-
-#include "ace/Trace.h"
-#include "ace/Service_Config.h"
-
-/// We need this wrapper to "break" the encapsulation and test
-/// the internals of the class. The class also does a complete
-/// teardown on the service repository used. So, do not expect
-/// to find *any*, even static services in the global repo afer
-/// this class desructor is done.
-
-class ACE_Service_Gestalt_Test : public ACE_Service_Gestalt
-{
- public:
- ACE_Service_Gestalt_Test (size_t n)
- : ACE_Service_Gestalt (n)
- , teardown_ (false)
- {
- };
-
- ACE_Service_Gestalt_Test ()
- : ACE_Service_Gestalt (ACE_Service_Repository::DEFAULT_SIZE)
- , teardown_ (true)
- {
- };
-
- ~ACE_Service_Gestalt_Test (void)
- {
- if (this->teardown_)
- {
- // Close and possibly delete all service instances in the Service
- // Repository.
- ACE_Service_Config::fini_svcs ();
-
- // Unlink all services in the Service Repository and close/delete
- // all ACE library services and singletons.
- ACE_Service_Config::close ();
- }
- };
-
- size_t command_line_directives_count (void) const
- {
- return this->svc_queue_->size ();
- };
-
- size_t service_config_files_count (void) const
- {
- return this->svc_conf_file_queue_->size ();
- };
-
- size_t services_count (void) const
- {
- return this->repo_->current_size ();
- };
-
- bool has_same_service_repository ( ACE_Service_Gestalt_Test const * psg)
- {
- return (this->repo_ == psg->repo_);
- }
-
-private:
- bool teardown_;
-};
-
-
-#endif /* SERVICE_CONFIGURATION_PER_ORB_H */
diff --git a/TAO/tests/ORB_Local_Config/run_tests_all.pl b/TAO/tests/ORB_Local_Config/run_tests_all.pl
deleted file mode 100755
index 8a33c9da9ef..00000000000
--- a/TAO/tests/ORB_Local_Config/run_tests_all.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-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::Run_Test;
-
-sub add_path {
- my($name) = shift;
- my($value) = shift;
- if (defined $ENV{$name}) {
- $ENV{$name} .= ':' . $value
- }
- else {
- $ENV{$name} = $value;
- }
-}
-
-# Set the library path for the client to be able to load
-# the Time_Date library.
-add_path('LD_LIBRARY_PATH', '../lib');
-add_path('LIBPATH', '../lib');
-add_path('SHLIB_PATH', '../lib');
-
-sub test($)
-{
- (my $executable, my $arguments) = @_;
- chdir ($executable);
- my $t1 = new PerlACE::Process ("Test", ($arguments ? $arguments : ""));
- print STDERR "\nTest $executable is running ...\n";
- my $status = $t1->SpawnWaitKill (10);
- chdir ("..");
- if ($status != 0) {
- print STDERR "\nERROR: Test $executable failed, status=$status\n";
- return -1;
- }
-
- print STDERR "Test $executable reported success.\n";
- return 0;
-}
-
-my $status = 0;
-$status += test("Bug_1459");
-$status += test("Bunch");
-$status += test("Separation");
-$status += test("Service_Dependency");
-$status += test("Shared");
-$status += test("Simple");
-$status += test("Two_DLL_ORB");
-
-if ($status == 0) {
- print STDERR "SUCCESS: All tests passed\n";
-}
-else {
- print STDERR "ERROR: Some test failed, status=$status\n";
-}
-exit $status;
-
diff --git a/TAO/tests/ORB_destroy/.cvsignore b/TAO/tests/ORB_destroy/.cvsignore
deleted file mode 100644
index 4a33aac7808..00000000000
--- a/TAO/tests/ORB_destroy/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-ORB_destroy
diff --git a/TAO/tests/ORB_destroy/ORB_destroy.cpp b/TAO/tests/ORB_destroy/ORB_destroy.cpp
deleted file mode 100644
index a1d4a89b03e..00000000000
--- a/TAO/tests/ORB_destroy/ORB_destroy.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/ORB_destroy
-//
-// = FILENAME
-// ORB_destroy.cpp
-//
-// = DESCRIPTION
-// Simple ORB destruction test.
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "tao/ORB.h"
-#include "tao/PortableServer/PortableServer.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID(ORB_destroy, ORB_destroy, "$Id$")
-
-int
-test_with_regular_poa_manager (int argc,
- char **argv,
- const char *orb_name,
- int destroy_orb,
- int destroy_poa)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, orb_name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (destroy_poa)
- {
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (destroy_orb)
- {
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception raised");
- ACE_CHECK_RETURN (-1);
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-test_with_funky_poa_manager (int argc,
- char **argv,
- const char *orb_name,
- int destroy_orb,
- int destroy_poa,
- int funky_poa_manager)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, orb_name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (funky_poa_manager)
- {
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (destroy_poa)
- {
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (destroy_orb)
- {
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception raised");
- ACE_CHECK_RETURN (-1);
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- int result = 0;
-
- result = test_with_regular_poa_manager (argc, argv,
- "destroy_nothing_with_poa_manager",
- 0, 0);
- ACE_ASSERT (result == 0);
-
- result = test_with_regular_poa_manager (argc, argv,
- "destroy_poa_with_poa_manager",
- 0, 1);
- ACE_ASSERT (result == 0);
-
- result = test_with_regular_poa_manager (argc, argv,
- "destroy_orb_with_poa_manager",
- 1, 0);
- ACE_ASSERT (result == 0);
-
- result = test_with_regular_poa_manager (argc, argv,
- "destroy_poa_and_orb_with_poa_manager",
- 1, 1);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_nothing_without_poa_manager",
- 0, 0, 0);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_poa_without_poa_manager",
- 0, 1, 0);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_orb_without_poa_manager",
- 1, 0, 0);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_poa_and_orb_without_poa_manager",
- 1, 1, 0);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_nothing_with_funky_poa_manager",
- 0, 0, 1);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_poa_with_funky_poa_manager",
- 0, 1, 1);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_orb_with_funky_poa_manager",
- 1, 0, 1);
- ACE_ASSERT (result == 0);
-
- result = test_with_funky_poa_manager (argc, argv,
- "destroy_poa_and_orb_with_funky_poa_manager",
- 1, 1, 1);
- ACE_ASSERT (result == 0);
-
- return result;
-}
diff --git a/TAO/tests/ORB_destroy/ORB_destroy.mpc b/TAO/tests/ORB_destroy/ORB_destroy.mpc
deleted file mode 100644
index bcd635980b8..00000000000
--- a/TAO/tests/ORB_destroy/ORB_destroy.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoexe, portableserver {
- exename = ORB_destroy
-}
-
diff --git a/TAO/tests/ORB_destroy/README b/TAO/tests/ORB_destroy/README
deleted file mode 100644
index 8169383ef0e..00000000000
--- a/TAO/tests/ORB_destroy/README
+++ /dev/null
@@ -1,2 +0,0 @@
-Simple ORB destruction test to make sure that it's possible to destroy
-the ORB correctly.
diff --git a/TAO/tests/ORB_destroy/run_test.pl b/TAO/tests/ORB_destroy/run_test.pl
deleted file mode 100755
index 9b13b6bcad8..00000000000
--- a/TAO/tests/ORB_destroy/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("ORB_destroy");
-}
-else {
- $T = new PerlACE::Process ("ORB_destroy");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/ORB_init/.cvsignore b/TAO/tests/ORB_init/.cvsignore
deleted file mode 100644
index c32f7b71039..00000000000
--- a/TAO/tests/ORB_init/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-ORB_init
diff --git a/TAO/tests/ORB_init/ORB_init.cpp b/TAO/tests/ORB_init/ORB_init.cpp
deleted file mode 100644
index 345f699a8eb..00000000000
--- a/TAO/tests/ORB_init/ORB_init.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-#include "tao/ORB.h"
-#include "tao/Object.h"
-#include "tao/SystemException.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (ORB_init,
- ORB_init,
- "$Id$")
-
-// Valid test IOR.
-// Do not attempt to narrow the object represented by this IOR, nor
-// should you modify the IOR unless you replace it with another
-// valid one!
-static const char IOR[] =
-"IOR:010000001600000049444c3a43756269745f466163746f72793a312e30000000010000000000000090000000010102cd14000000616e647572696c2e6563652e7563692e6564750057fecdcd2d00000014010f004e5550000000130000000001000000006368696c645f706f61000000000001000000666163746f7279cdcdcd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01000100000000000901010000000000004f41540400000001cd0000";
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- const char orbid[] = "mighty_orb";
-
- CORBA::ORB_ptr my_orb = CORBA::ORB::_nil();
-
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, orbid ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- my_orb = orb.in ();
-
- // Once we leave this scope, the ORB is released but it should
- // be possible to obtain the same ORB with another call to
- // CORBA::ORB_init() by using the same ORBid argument that was
- // assigned to this ORB.
- }
-
- // -------------------------------------------------------------
- // Verify that the same ORB is returned from a second call to
- // CORBA::ORB_init() in a different scope when the same ORBid is
- // used in that scope.
- // -------------------------------------------------------------
-
- orb = CORBA::ORB_init (argc, argv, orbid ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // This isn't portable, but TAO implements an ORB_ptr as a
- // pointer so we're okay.
- //
- // Check if the ORB returned from the ORB_init() call is the
- // same.
- if (my_orb == orb.in ())
- {
- ACE_DEBUG ((LM_INFO,
- "\n"
- "The ORB <%s> was successfully returned from a second\n"
- "call to CORBA::ORB_init() after it was released in\n"
- "a previous scope.\n"
- "\n",
- orbid));
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "\n"
- "ORB <%s> was not successfully returned from a\n"
- "second call to CORBA::ORB_init() despite the\n"
- "fact it wasn't explicitly destroyed.\n"
- "\n",
- orbid),
- 1);
- }
-
- // -------------------------------------------------------------
- // Now explicitly destroy the ORB with the given ORBid and
- // attempt to initialize a new ORB with the same ORBid.
- // -------------------------------------------------------------
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb = CORBA::ORB_init (argc, argv, orbid ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // This isn't portable, but TAO implements an ORB_ptr as a
- // pointer so we're okay.
- //
- // Check if the ORB returned from the ORB_init() call is the
- // same.
- if (my_orb != orb.in ())
- {
- ACE_DEBUG ((LM_INFO,
- "\n"
- "A new ORB with ORBid <%s> was successfully returned\n"
- "from a second call to CORBA::ORB_init() after the\n"
- "first ORB with the same ORBid was destroyed.\n"
- "\n",
- orbid));
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "\n"
- "ORB <%s> was not successfully destroyed.\n"
- "\n",
- orbid));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
-
- // -------------------------------------------------------------
- // Create an object (but don't narrow() it) so that we can test
- // that some of the TAO_Stub internals are functioning properly
- // (leaks, etc).
- // -------------------------------------------------------------
-
- CORBA::Object_var object =
- orb->string_to_object (IOR ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // -------------------------------------------------------------
- // Initialize another two ORBs but don't explicitly destroy them
- // to allow testing of TAO's internal ORB table resource
- // clean-up.
- // -------------------------------------------------------------
- CORBA::ORB_var orb2 =
- CORBA::ORB_init (argc, argv, "ORB number 2" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb3 =
- CORBA::ORB_init (argc, argv, "ORB number 3" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // -------------------------------------------------------------
- // Now try to perform an operation using the destroyed ORB
- // pseudo object. A CORBA::OBJECT_NOT_EXIST() exception should
- // be thrown. This also tests whether or not exceptions or the
- // ORB itself break when the last ORB is released.
- // -------------------------------------------------------------
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If we get here, then something went wrong. A
- // CORBA::OBJECT_NOT_EXIST() exception should have been thrown!.
- ACE_ERROR ((LM_ERROR,
- "\n"
- "CORBA::OBJECT_NOT_EXIST() exception was not thrown\n"
- "during attempt to perform an ORB operation using\n"
- "destroyed ORB <%s>\n"
- "The CORBA::OBJECT_NOT_EXIST() exception should have\n"
- "been thrown!\n"
- "\n",
- orbid));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, exc)
- {
- // Do something with the exception to make sure it actually
- // exists. If it doesn't exist then there is something wrong
- // with exception lifetime.
- ACE_DEBUG ((LM_INFO,
- "\n"
- "Successfully caught CORBA system exception after the\n"
- "last ORB was released with the following repository ID:\n"
- " %s\n"
- "This exception was expected. It is safe to ignore it.\n",
- exc._rep_id ()));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught unexpected exception:");
-
-
- ACE_DEBUG ((LM_ERROR,
- "\n"
- "ORB_init test failed.\n"));
-
- return 1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_INFO,
- "\n"
- "ORB_init test completed successfully.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/ORB_init/ORB_init.mpc b/TAO/tests/ORB_init/ORB_init.mpc
deleted file mode 100644
index 7ccbe817f03..00000000000
--- a/TAO/tests/ORB_init/ORB_init.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoexe {
- exename = ORB_init
-}
-
diff --git a/TAO/tests/ORB_init/Portspan/.cvsignore b/TAO/tests/ORB_init/Portspan/.cvsignore
deleted file mode 100644
index 254defddb53..00000000000
--- a/TAO/tests/ORB_init/Portspan/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-server
diff --git a/TAO/tests/ORB_init/Portspan/ORB_Init_Portspan.mpc b/TAO/tests/ORB_init/Portspan/ORB_Init_Portspan.mpc
deleted file mode 100644
index ad9590d0dc2..00000000000
--- a/TAO/tests/ORB_init/Portspan/ORB_Init_Portspan.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver {
-}
-
diff --git a/TAO/tests/ORB_init/Portspan/README b/TAO/tests/ORB_init/Portspan/README
deleted file mode 100644
index 8eb4f91abd0..00000000000
--- a/TAO/tests/ORB_init/Portspan/README
+++ /dev/null
@@ -1,16 +0,0 @@
- $Id$
-
-portspan Test
--------------
-
-The portspan test verifies that the portspan option to the ORB_init() call
-behaves correctly. This option allows you to restrict the port that a
-server-side ORB will use to listen for IIOP requests, from a given range
-of port numbers, starting at a given initial port.
-
-The test works by starting a simple ORB on an endpoint with a portspan of 2.
-server -ORBEndpoint iiop://:5555/portspan=2
-The test script does this three times and reports an error if the first two
-don't succeed, or if the third call doesn't fail.
-
-
diff --git a/TAO/tests/ORB_init/Portspan/run_test.pl b/TAO/tests/ORB_init/Portspan/run_test.pl
deleted file mode 100755
index ca71f02e801..00000000000
--- a/TAO/tests/ORB_init/Portspan/run_test.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id$
-
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-use lib "../../../../bin";
-use PerlACE::Run_Test;
-require ACEutils;
-
-$P1 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2");
-$P2 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2");
-$P3 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2");
-$test1 = $P1->Spawn();
-if ($test1 != 0) {
- print STDERR "ERROR: Couldn't start first server. Err:$test1\n";
- $P1->Kill();
- exit 1;
-}
-
-$test2 = $P2->Spawn();
-if ($test2 != 0) {
- print STDERR "ERROR: Couldn't start second server. Err:$test2\n";
- $P1->Kill();
- $P2->Kill();
- exit 1;
-}
-
-$test3 = $P3->SpawnWaitKill(5);
-if ($test3 == 0) {
- print STDERR "ERROR: Last server didn't fail! Err:$test3\n";
- $P1->Kill();
- $P2->Kill();
- $P3->Kill();
- exit 1;
-}
-
-$P1->Kill();
-$P2->Kill();
-$P3->Kill();
-
-print STDOUT "Portspan test completed successfully.\n";
-
-exit 0;
diff --git a/TAO/tests/ORB_init/Portspan/server.cpp b/TAO/tests/ORB_init/Portspan/server.cpp
deleted file mode 100644
index e93543879ed..00000000000
--- a/TAO/tests/ORB_init/Portspan/server.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-
-#include "simpleI.h"
-
-int
-main( int argc, char *argv[] )
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var man = poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- man->activate(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- simple_i simp;
-
- PortableServer::ObjectId_var objId = poa->activate_object(&simp
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception in main():");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/ORB_init/Portspan/simple.idl b/TAO/tests/ORB_init/Portspan/simple.idl
deleted file mode 100644
index 0505f36e9ac..00000000000
--- a/TAO/tests/ORB_init/Portspan/simple.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-interface simple {
- void test();
-};
diff --git a/TAO/tests/ORB_init/Portspan/simpleI.cpp b/TAO/tests/ORB_init/Portspan/simpleI.cpp
deleted file mode 100644
index c0ae870a550..00000000000
--- a/TAO/tests/ORB_init/Portspan/simpleI.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
-// TAO and the TAO IDL Compiler have been developed by:
-// Center for Distributed Object Computing
-// Washington University
-// St. Louis, MO
-// USA
-// http://www.cs.wustl.edu/~schmidt/doc-center.html
-// and
-// Distributed Object Computing Laboratory
-// University of California at Irvine
-// Irvine, CA
-// USA
-// http://doc.ece.uci.edu/
-//
-// Information about TAO is available at:
-// http://www.cs.wustl.edu/~schmidt/TAO.html
-
-#include "simpleI.h"
-
-// Implementation skeleton constructor
-simple_i::simple_i (void)
- {
- }
-
-// Implementation skeleton destructor
-simple_i::~simple_i (void)
- {
- }
-
-void simple_i::test (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
- {
- //Add your implementation here
- }
diff --git a/TAO/tests/ORB_init/Portspan/simpleI.h b/TAO/tests/ORB_init/Portspan/simpleI.h
deleted file mode 100644
index 23faf5eb717..00000000000
--- a/TAO/tests/ORB_init/Portspan/simpleI.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
-// TAO and the TAO IDL Compiler have been developed by:
-// Center for Distributed Object Computing
-// Washington University
-// St. Louis, MO
-// USA
-// http://www.cs.wustl.edu/~schmidt/doc-center.html
-// and
-// Distributed Object Computing Laboratory
-// University of California at Irvine
-// Irvine, CA
-// USA
-// http://doc.ece.uci.edu/
-//
-// Information about TAO is available at:
-// http://www.cs.wustl.edu/~schmidt/TAO.html
-
-#ifndef SIMPLEI_H_
-#define SIMPLEI_H_
-
-#include "simpleS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-//Class simple_i
-class simple_i : public virtual POA_simple
-{
-public:
- //Constructor
- simple_i (void);
-
- //Destructor
- virtual ~simple_i (void);
-
-virtual void test (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-};
-
-
-#endif /* SIMPLEI_H_ */
diff --git a/TAO/tests/ORB_init/README b/TAO/tests/ORB_init/README
deleted file mode 100644
index 72e0672b479..00000000000
--- a/TAO/tests/ORB_init/README
+++ /dev/null
@@ -1,68 +0,0 @@
-$Id$
-
-ORB_init Test
--------------
-
-The ORB_init test simply verifies that the CORBA::ORB_init() call
-behaves as defined in the OMG CORBA specification. Here are the
-behaviors it tests:
-
- 1. Multiple ORB_init calls with the same ORBid but in
- different scopes should return the same ORB.
-
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
- }
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
- }
-
- In both scopes, "my_orb" refers to the same ORB.
-
- 2. The ORB must be explicitly destroyed in order to free the
- ORBid "my_orb" for use by another ORB.
-
- {
- CORBA::ORB_var orb1 = CORBA::ORB_init (argc, argv, "my_orb");
- orb1->destroy();
-
- // "my_orb" ORB identifier can now be used to identify
- // another ORB.
- CORBA::ORB_var orb2 = CORBA::ORB_init (argc, argv, "my_orb");
- }
-
- 3. CORBA system exceptions should be available even after the
- last ORB is released.
-
- try
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "my_orb");
- // Exception is thrown
- }
- catch (CORBA::System_Exception &exc)
- {
- // Do something with exc.
- }
-
-ORB_init also makes a call to CORBA::ORB::string_to_object() to aid in
-debugging during TAO_Stub destruction (memory leaks, etc).
-
-Simply run the `ORB_init' program with out any argument to begin the
-test. The correct output is:
-
- The ORB <mighty_orb> was successfully returned from a second
- call to CORBA::ORB_init() after it was released in
- a previous scope.
-
-
- A new ORB with ORBid <mighty_orb> was successfully returned
- from a second call to CORBA::ORB_init() after the
- first ORB with the same ORBid was destroyed.
-
-
- Successfully caught CORBA system exception after the
- last ORB was released with the following repository ID:
- IDL:omg.org/CORBA/OBJECT_NOT_EXIST:1.0
- This exception was expected. It is safe to ignore it.
-
- ORB_init test completed successfully.
diff --git a/TAO/tests/ORB_init/run_test.pl b/TAO/tests/ORB_init/run_test.pl
deleted file mode 100755
index cab935271f0..00000000000
--- a/TAO/tests/ORB_init/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("ORB_init");
-}
-else {
- $T = new PerlACE::Process ("ORB_init");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/ORB_shutdown/.cvsignore b/TAO/tests/ORB_shutdown/.cvsignore
deleted file mode 100644
index 254defddb53..00000000000
--- a/TAO/tests/ORB_shutdown/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-server
diff --git a/TAO/tests/ORB_shutdown/Foo_Bar.cpp b/TAO/tests/ORB_shutdown/Foo_Bar.cpp
deleted file mode 100644
index 6f5abfb1e81..00000000000
--- a/TAO/tests/ORB_shutdown/Foo_Bar.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// $Id$
-//
-#include "Foo_Bar.h"
-
-ACE_RCSID(Foo_Bar, Foo_Bar, "$Id$")
-
-Foo_Bar::Foo_Bar (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Foo_Bar::~Foo_Bar (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Shutting down the ORB again \n"));
-
- this->orb_->shutdown (1);
-}
diff --git a/TAO/tests/ORB_shutdown/Foo_Bar.h b/TAO/tests/ORB_shutdown/Foo_Bar.h
deleted file mode 100644
index 36a17fc941d..00000000000
--- a/TAO/tests/ORB_shutdown/Foo_Bar.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Hello interface
-class Foo_Bar
- : public virtual POA_Test::Foo
-{
-public:
- /// Constructor
- Foo_Bar (CORBA::ORB_ptr orb);
-
- /// Dtor
- ~Foo_Bar (void);
-
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/ORB_shutdown/Foo_Bar.mpc b/TAO/tests/ORB_shutdown/Foo_Bar.mpc
deleted file mode 100644
index 6cbfa60be64..00000000000
--- a/TAO/tests/ORB_shutdown/Foo_Bar.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(ORB Shutdown Server): taoserver {
- Source_Files {
- Foo_Bar.cpp
- server.cpp
- }
-}
-
diff --git a/TAO/tests/ORB_shutdown/README b/TAO/tests/ORB_shutdown/README
deleted file mode 100644
index 8fc118e49db..00000000000
--- a/TAO/tests/ORB_shutdown/README
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
-
-@page ORB_shutdown Test README File
-
- The simplest possible test for TAO's shutdown procedure. This
-test is basically a regression for BUG 1265. Please see BUG 1265 in
-
- http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1265
-
-for details.
-
- This test basically calls shutdown and during the destruction
-of the servant calls shutdown again. This test shold not hang if BUG
-1265 is fixed.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/ORB_shutdown/Test.idl b/TAO/tests/ORB_shutdown/Test.idl
deleted file mode 100644
index f6a0c676b65..00000000000
--- a/TAO/tests/ORB_shutdown/Test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple empty interface
- interface Foo
- {
-
- };
-};
diff --git a/TAO/tests/ORB_shutdown/run_test.pl b/TAO/tests/ORB_shutdown/run_test.pl
deleted file mode 100755
index a7df75abd33..00000000000
--- a/TAO/tests/ORB_shutdown/run_test.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (45);
-
-if ($server != 0) {
- print STDERR "ERROR: a deadlock occured in server and returned $server\n";
- $status = 1;
-}
-exit $status;
diff --git a/TAO/tests/ORB_shutdown/server.cpp b/TAO/tests/ORB_shutdown/server.cpp
deleted file mode 100644
index 1ab5469ae50..00000000000
--- a/TAO/tests/ORB_shutdown/server.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// $Id$
-
-#include "Foo_Bar.h"
-#include "ace/Time_Value.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Foo_Bar *foobar_impl;
- ACE_NEW_RETURN (foobar_impl,
- Foo_Bar (orb.in ()),
- 1);
-
- Test::Foo_var foo =
- foobar_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Dont unscope it or move it elsewhere.. It is here with a
- // purpose. If you dont understand this, please re-read the
- // README file.
- {
- PortableServer::ServantBase_var owner_transfer (foobar_impl);
- }
-
- ACE_Time_Value tv (10,
- 0);
-
- // Just run the ORB for a minute..
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) server - shutting down the ORB\n"));
-
- orb->shutdown (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Finished shutting down the ORB\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Test successful.. \n"));
- return 0;
-}
diff --git a/TAO/tests/ORT/.cvsignore b/TAO/tests/ORT/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/ORT/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/ORT/ORT.mpc b/TAO/tests/ORT/ORT.mpc
deleted file mode 100644
index 461f03a1a7b..00000000000
--- a/TAO/tests/ORT/ORT.mpc
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Test_ORT_Server): taoserver, objreftemplate, iorinterceptor, pi_server, interceptors {
- IDL_Files {
- ORT_test.idl
- ObjectReferenceFactory.idl
- }
-
- Source_Files {
- ORT_testC.cpp
- ORT_testS.cpp
- ObjectReferenceFactoryC.cpp
- ObjectReferenceFactory.cpp
- ORT_test_i.cpp
- ServerORBInitializer.cpp
- ServerRequestInterceptor.cpp
- ORT_test_IORInterceptor.cpp
- server.cpp
- }
-}
-
-
-project(Test_ORT_Client): taoclient, anytypecode, interceptors {
- after += Test_ORT_Server
-
- IDL_Files {
- ORT_test.idl
- }
-
- Source_Files {
- ORT_testC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/ORT/ORT_test.idl b/TAO/tests/ORT/ORT_test.idl
deleted file mode 100644
index e2b0ab9ec1f..00000000000
--- a/TAO/tests/ORT/ORT_test.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file ORT_test.idl
- *
- * $Id$
- *
- * @author Priyanka Gontla <gontla_p@ociweb.com>
- */
-//=============================================================================
-
-
-#ifndef ORT_TEST_IDL
-#define ORT_TEST_IDL
-
-module ObjectReferenceTemplate
-{
- interface ORT_test
- {
- boolean request_server ();
-
- oneway void shutdown ();
- };
-};
-
-#endif /* ORT_TEST_IDL */
diff --git a/TAO/tests/ORT/ORT_test_IORInterceptor.cpp b/TAO/tests/ORT/ORT_test_IORInterceptor.cpp
deleted file mode 100644
index 38fcec43f31..00000000000
--- a/TAO/tests/ORT/ORT_test_IORInterceptor.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-#include "ORT_test_IORInterceptor.h"
-#include "ObjectReferenceFactory.h"
-
-#include "tao/ORB_Constants.h"
-
-ACE_RCSID (ORT,
- ORT_test_IORInterceptor,
- "$Id$")
-
-
-ORT_test_IORInterceptor::ORT_test_IORInterceptor (void)
- : establish_count_ (0),
- components_establish_count_ (0)
-{
-}
-
-char *
-ORT_test_IORInterceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("ORT_IORInterceptor");
-}
-
-void
-ORT_test_IORInterceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_ASSERT (this->establish_count_ > 0
- && this->components_establish_count_ > 0
- && this->establish_count_ == this->components_establish_count_);
-}
-
-void
-ORT_test_IORInterceptor::establish_components (
- PortableInterceptor::IORInfo_ptr /* info */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++this->establish_count_;
-
- ACE_DEBUG ((LM_DEBUG,
- "establish_components() has been invoked %d times\n",
- this->establish_count_));
-}
-
-void
-ORT_test_IORInterceptor::components_established (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++this->components_establish_count_;
-
- ACE_DEBUG ((LM_DEBUG,
- "components_established() has been invoked %d times\n",
- this->establish_count_));
-
-
- // Swap out the current ObjectReferenceFactory with our own.
-
- // Save a copy of the current ObjectReferenceFactory.
- PortableInterceptor::ObjectReferenceFactory_var old_orf =
- info->current_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ObjectReferenceFactory * tmp;
- ACE_NEW_THROW_EX (tmp,
- ObjectReferenceFactory (old_orf.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ObjectReferenceFactory_var orf = tmp;
-
- info->current_factory (orf.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-ORT_test_IORInterceptor::adapter_manager_state_changed (
- const char * id,
- PortableInterceptor::AdapterState
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "The AdapterManager [id=%s] state has changed.\n", id));
-}
-
-void
-ORT_test_IORInterceptor:: adapter_state_changed (
- const PortableInterceptor::ObjectReferenceTemplateSeq &,
- PortableInterceptor::AdapterState
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/ORT/ORT_test_IORInterceptor.h b/TAO/tests/ORT/ORT_test_IORInterceptor.h
deleted file mode 100644
index 14e17c49529..00000000000
--- a/TAO/tests/ORT/ORT_test_IORInterceptor.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ORT_test_IORInterceptor.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- * @author Priyanka Gontla <gontla_p@ociweb.com>
- */
-//=============================================================================
-
-
-#ifndef ORT_TEST_IORINTERCEPTOR_H
-#define ORT_TEST_IORINTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/IORInterceptor/IORInterceptor.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class ORT_test_IORInterceptor
- : public virtual PortableInterceptor::IORInterceptor_3_0,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- ORT_test_IORInterceptor (void);
-
- /**
- * @name Methods Required by the IOR Interceptor Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all IOR interceptors.
- */
- //@{
- /// Return the name of this IORInterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Cleanup resources acquired by this IORInterceptor.
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Add the tagged components to the IOR.
- virtual void establish_components (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void components_established (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void adapter_manager_state_changed (
- const char * id,
- PortableInterceptor::AdapterState state
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void adapter_state_changed (
- const PortableInterceptor::ObjectReferenceTemplateSeq & templates,
- PortableInterceptor::AdapterState state
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- //@}
-
-private:
-
- CORBA::Long establish_count_;
-
- CORBA::Long components_establish_count_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* ORT_TEST_IORINTERCEPTOR_H */
diff --git a/TAO/tests/ORT/ORT_test_i.cpp b/TAO/tests/ORT/ORT_test_i.cpp
deleted file mode 100644
index 77797e82b0b..00000000000
--- a/TAO/tests/ORT/ORT_test_i.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "ORT_test_i.h"
-
-
-ACE_RCSID (ORT,
- ORT_test_i,
- "$Id$")
-
-
-ORT_test_i::ORT_test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Boolean
-ORT_test_i::request_server (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 0;
-}
-
-void
-ORT_test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/ORT/ORT_test_i.h b/TAO/tests/ORT/ORT_test_i.h
deleted file mode 100644
index 0046e1fce5a..00000000000
--- a/TAO/tests/ORT/ORT_test_i.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ORT_test_i.h
- *
- * $Id$
- *
- * Implementation header for the "server" IDL interface for the
- * ORT example.
- *
- * @author Priyanka Gontla <gontla_p@ociweb.com>
- */
-//=============================================================================
-
-
-#ifndef ORT_TEST_I_H
-#define ORT_TEST_I_H
-
-#include "ORT_testS.h"
-
-
-class ORT_test_i : public virtual POA_ObjectReferenceTemplate::ORT_test
-{
-public:
-
- ORT_test_i (CORBA::ORB_ptr orb);
-
- virtual CORBA::Boolean request_server (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- CORBA::ORB_var orb_;
-
-};
-
-
-#endif /* ORT_TEST_I_H */
diff --git a/TAO/tests/ORT/ObjectReferenceFactory.cpp b/TAO/tests/ORT/ObjectReferenceFactory.cpp
deleted file mode 100644
index 45cb966bc7e..00000000000
--- a/TAO/tests/ORT/ObjectReferenceFactory.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "ObjectReferenceFactory.h"
-
-
-ACE_RCSID (ORT,
- ObjectReferenceFactory,
- "$Id$")
-
-
-#include "tao/debug.h"
-
-
-ObjectReferenceFactory::ObjectReferenceFactory (
- PortableInterceptor::ObjectReferenceFactory * old_orf)
- : old_orf_ (old_orf)
-{
- // Claim ownership of the old ObjectReferenceFactory.
- CORBA::add_ref (old_orf);
-}
-
-ObjectReferenceFactory::~ObjectReferenceFactory (void)
-{
- // No need to call CORBA::remove_ref() on this->old_orf_. It is a
- // "_var" object, meaning that will be done automatically.
-}
-
-CORBA::Object_ptr
-ObjectReferenceFactory::make_object (
- const char *repository_id,
- const PortableInterceptor::ObjectId & id
- ACE_ENV_ARG_DECL)
-{
- ACE_ASSERT (repository_id != 0);
-
- ACE_DEBUG ((LM_INFO,
- "Invoked custom ObjectReferenceFactory::make_object()\n"));
-
- return this->old_orf_->make_object (repository_id,
- id
- ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/ORT/ObjectReferenceFactory.h b/TAO/tests/ORT/ObjectReferenceFactory.h
deleted file mode 100644
index a6fbe9cdabd..00000000000
--- a/TAO/tests/ORT/ObjectReferenceFactory.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ObjectReferenceFactory.h
- *
- * $Id$
-
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#ifndef TAO_OBJECT_REFERENCE_FACTORY_H
-#define TAO_OBJECT_REFERENCE_FACTORY_H
-
-#include "ObjectReferenceFactoryC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-
-/**
- * @class ObjectReferenceFactory
- *
- * @brief Implementation of the PortableInterceptor::ObjectReferenceFactory
- * interface.
- *
- * This ObjectReferenceFactory creates simply delegates all tasks on
- * to the old ObjectReferenceFactory. It merely exists to test the
- * @c IORInfo::current_factory attribute internals.
- */
-class ObjectReferenceFactory
- : public virtual OBV_ORT_Test::ObjectReferenceFactory
- , public virtual CORBA::DefaultValueRefCountBase
-{
- public:
-
- /// Constructor
- ObjectReferenceFactory (
- PortableInterceptor::ObjectReferenceFactory * old_orf);
-
- /**
- * @name PortableInterceptor::ObjectReferenceFactory Methods
- *
- * Methods required by the
- * PortableInterceptor::ObjectReferenceFactory interface.
- */
- //@{
- virtual CORBA::Object_ptr make_object (
- const char *repository_id,
- const PortableInterceptor::ObjectId & id
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- //@}
-
-protected:
-
- /// Destructor
- /**
- * Protected destructor to enforce proper memory management via
- * reference counting.
- */
- ~ObjectReferenceFactory (void);
-
-private:
-
- /// The old ObjectReferenceFactory used to create object references.
- /**
- * This ObjectReferenceFactory will still be used when creating
- * object references. However, it will be invoked through this
- * ObjectReferenceFactory.
- */
- PortableInterceptor::ObjectReferenceFactory_var old_orf_;
-
-};
-
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_OBJECT_REFERENCE_FACTORY_H */
diff --git a/TAO/tests/ORT/ObjectReferenceFactory.idl b/TAO/tests/ORT/ObjectReferenceFactory.idl
deleted file mode 100644
index b4da79f1b83..00000000000
--- a/TAO/tests/ORT/ObjectReferenceFactory.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file ObjectReferenceFactory.idl
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#ifndef OBJECT_REFERENCE_FACTORY_IDL
-#define OBJECT_REFERENCE_FACTORY_IDL
-
-#include "tao/ObjRefTemplate/ObjectReferenceTemplate_include.pidl"
-
-module ORT_Test
-{
-
- valuetype ObjectReferenceFactory
- : PortableInterceptor::ObjectReferenceFactory {};
-
-};
-
-#endif /* OBJECT_REFERENCE_FACTORY_IDL */
diff --git a/TAO/tests/ORT/README b/TAO/tests/ORT/README
deleted file mode 100644
index 8a1c6f8f18f..00000000000
--- a/TAO/tests/ORT/README
+++ /dev/null
@@ -1,47 +0,0 @@
-# $Id$
-
-This is to test the functionality of the Object Reference Template and
-the various other conditions that have to be met according to the ORT
-spec.
-
-The various conditions that are tested here are
-
-1. That establish_components() and then the components_established()
- method is called every time a new POA is created.
-
- For this, I just create some POAs and keep a count on how
-many times the establish components is called.
-
-2. An ORT is initialized every time a new POA is created.
-
-3. Check the identity of the ORT using the adapter_name() and such other
- methods in the Object Reference Template abstract valuetype.
-
- The server and the client are just simple. There will be an
-interceptor whose establish_components() and components_established()
-methods should be invoked when a POA is created.
-
-4. The other thing to test is that when ever the state of the POA
-manager changes, the adapter_manager_state_changed() method is
-invoked. I am not going to do anything about it .. may be just have a
-debug statement.
-
-5. And, of course that the application's implementation of the
-make_object() is invoked. I wont do anything in it .. just call
-create_reference_with_id() again .. may be.
-
-6. Simple checks are for checking if -ORBId and -ORBServerId are
-working. But, this can be checked by passing command line parameters
-and invoking the corresponding functions to check if they are working
-perfectly.
-
-How to run:
-===========
-
-Run the server.
-
-./server -o server.ior -ORBId ORT_test_ORB -ORBServerId ORT_test_server
-
-Run the client.
-
-./client -k file://server.ior
diff --git a/TAO/tests/ORT/ServerORBInitializer.cpp b/TAO/tests/ORT/ServerORBInitializer.cpp
deleted file mode 100644
index 40853060d7b..00000000000
--- a/TAO/tests/ORT/ServerORBInitializer.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "ServerORBInitializer.h"
-#include "ServerRequestInterceptor.h"
-#include "ORT_test_IORInterceptor.h"
-
-#include "tao/ORB_Constants.h"
-#include "tao/PortableServer/PortableServer.h"
-
-
-ACE_RCSID (ORT,
- ServerORBInitializer,
- "$Id$")
-
-
-void
-ServerORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr /* info */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ServerORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::Object_var obj =
- info->resolve_initial_references ("POACurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::Current_var poa_current =
- PortableServer::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (!CORBA::is_nil (poa_current.in ()));
-
-
- CORBA::String_var orb_id = info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Create and register the test's ServerRequestInterceptor
-
- PortableInterceptor::ServerRequestInterceptor_ptr tmp;
- ACE_NEW_THROW_EX (tmp,
- ServerRequestInterceptor (orb_id.in (),
- poa_current.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var server_interceptor = tmp;
-
- info->add_server_request_interceptor (server_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-
- // Create and register the test's IORInterceptor
-
- PortableInterceptor::IORInterceptor_ptr ort_test_interceptor;
- ACE_NEW_THROW_EX (ort_test_interceptor,
- ORT_test_IORInterceptor,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::IORInterceptor_var ior_interceptor =
- ort_test_interceptor;
-
- info->add_ior_interceptor (ior_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/ORT/ServerORBInitializer.h b/TAO/tests/ORT/ServerORBInitializer.h
deleted file mode 100644
index d4736dc8efb..00000000000
--- a/TAO/tests/ORT/ServerORBInitializer.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ServerORBInitializer.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_ORB_INITIALIZER_H
-#define SERVER_ORB_INITIALIZER_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class ServerORBInitializer
- *
- * @brief Simple concrete ORB initializer.
- *
- * This is a test ORB initializer that registers an IORInterceptor and
- * ServerRequestIntercepor for this ORT test.
- */
-class ServerORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the ORBInitializer Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all ORB initializers.
- */
- //@{
- /// The pre-initialization hook.
- virtual void pre_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// The post-initialization hook.
- virtual void post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-};
-
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/ORT/ServerRequestInterceptor.cpp b/TAO/tests/ORT/ServerRequestInterceptor.cpp
deleted file mode 100644
index 904b4bda66f..00000000000
--- a/TAO/tests/ORT/ServerRequestInterceptor.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-// -*- C++ -*-
-
-#include "ServerRequestInterceptor.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (ORT,
- ServerRequestInterceptor,
- "$Id$")
-
-
-ServerRequestInterceptor::ServerRequestInterceptor (
- const char * orb_id,
- PortableServer::Current_ptr poa_current)
- : orb_id_ (orb_id),
- poa_current_ (PortableServer::Current::_duplicate (poa_current))
-{
-}
-
-char *
-ServerRequestInterceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("ServerRequestInterceptor");
-}
-
-void
-ServerRequestInterceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ServerRequestInterceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-ServerRequestInterceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // If no response is expected, then we're invoking the oneway
- // shutdown operation. Don't bother displaying output a second
- // time.
- CORBA::Boolean response_expected =
- ri->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!response_expected)
- return;
-
- PortableServer::POA_var poa;
-
- ACE_TRY
- {
- poa = this->poa_current_->get_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (PortableServer::Current::NoContext, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "ServerRequestInterceptor::receive_request");
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- PortableServer::POA_var parent_poa =
- poa->the_parent (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Make sure there is more than one POA in the POA hierarchy since
- // the servant should have been registered with a child POA, not the
- // RootPOA.
- ACE_ASSERT (!CORBA::is_nil (parent_poa.in ()));
-
- PortableInterceptor::AdapterName_var name =
- ri->adapter_name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
-
- ACE_DEBUG ((LM_INFO,
- "POA Hierarchy:\n"
- "==============\n"));
-
- const CORBA::ULong len = name->length ();
-
- // Make sure there is more than one AdapterName in the AdapterName
- // sequence since the servant should have been registered with a
- // child POA, not the RootPOA.
- ACE_ASSERT (len > 1);
-
- for (CORBA::ULong i = 0; i < len; ++i)
- {
- for (CORBA::ULong j = 0; j < i; ++j)
- ACE_DEBUG ((LM_INFO, "\t"));
-
- ACE_DEBUG ((LM_INFO,
- "%s\n",
- static_cast<char const*>(name[i])));
- }
-
- ACE_DEBUG ((LM_INFO,
- "\n"
- "==============\n"));
-
- // Make sure the name of the RootPOA is the first in the AdapterName
- // sequence.
- ACE_ASSERT (ACE_OS::strcmp ("RootPOA", name[(CORBA::ULong) 0]) == 0);
-
- CORBA::String_var orb_id = ri->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (ACE_OS::strcmp (this->orb_id_.in (), orb_id.in ()) == 0);
-
- CORBA::String_var server_id = ri->server_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (ACE_OS::strcmp (server_id.in (), "ORT_test_server") == 0);
-}
-
-void
-ServerRequestInterceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ServerRequestInterceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-ServerRequestInterceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
diff --git a/TAO/tests/ORT/ServerRequestInterceptor.h b/TAO/tests/ORT/ServerRequestInterceptor.h
deleted file mode 100644
index d46cf2612d3..00000000000
--- a/TAO/tests/ORT/ServerRequestInterceptor.h
+++ /dev/null
@@ -1,124 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ServerRequestInterceptor.h
- *
- * $Id$
- *
- * Implementation header for the server request interceptor for the
- * ORT test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_REQUEST_INTERCEPTOR_H
-#define SERVER_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/CORBA_String.h"
-
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/PI_Server/PI_Server.h"
-
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-
-/**
- * @class ServerRequestInterceptor
- *
- * @brief Simple concrete server request interceptor.
- *
- * This server request interceptor tests some of the ORT-specific
- * methods in the ServerRequestInfo object passed to the server
- * request interception points.
- */
-class ServerRequestInterceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- ServerRequestInterceptor (const char * orb_id,
- PortableServer::Current_ptr poa_current);
-
- /**
- * @name Methods Required by the Server Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all server request interceptors.
- */
- //@{
- /// Return the name of this ServerRequestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- /// The ORBid of the ORB with which this interceptor is registered.
- CORBA::String_var orb_id_;
-
- /// Reference to the POACurrent object.
- /**
- * This reference will be used to verify that the POA that
- * dispatched the request intercepted by this interceptor was infact
- * a child POA, and not the RootPOA.
- */
- PortableServer::Current_var poa_current_;
-
-};
-
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/ORT/client.cpp b/TAO/tests/ORT/client.cpp
deleted file mode 100644
index a1f0d2219a7..00000000000
--- a/TAO/tests/ORT/client.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-#include "ORT_testC.h"
-
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (ORT,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.optarg;
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-k IOR "
- "\n",
- argv[0]),
- -1);
- }
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "client_sum_orb" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var obj =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ObjectReferenceTemplate::ORT_test_var server =
- ObjectReferenceTemplate::ORT_test::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil.\n",
- ior),
- 1);
- }
-
- CORBA::Boolean result =
- server->request_server (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (result == 0)
- ACE_DEBUG ((LM_DEBUG, "Successful invocation\n"));
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "ORT test on client side :");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/ORT/run_test.pl b/TAO/tests/ORT/run_test.pl
deleted file mode 100755
index e903275dc3c..00000000000
--- a/TAO/tests/ORT/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBId ORT_test_ORB -ORBServerId ORT_test_server");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBId ORT_test_ORB -ORBServerId ORT_test_server");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-print STDERR "\n\n==== Running ORT (Object Reference Template) test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 7) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/ORT/server.cpp b/TAO/tests/ORT/server.cpp
deleted file mode 100644
index d8656cc7c94..00000000000
--- a/TAO/tests/ORT/server.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-#include "ORT_test_i.h"
-#include "ServerORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (ORT,
- server,
- "$Id$")
-
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- ACE_DEBUG ((LM_DEBUG, "FILE ==== %s\n", ior_output_file));
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-o <iorfile>"
- "\n",
- argv[0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr tmp;
-
- ACE_NEW_RETURN (tmp,
- ServerORBInitializer,
- -1); // No CORBA exceptions yet!
-
- PortableInterceptor::ORBInitializer_var orb_initializer = tmp;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- "ORT Test ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Check for nil references
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to obtain RootPOA reference.\n"),
- -1);
-
- // Get poa_manager reference
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Activate it.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies (0);
- policies.length (0);
-
- // Lets create some POA's
- PortableServer::POA_var first_poa =
- root_poa->create_POA ("FIRST_POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var second_poa =
- first_poa->create_POA ("SECOND_POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var third_poa =
- second_poa->create_POA ("THIRD_POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var fourth_poa =
- third_poa->create_POA ("FOURTH_POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ORT_test_i ort_test_impl (orb.in ());
-
- PortableServer::ObjectId_var oid =
- fourth_poa->activate_object (&ort_test_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- obj = fourth_poa->servant_to_reference (&ort_test_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Convert the object reference to a string format.
- CORBA::String_var ior =
- orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Dump it to a file.
- if (ior_output_file != 0)
- {
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing "
- "IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "ORT test server:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Object_Loader/.cvsignore b/TAO/tests/Object_Loader/.cvsignore
deleted file mode 100644
index e54525b1ee9..00000000000
--- a/TAO/tests/Object_Loader/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-driver
diff --git a/TAO/tests/Object_Loader/Loader.cpp b/TAO/tests/Object_Loader/Loader.cpp
deleted file mode 100644
index 73ae41e115f..00000000000
--- a/TAO/tests/Object_Loader/Loader.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id$
-
-#include "Loader.h"
-#include "Test_i.h"
-
-ACE_RCSID(Object_Loader, Loader, "$Id$")
-
-Loader::Loader (void)
-{
-}
-
-CORBA::Object_ptr
-Loader::create_object (CORBA::ORB_ptr orb,
- int,
- char * []
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var mgr =
- poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_i *test;
- ACE_NEW_RETURN (test, Test_i (poa.in ()),
- CORBA::Object::_nil ());
-
- PortableServer::ServantBase_var tmp = test;
- obj = test->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return obj._retn ();
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
- return CORBA::Object::_nil ();
-}
-
-// ****************************************************************
-
-#if 0
-ACE_STATIC_SVC_DEFINE (Loader,
- ACE_TEXT ("TAO_Object_Loader"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (Loader),
- ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
- 0)
-#endif /* 0 */
-
-ACE_FACTORY_DEFINE (OLT, Loader)
diff --git a/TAO/tests/Object_Loader/Loader.h b/TAO/tests/Object_Loader/Loader.h
deleted file mode 100644
index 73b4c5708f4..00000000000
--- a/TAO/tests/Object_Loader/Loader.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Object_Loader
-//
-// = FILENAME
-// Loader.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_OBJECT_LOADER_LOADER_H
-#define TAO_OBJECT_LOADER_LOADER_H
-
-#include "tao/Object_Loader.h"
-#include "OLT_Export.h"
-
-class OLT_Export Loader : public TAO_Object_Loader
-{
- // = TITLE
- // Implement the Test interface
- //
- // = DESCRIPTION
- //
-public:
- Loader (void);
- // ctor
-
- virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb,
- int argc,
- char *argv []
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Create a new instance
-};
-
-// ACE_STATIC_SVC_DECLARE (Loader)
-ACE_FACTORY_DECLARE (OLT, Loader)
-
-#endif /* TAO_OBJECT_LOADER_LOADER_H */
diff --git a/TAO/tests/Object_Loader/OLT_Export.h b/TAO/tests/Object_Loader/OLT_Export.h
deleted file mode 100644
index f7d3ad034b9..00000000000
--- a/TAO/tests/Object_Loader/OLT_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 OLT_EXPORT_H
-#define OLT_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (OLT_HAS_DLL)
-# define OLT_HAS_DLL 0
-# endif /* ! OLT_HAS_DLL */
-#else
-# if !defined (OLT_HAS_DLL)
-# define OLT_HAS_DLL 1
-# endif /* ! OLT_HAS_DLL */
-#endif
-
-#if defined (OLT_HAS_DLL) && (OLT_HAS_DLL == 1)
-# if defined (OLT_BUILD_DLL)
-# define OLT_Export ACE_Proper_Export_Flag
-# define OLT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define OLT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* OLT_BUILD_DLL */
-# define OLT_Export ACE_Proper_Import_Flag
-# define OLT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define OLT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* OLT_BUILD_DLL */
-#else /* OLT_HAS_DLL == 1 */
-# define OLT_Export
-# define OLT_SINGLETON_DECLARATION(T)
-# define OLT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* OLT_HAS_DLL == 1 */
-
-#endif /* OLT_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/Object_Loader/Object_Loader.mpc b/TAO/tests/Object_Loader/Object_Loader.mpc
deleted file mode 100644
index a008ebf89a3..00000000000
--- a/TAO/tests/Object_Loader/Object_Loader.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Test): taolib_with_idl, portableserver {
- sharedname = Test_DLL
- dynamicflags = OLT_BUILD_DLL
-
- Source_Files {
- Test_i.cpp
- Loader.cpp
- }
-}
-
-project(*Driver): taoexe, portableserver {
- after += *Test
- Source_Files {
- TestC.cpp
- driver.cpp
- }
-}
-
diff --git a/TAO/tests/Object_Loader/README b/TAO/tests/Object_Loader/README
deleted file mode 100644
index 71faaabc8cf..00000000000
--- a/TAO/tests/Object_Loader/README
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
-
-@page Object Loader Test README File
-
-$Id$
-
- Test the DLL-style IORs. For more details on the DLL-style
-IORs please read the documentation in $TAO_ROOT/tao/DLL_Parser.h.
-
- To execute the test simply run
-
-$ ./driver
-
- or run the run_test.pl script. The test returns 0 on success.
-
-*/
diff --git a/TAO/tests/Object_Loader/Test.idl b/TAO/tests/Object_Loader/Test.idl
deleted file mode 100644
index 609fe5f62c8..00000000000
--- a/TAO/tests/Object_Loader/Test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-
-interface Test
-{
- // = TITLE
- // A simple interface to test the Object Loading features in the
- // ORB.
-
- long instance_count ();
-
- void destroy ();
-};
diff --git a/TAO/tests/Object_Loader/Test_i.cpp b/TAO/tests/Object_Loader/Test_i.cpp
deleted file mode 100644
index 6150714b0a5..00000000000
--- a/TAO/tests/Object_Loader/Test_i.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-#include "Test_i.h"
-
-ACE_RCSID(Object_Loader, Test_i, "$Id$")
-
-CORBA::Long
-Test_i::instance_count_ = 0;
-
-Test_i::Test_i (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa))
-{
- Test_i::instance_count_++;
-}
-
-CORBA::Long
-Test_i::instance_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return Test_i::instance_count_;
-}
-
-void
-Test_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var oid =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableServer::POA_ptr
-Test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
diff --git a/TAO/tests/Object_Loader/Test_i.h b/TAO/tests/Object_Loader/Test_i.h
deleted file mode 100644
index 5fc58fc95cd..00000000000
--- a/TAO/tests/Object_Loader/Test_i.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Object_Loader
-//
-// = FILENAME
-// Test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_OBJECT_LOADER_TEST_I_H
-#define TAO_OBJECT_LOADER_TEST_I_H
-
-#include "TestS.h"
-#include "OLT_Export.h"
-
-class OLT_Export Test_i : public POA_Test
-{
- // = TITLE
- // Implement the Test interface
- //
- // = DESCRIPTION
- //
-public:
- Test_i (PortableServer::POA_ptr poa);
- // ctor
-
- CORBA::Long instance_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- PortableServer::POA_var poa_;
- // The default POA used for this object
-
- static CORBA::Long instance_count_;
-};
-
-#endif /* TAO_OBJECT_LOADER_TEST_I_H */
diff --git a/TAO/tests/Object_Loader/driver.cpp b/TAO/tests/Object_Loader/driver.cpp
deleted file mode 100644
index e7e9b391e0d..00000000000
--- a/TAO/tests/Object_Loader/driver.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// $Id$
-//
-
-#include "TestC.h"
-#include "tao/PortableServer/PortableServer.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_stdio.h"
-
-int
-main (int, char *[])
-{
- int niterations = 10;
- int norbs = 10;
-
- ACE_TRY_NEW_ENV
- {
- for (int i = 0; i != niterations; ++i)
- {
- for (int j = 0; j != norbs; ++j)
- {
- char buf[16];
- ACE_OS::sprintf (buf, "ORB_%4.4d", j);
-
- int argc = 0;
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, 0, buf ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->string_to_object ("DLL:Test_Object"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var test =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Long count =
- test->instance_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (count != norbs*i + j + 1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Incorrect number of objects "
- "(%d != %d)\n",
- count, norbs * i + j + 1));
- }
- test->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
-
- for (int j = 0; j != norbs; ++j)
- {
- char buf[16];
- ACE_OS::sprintf (buf, "ORB_%4.4d", j);
-
- int argc = 0;
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, 0, buf ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "main()");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Object_Loader/run_test.pl b/TAO/tests/Object_Loader/run_test.pl
deleted file mode 100755
index 5cc6f2cb6b1..00000000000
--- a/TAO/tests/Object_Loader/run_test.pl
+++ /dev/null
@@ -1,28 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use English;
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if ($OSNAME eq "MSWin32") {
- $ENV{'PATH'} .= ';'.$PerlACE::Process::ExeSubDir;
-} else {
- $ENV{'PATH'} .= ':'.$PerlACE::Process::ExeSubDir;
-}
-
-$T = new PerlACE::Process ("driver");
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Object_Loader/svc.conf b/TAO/tests/Object_Loader/svc.conf
deleted file mode 100644
index 94f31260de2..00000000000
--- a/TAO/tests/Object_Loader/svc.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# $Id$
-#
-dynamic TAO_POA Service_Object * TAO_PortableServer:_make_TAO_Object_Adapter_Factory() ""
-dynamic Test_Object Service_Object * Test_DLL:_make_Loader() ""
-
-
-
diff --git a/TAO/tests/Object_Loader/svc.conf.xml b/TAO/tests/Object_Loader/svc.conf.xml
deleted file mode 100644
index 93b1f7c0c0e..00000000000
--- a/TAO/tests/Object_Loader/svc.conf.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Object_Loader/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <dynamic id="TAO_POA" type="Service_Object">
- <initializer path="TAO_PortableServer" init="_make_TAO_Object_Adapter_Factory"/>
- </dynamic>
- <dynamic id="Test_Object" type="Service_Object">
- <initializer path="Test_DLL" init="_make_Loader"/>
- </dynamic>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Objref_Sequence_Test/.cvsignore b/TAO/tests/Objref_Sequence_Test/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Objref_Sequence_Test/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc b/TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc
deleted file mode 100644
index 650b6c70356..00000000000
--- a/TAO/tests/Objref_Sequence_Test/Objref_Sequence_Test.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Objref_Sequence_Test/README b/TAO/tests/Objref_Sequence_Test/README
deleted file mode 100644
index bae3893870e..00000000000
--- a/TAO/tests/Objref_Sequence_Test/README
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
-
-@page Large Object Reference Sequence Test README File
- This test is for testing large Sequences of Object
- references. The test was donated by Petr Tuma
- <petr.tuma@mff.cuni.cz> with the necessary TAO'ification by Bala.
- This test failed in TAO 1.2 and 1.2.1.
-
- Run the test as follows
-
-$ ./server -o file.ior
-$ ./client -k file://file.ior
-
- The test takes a long time to complete. Please do not include it
- in the daily builds.
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-
-*/
diff --git a/TAO/tests/Objref_Sequence_Test/Test.idl b/TAO/tests/Objref_Sequence_Test/Test.idl
deleted file mode 100644
index c38f43a0c14..00000000000
--- a/TAO/tests/Objref_Sequence_Test/Test.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-//$Id$
-/// Simple interface to send object references back and forth
-interface Server;
-
-typedef sequence<Server> ServerSequence;
-
-interface Server
-{
- void CreateExtra (in unsigned long len,
- out ServerSequence seq) ;
-
- void DeleteExtra (in ServerSequence seq);
-
- // Shutdown operation
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Objref_Sequence_Test/client.cpp b/TAO/tests/Objref_Sequence_Test/client.cpp
deleted file mode 100644
index 3fb96a60ce4..00000000000
--- a/TAO/tests/Objref_Sequence_Test/client.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-//$Id$
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-
-int
-main (int argc, char *argv [])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
-
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) == -1)
- return -1;
-
- // Connect to the server
- CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_var server = Server::_narrow (tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create object instances
- // This portion of the test was given by Petr Tuma and am just
- // leaving it alone -- Bala
- ServerSequence_var vServers;
- ServerSequence_var vAddition;
-
- CORBA::ULong iStep;
- CORBA::ULong iSize, iOldSize, iAddSize;
- CORBA::ULong iCount;
-
- ACE_NEW_RETURN (vServers,
- ServerSequence (),
- -1);
-
- iSize = 1;
- iStep = 1;
- while (iSize <= 50000)
- {
- iOldSize = vServers->length ();
- iAddSize = iSize - iOldSize;
-
- server->CreateExtra (iAddSize,
- vAddition.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- vServers->length (iSize);
- for (iCount = 0 ; iCount < iAddSize ; iCount ++)
- {
- vServers [iOldSize + iCount] =
- Server::_duplicate (vAddition [iCount]);
- };
-
- vAddition = 0;
-
- if (iStep * 5 > iSize)
- {
- iSize += iStep;
- }
- else
- {
- iStep *= 10;
- iSize = iStep;
- };
- };
-
- //------------- End of donated untouched section
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Call delete on the server \n"));
-
- server->DeleteExtra (vServers.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Calling shutdown \n"));
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "");
- ACE_CHECK_RETURN (-1);
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Objref_Sequence_Test/run_test.pl b/TAO/tests/Objref_Sequence_Test/run_test.pl
deleted file mode 100755
index 47ca2a0dba5..00000000000
--- a/TAO/tests/Objref_Sequence_Test/run_test.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (1200);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
-
-
diff --git a/TAO/tests/Objref_Sequence_Test/server.cpp b/TAO/tests/Objref_Sequence_Test/server.cpp
deleted file mode 100644
index 3890ff162fb..00000000000
--- a/TAO/tests/Objref_Sequence_Test/server.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-//$Id$
-#include "TestS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-/// Implement the Server Interface
-class ServerServant :
- public POA_Server
-{
-public:
- /// Ctor
- ServerServant (PortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb);
-
- void CreateExtra (CORBA::ULong length,
- ServerSequence_out seq
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void DeleteExtra (const ServerSequence &seq
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Our root POA
- PortableServer::POA_var root_poa_;
-
- /// The ORB on which we are running
- CORBA::ORB_var orb_;
-};
-
-/// Ctor
-ServerServant::ServerServant (PortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb)
- :root_poa_ (PortableServer::POA::_duplicate (poa)),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-/// Servant implementations
-void
-ServerServant::CreateExtra (CORBA::ULong len,
- ServerSequence_out seq
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Create extra called with "
- " length [%d] \n", len));
-
- ACE_NEW_THROW_EX (seq,
- ServerSequence (len),
- CORBA::NO_MEMORY ());
-
- seq->length (len);
-
- for (CORBA::ULong cnt = 0 ;
- cnt < len ;
- cnt ++)
- {
- ServerServant *servant = 0;
-
- ACE_NEW_THROW_EX (servant,
- ServerServant (this->root_poa_.in (),
- this->orb_.in ()),
- CORBA::NO_MEMORY ());
-
- // PortableServer::ServantBase_var owner_transfer(servant);
- (*seq) [cnt] = servant->_this ();
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Returned from CreateExtra () \n"));
-}
-
-
-
-void
-ServerServant::DeleteExtra (const ServerSequence &seq
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Deleting sequences \n"));
-
- PortableServer::ObjectId_var oid;
- PortableServer::ServantBase *servant = 0;
-
- for (CORBA::ULong cnt = 0;
- cnt < seq.length ();
- cnt++)
- {
- oid =
- this->root_poa_->reference_to_id (seq [cnt]);
- servant =
- this->root_poa_->reference_to_servant (seq [cnt]);
-
- this->root_poa_->deactivate_object (oid.in ());
- servant->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- servant->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Returned after deleting sequences \n"));
-
-}
-
-void
-ServerServant::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-/******************************************************/
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv [])
-
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- if (parse_args (argc, argv) == -1)
- return -1;
-
- ACE_TRY
- {
- // Initialize the broker
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var vRootPOABase =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (vRootPOABase.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_ptr pRootPOAManager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Instantiate the server
- ServerServant *servant = 0;
-
- ACE_NEW_RETURN (servant,
- ServerServant (root_poa.in (),
- orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(servant);
-
- Server_var server =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Announce the server
- CORBA::String_var obj_ref =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", obj_ref.in ());
- ACE_OS::fclose (output_file);
-
- pRootPOAManager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OctetSeq/.cvsignore b/TAO/tests/OctetSeq/.cvsignore
deleted file mode 100644
index 25e07224e39..00000000000
--- a/TAO/tests/OctetSeq/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-OctetSeq
-client
-server
diff --git a/TAO/tests/OctetSeq/OctetSeq.cpp b/TAO/tests/OctetSeq/OctetSeq.cpp
deleted file mode 100644
index 995499aca20..00000000000
--- a/TAO/tests/OctetSeq/OctetSeq.cpp
+++ /dev/null
@@ -1,257 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OctetSeq
-//
-// = FILENAME
-// octetseq.cpp
-//
-// = DESCRIPTION
-// TAO optimizes octet sequences, this test verifies that the
-// optimizations do not break any code and that they effectively
-// improve performance.
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-
-#include "tao/ORB.h"
-#include "tao/CDR.h"
-#include "testC.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(OctetSeq, OctetSeq, "$Id$")
-
-static int
-test_write_octet (TAO_OutputCDR &cdr,
- char* /* buf */,
- size_t bufsize)
-{
-#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
- ACE_Message_Block mb (/* buf, */ bufsize);
- mb.wr_ptr (bufsize);
- Test::OctetSeq os (bufsize, &mb);
-#else
- Test::OctetSeq os (bufsize);
- os.length (bufsize);
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
-
-
- if ((cdr << os) == 0)
- return -1;
- return 0;
-}
-
-static int
-test_read_octet (TAO_InputCDR &cdr,
- char* /* buf */,
- size_t /* bufsize */)
-{
- Test::OctetSeq os;
-
- if ((cdr >> os) == 0)
- return -1;
- return 0;
-}
-
-static int
-test_write_char (TAO_OutputCDR &cdr,
- char* buf,
- size_t bufsize)
-{
- Test::CharSeq cs (bufsize, bufsize, buf);
-
- if ((cdr << cs) == 0)
- return -1;
- return 0;
-}
-
-static int
-test_read_char (TAO_InputCDR &cdr,
- char* /* buf */,
- size_t /* bufsize */)
-{
- Test::CharSeq cs;
-
- if ((cdr >> cs) == 0)
- return -1;
- return 0;
-}
-
-typedef
-int (*Writer)(TAO_OutputCDR& cdr,
- char* buf, size_t bufsize);
-typedef
-int (*Reader)(TAO_InputCDR& cdr,
- char* buf, size_t bufsize);
-
-int
-run (char* buf, size_t bufsize,
- size_t n, size_t lo, size_t s,
- int quiet,
- const char* name,
- Writer writer, Reader reader)
-{
- size_t count = 0;
- double sum_read = 0;
- double sum_write = 0;
-
- for (size_t x = lo; x <= bufsize; x += s)
- {
- ACE_High_Res_Timer writing;
- ACE_High_Res_Timer reading;
-
- for (size_t i = 0; i < n; ++i)
- {
- writing.start_incr ();
- TAO_OutputCDR output;
-
- if (writer (output, buf, x) != 0)
- return -1;
- writing.stop_incr ();
-
- TAO_InputCDR input (output);
- reading.start_incr ();
- if (reader (input, buf, x) != 0)
- return -1;
- reading.stop_incr ();
- }
-
- double m = n;
-
- ACE_Time_Value wtv;
- writing.elapsed_time_incr (wtv);
- ACE_hrtime_t wusecs = wtv.sec ();
- wusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS);
- wusecs += wtv.usec ();
-
- ACE_Time_Value rtv;
- reading.elapsed_time_incr (rtv);
- ACE_hrtime_t rusecs = rtv.sec ();
- rusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS);
- rusecs += rtv.usec ();
-
- double write_average = ACE_HRTIME_CONVERSION(wusecs) / m;
- double read_average = ACE_HRTIME_CONVERSION(rusecs) / m;
-
- count++;
- sum_read += read_average;
- sum_write += write_average;
- if (quiet == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s: %d %.3f %.3f\n",
- name, x, write_average, read_average));
- }
- }
-
- if (count != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s total: %.3f %.3f\n",
- name, sum_write / count, sum_read / count));
- }
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int n = 64;
- int lo = 128;
- int hi = 65536;
- int s = 32;
-
- int quiet = 0;
-
- ACE_Get_Opt get_opt (argc, argv, "qn:l:h:s:");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt)
- {
- case 'n':
- n = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 'l':
- lo = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 'h':
- hi = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 's':
- s = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case 'q':
- quiet = 1;
- break;
-
- case '?':
- default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "-l low "
- "-h high "
- "-s step "
- "-n n "
- "\n"
- "Writes and then reads octet sequences to a CDR stream "
- "starting from <low> up to <high> incrementing "
- "by <step>, at each step run <n> iterations to "
- "average."
- "\n",
- argv[0]));
- return -1;
- }
- }
-
- ACE_DEBUG ((LM_DEBUG, "Running:\n"
- " low: %d\n"
- " hi : %d\n"
- " s : %d\n"
- " n : %d\n",
- lo, hi, s, n));
-
- // Create a "big" buffer and fill it up.
- char* buf = new char[hi];
- CORBA::Long l = 0xdeadbeef;
- for (int i = 0; i < hi / (int) sizeof (l); ++i)
- {
- ACE_OS::memcpy (buf + sizeof (l) * i, &l, sizeof (l));
- }
-
- if (run (buf, hi,
- n, lo, s, quiet,
- "OCTET", test_write_octet, test_read_octet) != 0)
- return 1;
-
- if (run (buf, hi,
- n, lo, s, quiet,
- "CHAR", test_write_char, test_read_char) != 0)
- return 1;
- delete[] buf;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "OctetSeq");
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OctetSeq/OctetSeq.mpc b/TAO/tests/OctetSeq/OctetSeq.mpc
deleted file mode 100644
index 4a526ffae60..00000000000
--- a/TAO/tests/OctetSeq/OctetSeq.mpc
+++ /dev/null
@@ -1,29 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- avoids += ace_for_tao
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- avoids += ace_for_tao
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
-project(*OctetSeq): taoclient, anytypecode {
- exename = OctetSeq
- after += *Client
- Source_Files {
- testC.cpp
- OctetSeq.cpp
- }
-}
-
diff --git a/TAO/tests/OctetSeq/README b/TAO/tests/OctetSeq/README
deleted file mode 100644
index de0d10c571c..00000000000
--- a/TAO/tests/OctetSeq/README
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id$
-
-= server, client
-
- This test verifies that the optimizations for octet sequences
-don't have strange side effects. The clients sends a number of octet
-sequences that are stored by the server, it then queries the CRC
-checksum for several of them (at random) to verify that the contents
-are intact.
- To run this test try:
-
-$ server -o test.ior
-$ client -k file://test.ior -i 10000 -v
-
-= OctetSeq
-
- This test measures the time it takes to marshal sequences of
-octets of different sizes. Since TAO optimizes octet sequence
-marshaling it was interesting to compare that time with the time to
-marshal sequences of chars (which could be optimized also, but there
-is no need for it).
-
- The test accepts a few options:
-
- -l <low>
- Sets the minimum size of the sequences tested.
-
- -h <high>
- The maximum size of the sequences tested.
-
- -s <step>
- Increase the size of the sequence from <low> to <high>
- in increments of <step>
-
- -n <iter>
- The number of iterations (marshaling/demarshaling)
- done for each loop.
-
- -q
- Be quiet, only print the summary data....
-
- Example:
-
-$ ./OctetSeq -l 4096 -h 8192 -s 16 -n 32 -q
diff --git a/TAO/tests/OctetSeq/client.cpp b/TAO/tests/OctetSeq/client.cpp
deleted file mode 100644
index e781734a4b2..00000000000
--- a/TAO/tests/OctetSeq/client.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/ACE.h"
-#include "testC.h"
-#include "ace/OS_NS_time.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(OctetSeq, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 5;
-ACE_RANDR_TYPE seed = 0;
-int verbose = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "vk:i:s:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 's':
- seed = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'v':
- verbose = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <niterations> "
- "-s <seed> "
- "-v "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Database_var server =
- Test::Database::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
-#if (TAO_HAS_MINIMUM_CORBA == 0)
- CORBA::String_var repository_id =
- server->_repository_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (repository_id.in (), "IDL:Test/Database:1.0") != 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Repository id is wrong <%s>\n",
- repository_id.in ()),
- 1);
- }
-#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
-
- if (seed == 0)
- {
- seed = ACE_OS::time (0);
- ACE_DEBUG ((LM_DEBUG, "Seed value is %d\n", seed));
- }
-
- const int nelements = 64; // @@ TODO
- const int maxsize = 1024;
- Test::OctetSeq elements[nelements];
-
- for (int i = 0; i != niterations; ++i)
- {
- CORBA::ULong r = ACE_OS::rand_r (seed);
- Test::Index idx = (r % nelements);
-
- if (i % 100 == 0)
- {
- for (int j = 0; j != nelements; ++j)
- {
- CORBA::ULong r = ACE_OS::rand_r (seed);
- CORBA::ULong l = r % maxsize;
- elements[j].length (l);
- CORBA::Double token = 0;
- for (CORBA::ULong k = 0; k != l; ++k)
- {
- r = ACE_OS::rand_r (seed);
- elements[j][k] = (r % 128);
- token += r;
- }
- CORBA::Double returned_token;
- server->set (Test::Index (j),
- elements[j],
- token,
- returned_token
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (token != returned_token)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR - invalid token <%f> returned,"
- " expecting %f in (%d,%d)\n",
- returned_token, token, i, j));
- }
- }
- }
-
- CORBA::ULong crc_remote =
- server->get_crc (idx ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong crc_local =
- ACE::crc32 (elements[idx].get_buffer (),
- elements[idx].length ());
-
- if (crc_local != crc_remote)
- {
- ACE_DEBUG ((LM_DEBUG,
- "CRC mismatch for element %d\n", idx));
- }
- else if (verbose == 1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "CRC <%u> matched for element %d\n",
- crc_remote, idx));
- }
-
- }
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OctetSeq/run_test.pl b/TAO/tests/OctetSeq/run_test.pl
deleted file mode 100755
index 310ec99245f..00000000000
--- a/TAO/tests/OctetSeq/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-i 5000 -k file://$iorfile");
-$T = new PerlACE::Process ("OctetSeq", "-n 32 -l 8192 -h 8192 -s 1 -q");
-
-print STDERR "\n\n==== Octet sequence passing test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (120);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== Octet sequence performance test\n";
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OctetSeq/run_test1.pl b/TAO/tests/OctetSeq/run_test1.pl
deleted file mode 100755
index 501ad0b235a..00000000000
--- a/TAO/tests/OctetSeq/run_test1.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test1.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBSvcConf svc1$PerlACE::svcconf_ext -o test1.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBSvcConf svc1$PerlACE::svcconf_ext -o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-ORBSvcConf svc1$PerlACE::svcconf_ext -i 5000 -k file://$iorfile");
-$T = new PerlACE::Process ("OctetSeq", "-ORBSvcConf svc1$PerlACE::svcconf_ext -n 32 -l 8192 -h 8192 -s 1 -q");
-
-print STDERR "\n\n==== Octet sequence passing test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (120);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== Octet sequence performance test\n";
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OctetSeq/run_test2.pl b/TAO/tests/OctetSeq/run_test2.pl
deleted file mode 100755
index 0b6849e3ac8..00000000000
--- a/TAO/tests/OctetSeq/run_test2.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test2.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBSvcConf svc2$PerlACE::svcconf_ext -o test2.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBSvcConf svc2$PerlACE::svcconf_ext -o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-ORBSvcConf svc2$PerlACE::svcconf_ext -i 5000 -k file://$iorfile");
-$T = new PerlACE::Process ("OctetSeq", "-ORBSvcConf svc2$PerlACE::svcconf_ext -n 32 -l 8192 -h 8192 -s 1 -q");
-
-print STDERR "\n\n==== Octet sequence passing test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (120);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-print STDERR "\n\n==== Octet sequence performance test\n";
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/OctetSeq/server.cpp b/TAO/tests/OctetSeq/server.cpp
deleted file mode 100644
index 59e56b30f2d..00000000000
--- a/TAO/tests/OctetSeq/server.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (OctetSeq,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- {
- Database_i server_impl (orb.in (),
- 128); // @@ TODO
-
- Test::Database_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/OctetSeq/svc1.conf b/TAO/tests/OctetSeq/svc1.conf
deleted file mode 100644
index 93e97c126a4..00000000000
--- a/TAO/tests/OctetSeq/svc1.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-#
-
-dynamic Advanced_Resource_Factory Service_Object *
-TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBInputCDRAllocator null"
diff --git a/TAO/tests/OctetSeq/svc1.conf.xml b/TAO/tests/OctetSeq/svc1.conf.xml
deleted file mode 100644
index cfc3d7f7e1c..00000000000
--- a/TAO/tests/OctetSeq/svc1.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/OctetSeq/svc1.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <dynamic id="Advanced_Resource_Factory" type="Service_Object">
- <initializer path="TAO_Strategies" init="_make_TAO_Advanced_Resource_Factory" params="-ORBInputCDRAllocator null"/>
- </dynamic>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/OctetSeq/svc2.conf b/TAO/tests/OctetSeq/svc2.conf
deleted file mode 100644
index 93e97c126a4..00000000000
--- a/TAO/tests/OctetSeq/svc2.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-#
-
-dynamic Advanced_Resource_Factory Service_Object *
-TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBInputCDRAllocator null"
diff --git a/TAO/tests/OctetSeq/svc2.conf.xml b/TAO/tests/OctetSeq/svc2.conf.xml
deleted file mode 100644
index 13d8e571ba0..00000000000
--- a/TAO/tests/OctetSeq/svc2.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/OctetSeq/svc2.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <dynamic id="Advanced_Resource_Factory" type="Service_Object">
- <initializer path="TAO_Strategies" init="_make_TAO_Advanced_Resource_Factory" params="-ORBInputCDRAllocator null"/>
- </dynamic>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/OctetSeq/test.idl b/TAO/tests/OctetSeq/test.idl
deleted file mode 100644
index 493c026dd0c..00000000000
--- a/TAO/tests/OctetSeq/test.idl
+++ /dev/null
@@ -1,57 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OctetSeq
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test octet sequences.
-//
-// = AUTHORS
-// Carlos O'Ryan <coryan@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test
-{
- typedef sequence<octet> OctetSeq;
- typedef sequence<char> CharSeq;
-
- typedef unsigned short Index;
-
- exception OutOfRange {
- Index min_index;
- Index max_index;
- };
-
- interface Database
- {
- // = TITLE
- // A database of octet sequences
- //
- // = DESCRIPTION
- // Just a silly IDL file to test if the ORB can hold octet
- // sequences intact between calls. Regularly this wouldn't be a
- // problem, but TAO optimizations for octet sequences make that
- // a little trickier to ensure.
- //
- void set (in Index i,
- in OctetSeq value,
- in double verification_token,
- out double returned_token)
- raises (OutOfRange);
-
- OctetSeq get (in Index i)
- raises (OutOfRange);
-
- unsigned long get_crc (in Index i)
- raises (OutOfRange);
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/OctetSeq/test_i.cpp b/TAO/tests/OctetSeq/test_i.cpp
deleted file mode 100644
index 7e348c45627..00000000000
--- a/TAO/tests/OctetSeq/test_i.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/ACE.h"
-
-#if !defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(OctetSeq, test_i, "$Id$")
-
-Database_i::~Database_i (void)
-{
- delete[] this->elements_;
-}
-
-void
-Database_i::set (Test::Index i,
- const Test::OctetSeq& seq,
- CORBA::Double verification_token,
- CORBA::Double_out returned_token
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Test::OutOfRange))
-{
- if (i >= this->max_range_)
- ACE_THROW (Test::OutOfRange (0, this->max_range_));
-
- returned_token = verification_token;
-
-#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
- CORBA::ULong len = seq.length ();
- // CORBA::ULong max = seq.maximum ();
- ACE_Message_Block *mb = seq.mb ();
- if (mb == 0)
- {
- this->elements_[i] = seq;
- }
- else
- {
- this->elements_[i].replace (len, seq.mb ());
- }
-#else
- this->elements_[i] = seq;
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
-}
-
-Test::OctetSeq*
-Database_i::get (Test::Index i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test::OutOfRange))
-{
- if (i >= this->max_range_)
- ACE_THROW_RETURN (Test::OutOfRange (0, this->max_range_), 0);
-
- Test::OctetSeq* copy;
- ACE_NEW_THROW_EX (copy,
- Test::OctetSeq (this->elements_[i]),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
- return copy;
-}
-
-CORBA::ULong
-Database_i::get_crc (Test::Index i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test::OutOfRange))
-{
- if (i >= this->max_range_)
- ACE_THROW_RETURN (Test::OutOfRange (0, this->max_range_), 0);
-
- return ACE::crc32 (this->elements_[i].get_buffer (),
- this->elements_[i].length ());
-}
-
-void
-Database_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/OctetSeq/test_i.h b/TAO/tests/OctetSeq/test_i.h
deleted file mode 100644
index ade6a84e861..00000000000
--- a/TAO/tests/OctetSeq/test_i.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/OctetSeq
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_OCTETSEQ_TEST_I_H
-#define TAO_OCTETSEQ_TEST_I_H
-
-#include "testS.h"
-
-class Database_i : public POA_Test::Database
-{
- // = DESCRIPTION
- // Implements the Database interface in test.idl
- //
-public:
- Database_i (CORBA::ORB_ptr orb,
- Test::Index max_range);
- // ctor
-
- ~Database_i (void);
- // dtor
-
- // = The Simple_Server methods.
- void set (Test::Index i,
- const Test::OctetSeq& seq,
- CORBA::Double verification_token,
- CORBA::Double_out returned_token
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((Test::OutOfRange));
-
- Test::OctetSeq* get (Test::Index i
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,Test::OutOfRange));
-
- CORBA::ULong get_crc (Test::Index i
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,Test::OutOfRange));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB pointer
-
- Test::Index max_range_;
- // The maximum number of elements in the database
-
- Test::OctetSeq* elements_;
- // The elements
-};
-
-#if defined(__ACE_INLINE__)
-#include "test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_MT_CLIENT_TEST_I_H */
diff --git a/TAO/tests/OctetSeq/test_i.i b/TAO/tests/OctetSeq/test_i.i
deleted file mode 100644
index eb8ded0afd6..00000000000
--- a/TAO/tests/OctetSeq/test_i.i
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Database_i::Database_i (CORBA::ORB_ptr orb,
- Test::Index max_range)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- max_range_ (max_range)
-{
- ACE_NEW (this->elements_, Test::OctetSeq[this->max_range_]);
-}
diff --git a/TAO/tests/Ondemand_Write/Hello.cpp b/TAO/tests/Ondemand_Write/Hello.cpp
deleted file mode 100644
index 6e0195eff58..00000000000
--- a/TAO/tests/Ondemand_Write/Hello.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (
- ::CORBA::Long ,
- const char * inputa,
- ::CORBA::Long ,
- const char * )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (inputa);
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Ondemand_Write/Hello.h b/TAO/tests/Ondemand_Write/Hello.h
deleted file mode 100644
index 17f387990e2..00000000000
--- a/TAO/tests/Ondemand_Write/Hello.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (
- ::CORBA::Long valuea,
- const char * inputa,
- ::CORBA::Long valueb,
- const char * inputb)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Ondemand_Write/Ondemand_Write.mpc b/TAO/tests/Ondemand_Write/Ondemand_Write.mpc
deleted file mode 100644
index 9a1892855d9..00000000000
--- a/TAO/tests/Ondemand_Write/Ondemand_Write.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Ondemand_Write/README b/TAO/tests/Ondemand_Write/README
deleted file mode 100644
index ee77329decb..00000000000
--- a/TAO/tests/Ondemand_Write/README
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
-
-@page Hello Test README File
-
- The simplest possible test for TAO. This is a very simple
-test for TAO, it can be argued that it is in fact too simple to do
-anything useful, i.e. chances are that this test will always pass.
-
- The goals of writing this test are:
-
-- Provide a very simple, very fast 'smoke test' for ORB developers.
- If Hello does not pass then something is extremely broken and you
- should go back to the drawing board.
-- Provide a code base to write more complex tests
-- Rule out basic infrastructure problems: if this test does not work
- for a user then the infrastructure (network, DNS, host
- configuration) are more likely to be at fault than the ORB.
-- External users are often asked to send us a 'simple test' for their
- use case, we can now point them to this test to explain what do we
- mean by "simple".
-- The -GA option has been added to the IDL compiler command line.
- This option generates type code and Any insertion/extraction
- operator implementations in a separate file with the extension *A.cpp.
- This file is not included in the compilation however, to make sure
- there is no dependency on it if the client and server do not use
- type codes or Anys.
-
- Please refrain from "improving", extending or expanding this
-test, if you need to change
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Ondemand_Write/Test.idl b/TAO/tests/Ondemand_Write/Test.idl
deleted file mode 100644
index 59719f1eee7..00000000000
--- a/TAO/tests/Ondemand_Write/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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 (in long valuea, in string inputa, in long valueb, in string inputb);
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Ondemand_Write/client.cpp b/TAO/tests/Ondemand_Write/client.cpp
deleted file mode 100644
index e000950a65a..00000000000
--- a/TAO/tests/Ondemand_Write/client.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var test_string = CORBA::string_dup ("661234567890123456789012345678901234567890");
- CORBA::String_var the_string =
- hello->get_string (5, test_string.in (), 6, test_string.in ());
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Ondemand_Write/run_test.pl b/TAO/tests/Ondemand_Write/run_test.pl
deleted file mode 100644
index 023e5521bca..00000000000
--- a/TAO/tests/Ondemand_Write/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -ORBMaxMessageSize 40 ");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBMaxMessageSize 40 -ORBDebugLevel 10 ");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Ondemand_Write/server.cpp b/TAO/tests/Ondemand_Write/server.cpp
deleted file mode 100644
index 177aad4d1d8..00000000000
--- a/TAO/tests/Ondemand_Write/server.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Oneway_Buffering/.cvsignore b/TAO/tests/Oneway_Buffering/.cvsignore
deleted file mode 100644
index 5c0ae7e0d7e..00000000000
--- a/TAO/tests/Oneway_Buffering/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-admin
-client
-server
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp
deleted file mode 100644
index 9942c6020d6..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $Id$
-//
-#include "Oneway_Buffering.h"
-
-ACE_RCSID(Oneway_Buffering, Oneway_Buffering, "$Id$")
-
-Oneway_Buffering::Oneway_Buffering (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_Admin_ptr admin)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , admin_ (Test::Oneway_Buffering_Admin::_duplicate (admin))
-{
-}
-
-void
-Oneway_Buffering::receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->admin_->request_received (the_payload.length () ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Oneway_Buffering::flush (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Oneway_Buffering::sync (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->admin_->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Oneway_Buffering::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering.h
deleted file mode 100644
index c1cc0c5144b..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAY_BUFFERING_H
-#define ONEWAY_BUFFERING_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Oneway_Buffering interface
-class Oneway_Buffering
- : public virtual POA_Test::Oneway_Buffering
-{
-public:
- /// Constructor
- Oneway_Buffering (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_Admin_ptr admin);
-
- // = The skeleton methods
- virtual void receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void sync (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-
- /// Report request progress to this interface
- Test::Oneway_Buffering_Admin_var admin_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAY_BUFFERING_H */
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc b/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc
deleted file mode 100644
index ee95112f143..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): messaging, taoexe, portableserver {
- Source_Files {
- Oneway_Buffering.cpp
- server.cpp
- }
-}
-
-// These next two projects depend on *Server (the above project)
-// due to the possibility of parallelism for the GNUACE type. If
-// -j 2 or more is used to build this project, multiple instances
-// of tao_idl are invoked for Test.idl. They begin to overwrite the
-// generated source files and cause problems for the processes that
-// have gone on to build the generated files. By depending on *Server,
-// only one process is allowed to compile Test.idl and thus the build
-// succeeds.
-project(*Client): messaging, taoexe, portableserver {
- requires += corba_messaging
- after += *Server
-
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
-project(*Admin): messaging, taoexe, portableserver {
- after += *Client
- Source_Files {
- Oneway_Buffering_Admin.cpp
- admin.cpp
- }
-}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp
deleted file mode 100644
index a04178e6012..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// $Id$
-//
-#include "Oneway_Buffering_Admin.h"
-
-ACE_RCSID(Oneway_Buffering, Oneway_Buffering_Admin, "$Id$")
-
-Oneway_Buffering_Admin::Oneway_Buffering_Admin (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , request_count_ (0)
- , bytes_received_count_ (0)
-{
-}
-
-CORBA::ULong
-Oneway_Buffering_Admin::request_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->request_count_;
-}
-
-CORBA::ULong
-Oneway_Buffering_Admin::bytes_received_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->bytes_received_count_;
-}
-
-void
-Oneway_Buffering_Admin::request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->request_count_++;
- this->bytes_received_count_ += payload_length;
-}
-
-void
-Oneway_Buffering_Admin::flush (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Oneway_Buffering_Admin::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h
deleted file mode 100644
index bf1a4dbbdde..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAY_BUFFERING_ADMIN_H
-#define ONEWAY_BUFFERING_ADMIN_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Oneway_Buffering_Admin interface
-class Oneway_Buffering_Admin
- : public virtual POA_Test::Oneway_Buffering_Admin
-{
-public:
- /// Constructor
- Oneway_Buffering_Admin (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual CORBA::ULong request_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong bytes_received_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-
- /// Keep track of the number of requests received
- CORBA::ULong request_count_;
-
- /// Keep track of the number of requests received
- CORBA::ULong bytes_received_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAY_BUFFERING_H */
diff --git a/TAO/tests/Oneway_Buffering/README b/TAO/tests/Oneway_Buffering/README
deleted file mode 100644
index c2a90e9b932..00000000000
--- a/TAO/tests/Oneway_Buffering/README
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
-
-@page Oneway_Buffering Test README File
-
- A regression test for oneway buffering. The test verifies
-that the TAO::BufferingConstraint policies are respected by the
-ORB. Three separate tests are possible:
-
-- TAO::BUFFER_MESSAGE_COUNT: The buffer should not be flushed until
- enough messages are in the queue.
-
-- TAO::BUFFER_TIMEOUT: The buffer should not be flushed unless the
- specified interval has expired.
-
-- TAO::BUFFER_MESSAGE_BYTES: The buffer should not be flushed until
- enough bytes are in the queue.
-
- To run the test use run_test.pl script:
-
-$ ./run_test.pl
-
- the nightly regression builds impose severe constraints on the
-maximum time allowed for a single test. Three separate scripts are
-used to stay within those bounds:
-
-$ ./run_message_count.pl
-$ ./run_timeout.pl
-$ ./run_message_bytes.pl
-
- each script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Oneway_Buffering/Test.idl b/TAO/tests/Oneway_Buffering/Test.idl
deleted file mode 100644
index c215a596602..00000000000
--- a/TAO/tests/Oneway_Buffering/Test.idl
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A sequence of octets to generate bigger messages
- typedef sequence<octet> Payload;
-
- /// Clients use this interface to send oneway requests
- interface Oneway_Buffering
- {
- /// Return a simple string
- oneway void receive_data (in Payload the_payload);
-
- /// An empty operation to force a flush in the ORB queues
- oneway void flush ();
-
- /// Synchronize the state with the Admin object.
- /**
- * Once flush() has been invoked (with the correct buffering
- * policies) we must use sync() to ensure that both the main
- * server and the Admin servers are in sync.
- */
- void sync ();
-
- /// Shutdown the server
- void shutdown ();
- };
-
- /// Clients use this interface to query the number of oneway
- /// requests received.
- interface Oneway_Buffering_Admin
- {
- /// Number of oneway requests received
- unsigned long request_count ();
-
- /// Number of bytes received
- unsigned long bytes_received_count ();
-
- /// The Oneway_Buffering interface uses this method to report any
- /// request received.
- void request_received (in unsigned long payload_length);
-
- /// An empty operation to force a flush in the ORB queues
- void flush ();
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- void shutdown ();
- };
-};
diff --git a/TAO/tests/Oneway_Buffering/admin.cpp b/TAO/tests/Oneway_Buffering/admin.cpp
deleted file mode 100644
index 4ab858a5e46..00000000000
--- a/TAO/tests/Oneway_Buffering/admin.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "Oneway_Buffering_Admin.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Oneway_Buffering, admin, "$Id$")
-
-const char *ior_output_file = "admin.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Oneway_Buffering_Admin *oneway_buffering_admin_impl;
- ACE_NEW_RETURN (oneway_buffering_admin_impl,
- Oneway_Buffering_Admin (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(oneway_buffering_admin_impl);
-
- Test::Oneway_Buffering_Admin_var oneway_buffering_admin =
- oneway_buffering_admin_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (oneway_buffering_admin.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) admin - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in admin:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Oneway_Buffering/client.cpp b/TAO/tests/Oneway_Buffering/client.cpp
deleted file mode 100644
index a0ab26bed3e..00000000000
--- a/TAO/tests/Oneway_Buffering/client.cpp
+++ /dev/null
@@ -1,793 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/TAOC.h"
-#include "tao/AnyTypeCode/TAOA.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_sys_time.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Oneway_Buffering, client, "$Id$")
-
-const char *server_ior = "file://server.ior";
-const char *admin_ior = "file://admin.ior";
-int iterations = 200;
-
-int run_message_count_test = 0;
-int run_timeout_test = 0;
-int run_timeout_reactive_test = 0;
-int run_buffer_size_test = 0;
-
-const int PAYLOAD_LENGTH = 1024;
-const int BUFFERED_MESSAGES_COUNT = 50;
-const unsigned int TIMEOUT_MILLISECONDS = 50;
-const int BUFFER_SIZE = 64 * PAYLOAD_LENGTH;
-
-/// Check that no more than 10% of the messages are not sent.
-const double LIVENESS_TOLERANCE = 0.9;
-
-/// Limit the depth of the liveness test, avoid blowing up the stack
-/// on the server
-const int LIVENESS_MAX_DEPTH = 256;
-
-/// Factor in GIOP overhead in the buffer size test
-const double GIOP_OVERHEAD = 0.9;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:a:i:ctbr");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
-
- case 'a':
- admin_ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'c':
- run_message_count_test = 1;
- break;
-
- case 't':
- run_timeout_test = 1;
- break;
-
- case 'b':
- run_buffer_size_test = 1;
- break;
-
- case 'r':
- run_timeout_reactive_test = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <server_ior> "
- "-a <admin_ior> "
- "-i <iterations> "
- "<-c|-t|-b|-r> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-run_message_count (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_timeout (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_timeout_reactive (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_buffer_size (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-main (int argc, char *argv[])
-{
- int test_failed = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Buffering_var oneway_buffering =
- Test::Oneway_Buffering::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (oneway_buffering.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Oneway_Buffering reference <%s>\n",
- server_ior),
- 1);
- }
-
- tmp =
- orb->string_to_object(admin_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Buffering_Admin_var oneway_buffering_admin =
- Test::Oneway_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (oneway_buffering_admin.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Oneway_Buffering_Admin reference <%s>\n",
- admin_ior),
- 1);
- }
-
- if (run_message_count_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running message count flushing test\n"));
- test_failed =
- run_message_count (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_timeout_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running timeout flushing test\n"));
- test_failed =
- run_timeout (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_timeout_reactive_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running timeout (reactive) flushing test\n"));
- test_failed =
- run_timeout_reactive (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_buffer_size_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running buffer size flushing test\n"));
- test_failed =
- run_buffer_size (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: No test was configured\n"));
- }
-
- oneway_buffering->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_OS::sleep(1);
- oneway_buffering_admin->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return test_failed;
-}
-
-int
-configure_policies (CORBA::ORB_ptr orb,
- const TAO::BufferingConstraint &buffering_constraint,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_out flusher
- ACE_ENV_ARG_DECL)
-{
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_NONE;
-
- CORBA::Any buffering_as_any;
- buffering_as_any <<= buffering_constraint;
-
- CORBA::PolicyList policies (2); policies.length (2);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- policies[1] =
- orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO::BufferingConstraint flush_constraint;
- flush_constraint.mode = TAO::BUFFER_FLUSH;
- flush_constraint.message_count = 0;
- flush_constraint.message_bytes = 0;
- flush_constraint.timeout = 0;
-
- buffering_as_any <<= flush_constraint;
- policies.length (1);
- policies[0] =
- orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- object =
- oneway_buffering->_set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- flusher =
- Test::Oneway_Buffering::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-void
-sync_server (Test::Oneway_Buffering_ptr flusher
- ACE_ENV_ARG_DECL)
-{
- // Get back in sync with the server...
- flusher->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- flusher->sync (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-run_liveness_test (Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_ptr flusher,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG, ".... checking for liveness\n"));
- int test_failed = 0;
-
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong send_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int liveness_test_iterations = int(send_count);
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- int depth = 0;
- for (int i = 0; i != liveness_test_iterations; ++i)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Once the system has sent enough messages we don't
- // expect it to fall too far behind, i.e. at least 90% of the
- // messages should be delivered....
- CORBA::ULong expected =
- CORBA::ULong (LIVENESS_TOLERANCE * send_count);
-
- if (receive_count < expected)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d "
- "not enough messages received %u "
- "expected %u\n",
- i, receive_count, expected));
-
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- if (depth++ == LIVENESS_MAX_DEPTH)
- {
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- depth = 0;
- }
-
- }
-
- return test_failed;
-}
-
-int
-run_message_count (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_MESSAGE_COUNT;
- buffering_constraint.message_count = BUFFERED_MESSAGES_COUNT;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = 0;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- while (1)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong iteration_count =
- send_count - initial_receive_count;
- if (receive_count != initial_receive_count)
- {
- if (iteration_count < CORBA::ULong(BUFFERED_MESSAGES_COUNT))
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "message count reached. "
- "Iteration count = %u, Threshold = %u\n",
- i,
- iteration_count, BUFFERED_MESSAGES_COUNT));
- }
- break;
- }
-
- if (iteration_count > 3 * BUFFERED_MESSAGES_COUNT)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "message count threshold. "
- "Iteration count = %u, Threshold = %u\n",
- i,
- iteration_count, BUFFERED_MESSAGES_COUNT));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
- return test_failed;
-}
-
-int
-run_timeout (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = TIMEOUT_MILLISECONDS * 10000;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- ACE_Time_Value start = ACE_OS::gettimeofday ();
- while (1)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
- if (receive_count != initial_receive_count)
- {
- if (elapsed.msec () < TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "timeout expired. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- }
- // terminate the while loop.
- break;
- }
-
- if (elapsed.msec () > 3 * TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "timeout threshold. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
-
- return test_failed;
-}
-
-int
-run_timeout_reactive (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = TIMEOUT_MILLISECONDS * 10000;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- ACE_Time_Value start = ACE_OS::gettimeofday ();
- for (int j = 0; j != 20; ++j)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
- }
- while (1)
- {
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value sleep (0, 10000);
- orb->run (sleep ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
- if (receive_count != initial_receive_count)
- {
- if (elapsed.msec () < TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "timeout expired. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- }
- // terminate the while loop.
- break;
- }
-
- if (elapsed.msec () > 3 * TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "timeout threshold. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
-
- return test_failed;
-}
-
-int
-run_buffer_size (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_MESSAGE_BYTES;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = BUFFER_SIZE;
- buffering_constraint.timeout = 0;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong bytes_sent = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_bytes_received =
- oneway_buffering_admin->bytes_received_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_bytes_received != bytes_sent)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d data lost (%u != %u)\n",
- i, initial_bytes_received, bytes_sent));
- }
-
- while (1)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- bytes_sent += PAYLOAD_LENGTH;
-
- CORBA::ULong bytes_received =
- oneway_buffering_admin->bytes_received_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong payload_delta =
- bytes_sent - initial_bytes_received;
- if (bytes_received != initial_bytes_received)
- {
- // The queue has been flushed, check that enough data
- // has been sent. The check cannot be precise because
- // the ORB counts the GIOP message overhead, in this
- // test we assume the overhead to be less than 10%
-
- if (payload_delta < CORBA::ULong (GIOP_OVERHEAD * BUFFER_SIZE))
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "minimum buffer size was reached. "
- "Sent = %u, Minimum buffer = %u bytes\n",
- i,
- payload_delta, BUFFER_SIZE));
- }
- break;
- }
-
- if (payload_delta > 3 * BUFFER_SIZE)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "buffer size threshold. "
- "Sent = %u, Minimum buffer = %u bytes\n",
- i,
- payload_delta, BUFFER_SIZE));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
- return test_failed;
-}
diff --git a/TAO/tests/Oneway_Buffering/run_buffer_size.pl b/TAO/tests/Oneway_Buffering/run_buffer_size.pl
deleted file mode 100755
index 065f17c1d93..00000000000
--- a/TAO/tests/Oneway_Buffering/run_buffer_size.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-b ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_message_count.pl b/TAO/tests/Oneway_Buffering/run_message_count.pl
deleted file mode 100755
index 614b25b54ff..00000000000
--- a/TAO/tests/Oneway_Buffering/run_message_count.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-c ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_test.pl b/TAO/tests/Oneway_Buffering/run_test.pl
deleted file mode 100755
index c753bc938c8..00000000000
--- a/TAO/tests/Oneway_Buffering/run_test.pl
+++ /dev/null
@@ -1,69 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-foreach $test_type ("-c", "-t", "-b", "-r") {
- unlink $admin_iorfile;
- unlink $server_iorfile;
-
- my $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
- my $SV = new PerlACE::Process ("server", "-o $server_iorfile " .
- "-k file://$admin_iorfile");
- my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- .$test_type);
-
- $AD->Spawn ();
-
- if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
- }
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- $client = $CL->SpawnWaitKill (300);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-
- $server = $SV->WaitKill (10);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- $admin = $AD->WaitKill (10);
-
- if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
- }
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_timeout.pl b/TAO/tests/Oneway_Buffering/run_timeout.pl
deleted file mode 100755
index 4f8bbe2fde3..00000000000
--- a/TAO/tests/Oneway_Buffering/run_timeout.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-t ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_timeout_reactive.pl b/TAO/tests/Oneway_Buffering/run_timeout_reactive.pl
deleted file mode 100755
index f91953726d9..00000000000
--- a/TAO/tests/Oneway_Buffering/run_timeout_reactive.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-r ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/server.cpp b/TAO/tests/Oneway_Buffering/server.cpp
deleted file mode 100644
index 6997308857d..00000000000
--- a/TAO/tests/Oneway_Buffering/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Oneway_Buffering.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Oneway_Buffering, server, "$Id$")
-
-const char *ior_output_file = "server.ior";
-const char *ior = "file://admin.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Buffering_Admin_var admin =
- Test::Oneway_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (admin.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Oneway_Buffering_Admin reference <%s>\n",
- ior),
- 1);
- }
-
- Oneway_Buffering *oneway_buffering_impl;
- ACE_NEW_RETURN (oneway_buffering_impl,
- Oneway_Buffering (orb.in (),
- admin.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(oneway_buffering_impl);
-
- Test::Oneway_Buffering_var oneway_buffering =
- oneway_buffering_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (oneway_buffering.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Oneways_Invoking_Twoways/.cvsignore b/TAO/tests/Oneways_Invoking_Twoways/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp b/TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp
deleted file mode 100644
index 8f76444fb40..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (Test::Sender_ptr reply_gen,
- Test::Receiver_ptr us,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , sender_(Test::Sender::_duplicate (reply_gen))
- , us_ (Test::Receiver::_duplicate (us))
-
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- for (int i = 0; i != 1; ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) sending oneways...\n"));
-
- this->sender_->send_ready_message (this->us_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught Exception");
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Client_Task.h b/TAO/tests/Oneways_Invoking_Twoways/Client_Task.h
deleted file mode 100644
index 5e5570ba10d..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Client_Task.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAYS_INVOKING_TWOWAYS_CLIENT_TASK_H
-#define ONEWAYS_INVOKING_TWOWAYS_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "TestC.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Sender_ptr sender,
- Test::Receiver_ptr us,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
-
- /// Reference to the test interface
- Test::Sender_var sender_;
-
- /// Reference to the test interface
- Test::Receiver_var us_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAYS_INVOKING_TWOWAYS_CLIENT_TASK_H */
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc b/TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc
deleted file mode 100644
index bd6dfbc4ff5..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Oneways_Invoking_Twoways.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Server_Task.cpp
- Sender_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver {
- after += *Server
- Source_Files {
- Client_Task.cpp
- Server_Task.cpp
- Receiver_i.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Oneways_Invoking_Twoways/README b/TAO/tests/Oneways_Invoking_Twoways/README
deleted file mode 100644
index 240db115c96..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/README
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
-
-@page Oneways_Invoking_Twoways Test README File
-
- This is a sort of a stress test for bug 575. The design of the
- test may not depict real world conditions, but what it gets to
- the fore is a problem that we are trying to fix.
-
- The test is designed this way. The client makes a oneway call
- to the server.The server, turns around to make a normal
- invocation on the client. The client again tries to make a two
- way invocation on the server as a part of the upcall. Threads
- are created to stress things a bit...
-
- There is a svcconf file that uses the select reactor. The
- run_test_svc.pl script uses that svcconf file. The test would
- run fine with the select reactor.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp b/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp
deleted file mode 100644
index e33c63186f9..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "Receiver_i.h"
-
-ACE_RCSID(Oneways_Invoking_Twoways, Receiver_i, "$Id$")
-
-Receiver_i::Receiver_i (CORBA::ORB_ptr orb,
- Test::Sender_ptr sender,
- CORBA::ULong iter)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- sender_ (Test::Sender::_duplicate (sender)),
- iteration_ (iter),
- no_calls_ (0)
-{
-}
-
-Receiver_i::~Receiver_i (void)
-{
-}
-
-
-
-CORBA::Long
-Receiver_i::receive_call (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Doing a ping... \n"));
-
- this->sender_->ping (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return this->no_calls_++;
-}
-
-CORBA::Long
-Receiver_i::get_call_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->iteration_;
-}
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.h b/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.h
deleted file mode 100644
index a5f13e29217..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// ===================================================================
-/**
- * @file Receiver_i.h
- *
- * $Id$
- *
- * @author Balachandran Natarajan <bala@cs.wustl.edu>
- **/
-// ===================================================================
-
-#ifndef TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_RECEIVER_I_H
-#define TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_RECEIVER_I_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Receiver interface
-/**
- * Skeleton implementation..
- */
-
-class Receiver_i
- : public virtual POA_Test::Receiver
-{
-public:
- /// Constructor
- Receiver_i (CORBA::ORB_ptr orb,
- Test::Sender_ptr sender,
- CORBA::ULong iter);
-
- ///Destructor
- virtual ~Receiver_i (void);
-
- // = The skeleton methods
- virtual CORBA::Long receive_call (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Retun the number of calls that every thread would make...
- virtual CORBA::Long get_call_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Our Orb...
- CORBA::ORB_var orb_;
-
- /// THe sender..
- Test::Sender_var sender_;
-
- /// Number of invocations to be made on the sender..
- CORBA::ULong iteration_;
-
- /// Number of calls processed so far..
- CORBA::ULong no_calls_;
-};
-
-#include /**/ "ace/post.h"
-#endif /*TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_RECEIVER_I_H*/
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp b/TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp
deleted file mode 100644
index 8ac983b0163..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "Sender_i.h"
-
-ACE_RCSID(Oneways_Invoking_Twoways, Sender_i, "$Id$")
-
-Sender_i::Sender_i (CORBA::ORB_ptr orb,
- CORBA::ULong no)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- number_ (no),
- active_objects_ (0)
-{
-}
-
-Sender_i::~Sender_i (void)
-{
-}
-
-void
-Sender_i::active_objects (CORBA::Short no_threads
- ACE_ENV_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER */ )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->active_objects_ = no_threads;
-}
-
-
-void
-Sender_i::send_ready_message (Test::Receiver_ptr receiver
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Received a call ...\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Calling the Receiver ..\n"));
-
- for (CORBA::ULong i = 0;
- i < this->number_;
- ++i)
- {
- receiver->receive_call (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-
-}
-
-void
-Sender_i::ping (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return;
-}
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Sender_i.h b/TAO/tests/Oneways_Invoking_Twoways/Sender_i.h
deleted file mode 100644
index 1d372a6707a..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Sender_i.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// ===================================================================
-/**
- * @file Sender_i.h
- *
- * $Id$
- *
- * @author Balachandran Natarajan <bala@cs.wustl.edu>
- **/
-// ===================================================================
-
-#ifndef TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_SENDER_I_H
-#define TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_SENDER_I_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Sender interface
-/**
- * Implements the oneway call send_ready_message. This in turn calls
- * the receiver with two way invocations..
- */
-
-class Sender_i
- : public virtual POA_Test::Sender
-{
-public:
- /// Constructor
- Sender_i (CORBA::ORB_ptr orb,
- CORBA::ULong no);
-
- ///Destructor
- virtual ~Sender_i (void);
-
- // = The skeleton methods
- virtual void active_objects (CORBA::Short ao
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_ready_message (Test::Receiver_ptr receiver
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void ping (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Our local ORB ptr
- CORBA::ORB_ptr orb_;
-
- /// Number of invocations to be made on the receiver
- CORBA::ULong number_;
-
- /// Number of active objects who are trying to connect
- CORBA::Short active_objects_;
-};
-
-#include /**/ "ace/post.h"
-#endif /*TAO_TESTS_ONEWAYS_INVOKING_TWOWAYS_SENDER_I_H*/
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Server_Task.cpp b/TAO/tests/Oneways_Invoking_Twoways/Server_Task.cpp
deleted file mode 100644
index db7a0b5a63a..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Server_Task.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// $Id$
-//
-
-#include "Server_Task.h"
-
-ACE_RCSID(Muxing, Server_Task, "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // run the test for at most 60 seconds...
- ACE_Time_Value tv (60, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Server_Task.h b/TAO/tests/Oneways_Invoking_Twoways/Server_Task.h
deleted file mode 100644
index a6ecae2217a..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Server_Task.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAYS_INVOKING_TWOWAYS_SERVER_TASK_H
-#define ONEWAYS_INVOKING_TWOWAYS_SERVER_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (CORBA::ORB_ptr orb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAYS_INVOKING_TWOWAYS_SERVER_TASK_H*/
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Test.idl b/TAO/tests/Oneways_Invoking_Twoways/Test.idl
deleted file mode 100644
index 9e23b7b2c9e..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/Test.idl
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- interface Receiver {
-
- /// Receive a call and send back the number of calls received..
- long receive_call ();
-
- /// Get the number of calls that every thread would make...
- long get_call_count ();
-
- };
-
- interface Sender {
-
- /// Ping message..
- void ping ();
-
- /// Number of active objects trying to use this interface
- oneway void active_objects (in short ao);
-
- /// Send a ready message
- oneway void send_ready_message (in Receiver callback);
- };
-};
diff --git a/TAO/tests/Oneways_Invoking_Twoways/client.cpp b/TAO/tests/Oneways_Invoking_Twoways/client.cpp
deleted file mode 100644
index 9d2b4cc90e8..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/client.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-// $Id$
-
-#include "Receiver_i.h"
-#include "Client_Task.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Muxing, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Get the sender reference..
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Sender_var sender =
- Test::Sender::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (sender.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
- Receiver_i *receiver_impl;
- ACE_NEW_RETURN (receiver_impl,
- Receiver_i (orb.in (),
- sender.in (),
- 10),
- 1);
-
- PortableServer::ServantBase_var receiver_owner_transfer(receiver_impl);
-
- Test::Receiver_var receiver =
- receiver_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Activate poa manager
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (sender.in (),
- receiver.in (),
- ACE_Thread_Manager::instance ());
-
- Server_Task server_task (orb.in (),
- ACE_Thread_Manager::instance ());
-
- // Before creating threads we will let the sender know that we
- // will have two threads that would make invocations..
- sender->active_objects ((CORBA::Short) 2 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 2,1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, 2, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG,
- "Event Loop finished \n"));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Oneways_Invoking_Twoways/run_test.pl b/TAO/tests/Oneways_Invoking_Twoways/run_test.pl
deleted file mode 100755
index 8c885c7c88b..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL1 = new PerlACE::Process ("client", " -k file://$iorfile");
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn (60);
-
-
-$client1 = $CL1->WaitKill (75);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl b/TAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl
deleted file mode 100755
index 387088db924..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-$SV = new PerlACE::Process ("server","-ORBSvcConf svcconf -o $iorfile");
-$CL1 = new PerlACE::Process ("client", "-ORBSvcConf svcconf -k file://$iorfile");
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL1->Spawn (60);
-
-
-$client1 = $CL1->WaitKill (75);
-
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneways_Invoking_Twoways/server.cpp b/TAO/tests/Oneways_Invoking_Twoways/server.cpp
deleted file mode 100644
index 2c3131b2cda..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/server.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// $Id$
-
-#include "Sender_i.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Oneways_Invoking_Twoways, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Sender_i *sender_impl;
- ACE_NEW_RETURN (sender_impl,
- Sender_i (orb.in (),
- 10),
- 1);
- PortableServer::ServantBase_var receiver_owner_transfer(sender_impl);
-
- Test::Sender_var sender =
- sender_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (sender.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task server_task (orb.in (),
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Now terminating test\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Oneways_Invoking_Twoways/svcconf b/TAO/tests/Oneways_Invoking_Twoways/svcconf
deleted file mode 100644
index 1987d3d81c6..00000000000
--- a/TAO/tests/Oneways_Invoking_Twoways/svcconf
+++ /dev/null
@@ -1,9 +0,0 @@
-# $Id$
-#
-
-# This configuration file is used to use only the default TAO
-# strategies
-
-dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorType select_mt"
-
-
diff --git a/TAO/tests/Optimized_Connection/Optimized_Connection.mpc b/TAO/tests/Optimized_Connection/Optimized_Connection.mpc
deleted file mode 100644
index bafd01bd6eb..00000000000
--- a/TAO/tests/Optimized_Connection/Optimized_Connection.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Client): taoclient, strategies {
- idlflags += -Sa -St -o ../Hello
- includes += ../Hello
-
- IDL_Files {
- ../Hello/Test.idl
- }
-
- Source_Files {
- ../Hello/TestC.cpp
- oc_client.cpp
- }
-}
diff --git a/TAO/tests/Optimized_Connection/README b/TAO/tests/Optimized_Connection/README
deleted file mode 100644
index 06a0e57a10b..00000000000
--- a/TAO/tests/Optimized_Connection/README
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
-
-@page Optimized_Connection Test README File
-
- This is a test of the Optimized Connection Endpoint Selector.
-The OC provides the means to set a connection timeout.
-
- For this test we have an IOR which contains unresolvable endpoints.
-Normally this will result in the client waiting for a TCP timeout. However
-in this test we configure a 1300 milliseconds timeout.
-
- If in future the IOR endpoint becomes a resolvable address, please
-regenerate a valid one using the ../Hello/server.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
diff --git a/TAO/tests/Optimized_Connection/oc.ior b/TAO/tests/Optimized_Connection/oc.ior
deleted file mode 100644
index bc841e9c7cd..00000000000
--- a/TAO/tests/Optimized_Connection/oc.ior
+++ /dev/null
@@ -1 +0,0 @@
-IOR:010000001300000049444c3a546573742f48656c6c6f3a312e3000000100000000000000840000000101020009000000626f75732e636f6d0000d8271b00000014010f0052535423e0ab44040f03000000000001000000010000000003000000000000000800000001000000004f4154010000001800000001000000010001000100000001000105090101000000000003000000140000000100000009000000626f75732e636f6d0001da27 \ No newline at end of file
diff --git a/TAO/tests/Optimized_Connection/oc_client.cpp b/TAO/tests/Optimized_Connection/oc_client.cpp
deleted file mode 100644
index fdbe14bcae0..00000000000
--- a/TAO/tests/Optimized_Connection/oc_client.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-#include "tao/Strategies/advanced_resource.h"
-#include "tao/Strategies/OC_Endpoint_Selector_Loader.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::TRANSIENT, e)
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Expected CORBA::TRANSIENT caught\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Optimized_Connection/oc_svc.conf b/TAO/tests/Optimized_Connection/oc_svc.conf
deleted file mode 100644
index 75b92f3c589..00000000000
--- a/TAO/tests/Optimized_Connection/oc_svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-static OC_Endpoint_Selector_Factory "-connect_timeout 1300"
diff --git a/TAO/tests/Optimized_Connection/run_test.pl b/TAO/tests/Optimized_Connection/run_test.pl
deleted file mode 100755
index 4ba18d9096c..00000000000
--- a/TAO/tests/Optimized_Connection/run_test.pl
+++ /dev/null
@@ -1,32 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("oc.ior");
-$status = 0;
-
-$CL_ALT_IIOP = new PerlACE::Process ("client", " -k file://$iorfile " .
- "-orbsvcconf oc_svc.conf");
-#print STDOUT $CL_ALT_IIOP->CommandLine()."\n";
-
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- exit 1;
-}
-
-$client = $CL_ALT_IIOP->SpawnWaitKill (30);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/POA/Bug_2511_Regression/Bug_2511_Regression.mpc b/TAO/tests/POA/Bug_2511_Regression/Bug_2511_Regression.mpc
deleted file mode 100644
index 8bd676130d6..00000000000
--- a/TAO/tests/POA/Bug_2511_Regression/Bug_2511_Regression.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoserver, minimum_corba {
-}
diff --git a/TAO/tests/POA/Bug_2511_Regression/run_test.pl b/TAO/tests/POA/Bug_2511_Regression/run_test.pl
deleted file mode 100755
index 2fa2e079325..00000000000
--- a/TAO/tests/POA/Bug_2511_Regression/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("server");
-}
-else {
- $T = new PerlACE::Process ("server");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Bug_2511_Regression/server.cpp b/TAO/tests/POA/Bug_2511_Regression/server.cpp
deleted file mode 100644
index a12ae327ee7..00000000000
--- a/TAO/tests/POA/Bug_2511_Regression/server.cpp
+++ /dev/null
@@ -1,286 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/MT_Servant_Locator
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// This program tests that multiple calls to the Servant Locator
-// can take place simultaneously.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/OS.h"
-#include "tao/PortableServer/ServantLocatorC.h"
-#include "tao/CDR.h"
-
-int postCount = 0;
-int errorCount = 0;
-
-class test_i :
- public virtual POA_test
-{
-public:
-
- test_i (PortableServer::POA_ptr poa);
-
- void normal (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void exceptional (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void notexisting (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_var poa_;
-};
-
-test_i::test_i (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-void
-test_i::normal (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "executing normal\n"));
-}
-
-void
-test_i::exceptional (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "executing exceptional\n"));
-}
-
-void
-test_i::notexisting (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "executing notexisting\n"));
-}
-
-class Servant_Locator :
- public PortableServer::ServantLocator
-{
-public:
-
- Servant_Locator (PortableServer::POA_ptr poa);
-
- ::PortableServer::Servant preinvoke (const PortableServer::ObjectId &,
- PortableServer::POA_ptr,
- const char *,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest));
-
- void postinvoke (const PortableServer::ObjectId &,
- PortableServer::POA_ptr,
- const char *,
- PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- test_i servant_;
-};
-
-Servant_Locator::Servant_Locator (PortableServer::POA_ptr poa)
- : servant_ (poa)
-{
-}
-
-::PortableServer::Servant
-Servant_Locator::preinvoke (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr,
- const char *op,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest))
-{
- CORBA::String_var name =
- PortableServer::ObjectId_to_string (oid);
-
- ACE_DEBUG ((LM_DEBUG,
- "Servant_Locator::preinvoke for %s.%s ",
- name.in (), op ));
-
- if (ACE_OS::strcmp (op, "normal") == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "returning servant\n"));
- return &this->servant_;
- }
- else if (ACE_OS::strcmp (op, "exceptional") == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "throwing exception\n"));
- throw CORBA::INTERNAL();
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "returning NULL\n"));
- return 0;
- }
-}
-
-void
-Servant_Locator::postinvoke (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr,
- const char *op,
- PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++postCount;
- CORBA::String_var name =
- PortableServer::ObjectId_to_string (oid);
-
- if (!op)
- {
- op = "NULL";
- ++errorCount;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Servant_Locator::postinvoke for %s.%s\n",
- name.in (), op ));
-
-}
-
-int
-main (int argc, char **argv)
-{
- int retval = 0;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies;
- CORBA::ULong current_length = 0;
-
- policies.length (current_length + 1);
- policies[current_length++] =
- root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies.length (current_length + 1);
- policies[current_length++] =
- root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies.length (current_length + 1);
- policies[current_length++] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("child",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Servant_Locator* servant_locator = new Servant_Locator(child_poa.in ()) ;
- child_poa->set_servant_manager (servant_locator
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var objectID =
- PortableServer::string_to_ObjectId ("object");
-
- CORBA::Object_var objectREF =
- child_poa->create_reference_with_id (objectID.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var testObject =
- test::_narrow (objectREF.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- testObject->normal();
-
- bool caught = false;
- ACE_TRY
- {
- testObject->exceptional();
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG, "exceptional() yielded exception\n"));
- caught = true;
- }
- ACE_ENDTRY;
- if (!caught) ++errorCount;
-
- caught = false;
- ACE_TRY
- {
- testObject->notexisting();
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG, "notexisting() yielded exception\n"));
- caught = true;
- }
- ACE_ENDTRY;
- if (!caught) ++errorCount;
-
- if (!errorCount)
- {
- ACE_DEBUG ((LM_DEBUG,"test successful\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,"unsuccessfull: %d errors\n", errorCount ));
- }
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- retval = -1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
diff --git a/TAO/tests/POA/Bug_2511_Regression/test.idl b/TAO/tests/POA/Bug_2511_Regression/test.idl
deleted file mode 100644
index 373c4ef82f0..00000000000
--- a/TAO/tests/POA/Bug_2511_Regression/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface test
-{
- void normal ();
- void exceptional ();
- void notexisting ();
-};
diff --git a/TAO/tests/POA/Current/.cvsignore b/TAO/tests/POA/Current/.cvsignore
deleted file mode 100644
index d8a2b853f2c..00000000000
--- a/TAO/tests/POA/Current/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Current
diff --git a/TAO/tests/POA/Current/Current.cpp b/TAO/tests/POA/Current/Current.cpp
deleted file mode 100644
index cfb3e541f38..00000000000
--- a/TAO/tests/POA/Current/Current.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Current
-//
-// = FILENAME
-// Current.cpp
-//
-// = DESCRIPTION
-// This program tests if accessing the POA current before the
-// RootPOA can cause any problems.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "tao/ORB.h"
-#include "tao/PortableServer/PortableServer.h"
-
-#include "ace/Log_Msg.h"
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object;
-
- object =
- orb->resolve_initial_references ("POACurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::Current_var current =
- PortableServer::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s successful\n",
- argv[0]));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Current/Current.mpc b/TAO/tests/POA/Current/Current.mpc
deleted file mode 100644
index d2819003e8f..00000000000
--- a/TAO/tests/POA/Current/Current.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoserver {
- exename = Current
-}
diff --git a/TAO/tests/POA/Current/run_test.pl b/TAO/tests/POA/Current/run_test.pl
deleted file mode 100755
index 1edac4e229e..00000000000
--- a/TAO/tests/POA/Current/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Current");
-}
-else {
- $T = new PerlACE::Process ("Current");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Deactivate_Object/Deactivate_Object.mpc b/TAO/tests/POA/Deactivate_Object/Deactivate_Object.mpc
deleted file mode 100644
index 137d4f17e33..00000000000
--- a/TAO/tests/POA/Deactivate_Object/Deactivate_Object.mpc
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
diff --git a/TAO/tests/POA/Deactivate_Object/Hello.cpp b/TAO/tests/POA/Deactivate_Object/Hello.cpp
deleted file mode 100644
index 8c6b6e980bc..00000000000
--- a/TAO/tests/POA/Deactivate_Object/Hello.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
diff --git a/TAO/tests/POA/Deactivate_Object/Hello.h b/TAO/tests/POA/Deactivate_Object/Hello.h
deleted file mode 100644
index 8ee25ebc312..00000000000
--- a/TAO/tests/POA/Deactivate_Object/Hello.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/POA/Deactivate_Object/Test.idl b/TAO/tests/POA/Deactivate_Object/Test.idl
deleted file mode 100644
index 48c0abba813..00000000000
--- a/TAO/tests/POA/Deactivate_Object/Test.idl
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// $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 ();
- };
-};
diff --git a/TAO/tests/POA/Deactivate_Object/run_test.pl b/TAO/tests/POA/Deactivate_Object/run_test.pl
deleted file mode 100755
index 46ebddc873c..00000000000
--- a/TAO/tests/POA/Deactivate_Object/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-$server = $SV->SpawnWaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/POA/Deactivate_Object/server.cpp b/TAO/tests/POA/Deactivate_Object/server.cpp
deleted file mode 100644
index 13749603e33..00000000000
--- a/TAO/tests/POA/Deactivate_Object/server.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Hello *hello_impl = 0;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var obj_id = root_poa->activate_object (hello_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj_var = root_poa->id_to_reference (obj_id.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var new_obj_id = root_poa->reference_to_id (obj_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke reference_to_servant(). Should retrieve servant.
- PortableServer::ServantBase_var servant =
- root_poa->reference_to_servant (obj_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Assert correctness.
- ACE_ASSERT (hello_impl == servant.in());
-
- root_poa->deactivate_object (new_obj_id.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/POA/Default_Servant/.cvsignore b/TAO/tests/POA/Default_Servant/.cvsignore
deleted file mode 100644
index 1a4929b3b80..00000000000
--- a/TAO/tests/POA/Default_Servant/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Default_Servant
diff --git a/TAO/tests/POA/Default_Servant/Default_Servant.cpp b/TAO/tests/POA/Default_Servant/Default_Servant.cpp
deleted file mode 100644
index d0de0aad007..00000000000
--- a/TAO/tests/POA/Default_Servant/Default_Servant.cpp
+++ /dev/null
@@ -1,301 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Default_Servant
-//
-// = FILENAME
-// Default_Servant.cpp
-//
-// = DESCRIPTION
-// This program tests the behavior of POA::id_to_servant() and
-// POA::reference_to_servant() with the use of default servants.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/SString.h"
-#include "tao/PortableServer/ServantManagerC.h"
-
-class test_i : public POA_test
-{
-};
-
-void
-test_get_servant_manager (PortableServer::POA_ptr poa)
-{
- bool succeed = false;
- ACE_TRY_NEW_ENV
- {
- // Getting the servant manager should give a wrong policy exception
- // exception
- PortableServer::ServantManager_ptr servant_manager =
- poa->get_servant_manager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_UNUSED_ARG (servant_manager);
- }
- ACE_CATCH (PortableServer::POA::WrongPolicy, ex)
- {
- succeed = true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!succeed)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) ERROR, get servant manager failed, should give an exception\n"));
- }
-}
-
-void
-test_set_servant_manager (PortableServer::POA_ptr poa)
-{
- bool succeed = false;
- ACE_TRY_NEW_ENV
- {
- // Setting the servant manager should give a wrong policy exception
- // exception
- poa->set_servant_manager (PortableServer::ServantManager::_nil() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (PortableServer::POA::WrongPolicy, ex)
- {
- succeed = true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!succeed)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) ERROR, set servant manager failed, should give an exception\n"));
- }
-}
-
-void
-test_get_servant_with_no_set (PortableServer::POA_ptr poa)
-{
- bool succeed = false;
- ACE_TRY_NEW_ENV
- {
- // Getting the default servant without one set whould give a NoServant
- // exception
- PortableServer::Servant servant =
- poa->get_servant (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_UNUSED_ARG (servant);
- }
- ACE_CATCH (PortableServer::POA::NoServant, ex)
- {
- succeed = true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!succeed)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) ERROR, get servant without one set failed\n"));
- }
-}
-
-void
-test_reference_to_servant_active_object(PortableServer::POA_ptr root_poa
- ACE_ENV_ARG_DECL)
-{
- test_i test;
- CORBA::ULong expected_refcount = 1;
-
- PortableServer::ObjectId* id =
- root_poa->activate_object (&test ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- expected_refcount++;
-
- CORBA::Object_var object =
- root_poa->id_to_reference (*id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ServantBase_var servant =
- root_poa->reference_to_servant (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- expected_refcount++;
-
- root_poa->deactivate_object (*id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- expected_refcount--;
-
- CORBA::ULong refcount =
- test._refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_UNUSED_ARG (refcount);
- ACE_UNUSED_ARG (expected_refcount);
- ACE_ASSERT (expected_refcount == refcount);
-}
-
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow to POA.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the new POA.
- CORBA::PolicyList policies (3);
- policies.length (3);
-
- // Request Processing Policy.
- policies[0] =
- root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Id Uniqueness Policy.
- policies[1] =
- root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Servant Retention Policy.
- policies[2] =
- root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA to host default servant.
- ACE_CString name = "Default Servant";
- PortableServer::POA_var default_servant_poa =
- root_poa->create_POA (name.c_str (),
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Destroy policies.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- CORBA::Policy_ptr policy = policies[i];
- policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Activate POA manager.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_reference_to_servant_active_object(root_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test servant.
- test_i test;
- CORBA::ULong expected_refcount = 1;
-
- (void) test_get_servant_with_no_set (default_servant_poa.in());
-
- (void) test_get_servant_manager (default_servant_poa.in());
-
- (void) test_set_servant_manager (default_servant_poa.in());
-
- // Register default servant.
- default_servant_poa->set_servant (&test
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- expected_refcount++;
-
- // Create dummy id.
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("id");
-
- // Create dummy object.
- object =
- default_servant_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke id_to_servant(). Should retrieve default servant.
- PortableServer::ServantBase_var servant =
- default_servant_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- expected_refcount++;
-
- // Assert correctness.
- ACE_ASSERT (&test == servant.in());
-
- // Invoke reference_to_servant(). Should retrieve default servant.
- servant =
- default_servant_poa->reference_to_servant (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- expected_refcount++;
-
- // Assert correctness.
- ACE_ASSERT (&test == servant.in());
-
- // Report success.
- ACE_DEBUG ((LM_DEBUG,
- "Default_Servant test successful\n"));
-
- CORBA::ULong refcount =
- test._refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_UNUSED_ARG (refcount);
- ACE_UNUSED_ARG (expected_refcount);
- ACE_ASSERT (expected_refcount == refcount);
-
- // Destroy the ORB.
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Default_Servant/Default_Servant.mpc b/TAO/tests/POA/Default_Servant/Default_Servant.mpc
deleted file mode 100644
index c96018f073f..00000000000
--- a/TAO/tests/POA/Default_Servant/Default_Servant.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA Default Servant): taoserver, minimum_corba {
- exename = Default_Servant
-}
diff --git a/TAO/tests/POA/Default_Servant/run_test.pl b/TAO/tests/POA/Default_Servant/run_test.pl
deleted file mode 100755
index 2ed048478c7..00000000000
--- a/TAO/tests/POA/Default_Servant/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Default_Servant");
-}
-else {
- $T = new PerlACE::Process ("Default_Servant");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Default_Servant/test.idl b/TAO/tests/POA/Default_Servant/test.idl
deleted file mode 100644
index ae2a5fd10d4..00000000000
--- a/TAO/tests/POA/Default_Servant/test.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-interface test
-{
-};
diff --git a/TAO/tests/POA/EndpointPolicy/EndpointPolicy.mpc b/TAO/tests/POA/EndpointPolicy/EndpointPolicy.mpc
deleted file mode 100644
index 24b3507198f..00000000000
--- a/TAO/tests/POA/EndpointPolicy/EndpointPolicy.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, endpointpolicy, pi_server {
- idlflags += -Sa -St
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/POA/EndpointPolicy/Hello.cpp b/TAO/tests/POA/EndpointPolicy/Hello.cpp
deleted file mode 100644
index 70af3ea8a11..00000000000
--- a/TAO/tests/POA/EndpointPolicy/Hello.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/POA/EndpointPolicy/Hello.h b/TAO/tests/POA/EndpointPolicy/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/POA/EndpointPolicy/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/POA/EndpointPolicy/README b/TAO/tests/POA/EndpointPolicy/README
deleted file mode 100644
index 611858f1666..00000000000
--- a/TAO/tests/POA/EndpointPolicy/README
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
-
-@page EndpointPolicy Test README File
-
- This test bases on the simplest TAO test - Hello test and adds the
- endpoint policy test in the server application. The server application
- explicitly creates the POAManager with a valid endpoint policy, uses
- the POAManager to create a poa and uses the poa to activate a servant.
- This is to test the endpoint policy in the POAManager influences the
- selection of endpoints to be used when collecting Profiles for use
- in Object References.
-
- In addition, the server application also tests some error conditions
- such as an inappropriate policy is supplied to a new POAManager.
-
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- or start the client and the server manually:
-
-$ server -o $iorfile -p $port -ORBEndpoint iiop://localhost:$port &
-$ client -k file://$iorfile
-
-*/
diff --git a/TAO/tests/POA/EndpointPolicy/Test.idl b/TAO/tests/POA/EndpointPolicy/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/POA/EndpointPolicy/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/POA/EndpointPolicy/client.cpp b/TAO/tests/POA/EndpointPolicy/client.cpp
deleted file mode 100644
index 61d7e6af070..00000000000
--- a/TAO/tests/POA/EndpointPolicy/client.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int bad_ior = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:b");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'b':
- bad_ior = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb;
- CORBA::Object_var tmp;
-
- ACE_TRY_NEW_ENV
- {
- orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- tmp = orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- ACE_TRY_NEW_ENV
- {
- ACE_DEBUG ((LM_DEBUG,"client: Invocation expecting to %s\n",
- (bad_ior ? "fail" : "work")));
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
-
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (bad_ior)
- {
- ACE_DEBUG ((LM_DEBUG,"client: Error: was expecting an exception.\n"));
- return 1;
- }
-
- ACE_DEBUG ((LM_DEBUG, "client: success!\n"));
-
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- if (!bad_ior)
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "client: Exception caught:");
- return 1;
- }
- ACE_DEBUG ((LM_DEBUG, "client: success!\n"));
- }
- ACE_ENDTRY;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- return 0;
-}
diff --git a/TAO/tests/POA/EndpointPolicy/run_test.pl b/TAO/tests/POA/EndpointPolicy/run_test.pl
deleted file mode 100755
index 1e8f3904c4e..00000000000
--- a/TAO/tests/POA/EndpointPolicy/run_test.pl
+++ /dev/null
@@ -1,107 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$goodiorfile = PerlACE::LocalFile ("good.ior");
-$badiorfile = PerlACE::LocalFile ("bad.ior");
-unlink $goodiorfile;
-unlink $badiorfile;
-
-$port = 12345;
-
-if (PerlACE::is_vxworks_test()) {
- $sharedSV = new PerlACE::ProcessVX ("server", "-ORBDottedDecimalAddresses 0 -ORBUseSharedProfile 1 -g $goodiorfile -b $badiorfile -p $port");
-}
-else {
- $sharedSV = new PerlACE::Process ("server", "-ORBDottedDecimalAddresses 0 -ORBUseSharedProfile 1 -g $goodiorfile -b $badiorfile -p $port");
-}
-
-if (PerlACE::is_vxworks_test()) {
- $multiSV = new PerlACE::ProcessVX ("server", "-ORBDottedDecimalAddresses 0 -ORBUseSharedProfile 0 -g $goodiorfile -b $badiorfile -p $port");
-}
-else {
- $multiSV = new PerlACE::Process ("server", "-ORBDottedDecimalAddresses 0 -ORBUseSharedProfile 0 -g $goodiorfile -b $badiorfile -p $port");
-}
-
-$goodCL = new PerlACE::Process ("client", " -k file://$goodiorfile");
-$badCL = new PerlACE::Process ("client", " -b -k file://$badiorfile");
-
-print "Starting server using shared profiles\n";
-
-$sharedSV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($goodiorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$goodiorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $badCL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$client = $goodCL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $sharedSV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server [single profile per IOR] returned $server\n";
- $status = 1;
-}
-
-unlink $goodiorfile;
-unlink $badiorfile;
-
-print "Starting server using multiple profiles\n";
-
-$multiSV->Spawn();
-
-if (PerlACE::waitforfile_timed ($goodiorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$goodiorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $badCL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$client = $goodCL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $multiSV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server [multiple profiles per IOR] returned $server\n";
- $status = 1;
-}
-
-unlink $goodiorfile;
-unlink $badiorfile;
-
-exit $status;
diff --git a/TAO/tests/POA/EndpointPolicy/server.cpp b/TAO/tests/POA/EndpointPolicy/server.cpp
deleted file mode 100644
index 0dcef0c4cd6..00000000000
--- a/TAO/tests/POA/EndpointPolicy/server.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "tao/EndpointPolicy/EndpointPolicy.h"
-#include "tao/EndpointPolicy/IIOPEndpointValue_i.h"
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_strings.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *good_ior_file = "good.ior";
-const char *bad_ior_file = "bad.ior";
-const char *root_ior_file = "root.ior";
-
-CORBA::Short endpoint_port = 12345;
-int verbose = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- for (int c = 1; c < argc; c++) {
- if (ACE_OS::strcasecmp(argv[c],"-g") == 0)
- {
- good_ior_file = argv[++c];
- }
- else if (ACE_OS::strcasecmp(argv[c],"-b") == 0)
- {
- bad_ior_file = argv[++c];
- }
- else if (ACE_OS::strcasecmp(argv[c],"-p") == 0)
- {
- endpoint_port = ACE_OS::atoi (argv[++c]);
- }
- else if (ACE_OS::strcasecmp(argv[c],"-v") == 0)
- {
- verbose = 1;
- }
- else if (strstr(argv[c],"-ORB") == argv[c])
- {
- c++;
- continue;
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-g <goodiorfile> "
- "-b <badiorfile> "
- "-p <port> "
- "-v "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
-
- CORBA::ORB_var orb;
- CORBA::Object_var obj;
- PortableServer::POA_var root_poa;
- PortableServer::POAManagerFactory_var poa_manager_factory;
-
- if (parse_args (argc, argv) != 0)
- return 1;
- char *extra[4];
- extra[0] = CORBA::string_dup("-ORBEndpoint");
- extra[1] = CORBA::string_alloc(100);
- ACE_OS::sprintf (extra[1],
- "iiop://localhost:%d",
- endpoint_port);
- extra[2] = CORBA::string_dup("-ORBEndpoint");
- extra[3] = CORBA::string_alloc(100);
- ACE_OS::sprintf (extra[3],
- "iiop://localhost:%d/hostname_in_ior=unreachable",
- endpoint_port+1);
-
- char **largv = new char *[argc+4];
- int i = 0;
- for (i = 0; i < argc; i++)
- largv[i] = argv[i];
- for (i = 0; i < 4; i++)
- largv[argc+i] = extra[i];
- argc += 4;
-
- try
- {
- orb =
- CORBA::ORB_init (argc, largv, "EndpointPolicy");
-
- obj =
- orb->resolve_initial_references("RootPOA");
-
- root_poa =
- PortableServer::POA::_narrow (obj.in ());
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- poa_manager_factory
- = root_poa->the_POAManagerFactory ();
- }
- catch (CORBA::Exception &ex)
- {
- ex._tao_print_exception("initialization error ");
- return 1;
- }
-
- for (i = 0; i < 4; i++)
- delete[] extra[i];
-
- delete [] largv;
-
-
- //-----------------------------------------------------------------------
-
-
- // Create two valid endpoint policies. One to match each of the generated
- // endpoint arguments supplied to ORB_init().
- PortableServer::POAManager_var good_pm;
- PortableServer::POAManager_var bad_pm;
- CORBA::PolicyList policies;
- policies.length (1);
-
- EndpointPolicy::EndpointList list;
- list.length (1);
- list[0] = new IIOPEndpointValue_i("localhost", endpoint_port);
-
- try
- {
- CORBA::Any policy_value;
- policy_value <<= list;
- policies[0] = orb->create_policy (EndpointPolicy::ENDPOINT_POLICY_TYPE,
- policy_value);
- good_pm = poa_manager_factory->create_POAManager ("goodPOAManager",
- policies);
- }
- catch (CORBA::Exception &ex)
- {
- ex._tao_print_exception ("Failed to create reachable POA manager");
- return 1;
- }
-
- list[0] = new IIOPEndpointValue_i("unreachable", endpoint_port+1);
- try
- {
- CORBA::Any policy_value;
- policy_value <<= list;
- policies[0] = orb->create_policy (EndpointPolicy::ENDPOINT_POLICY_TYPE,
- policy_value);
- bad_pm = poa_manager_factory->create_POAManager ("badPOAManager",
- policies);
- }
- catch (CORBA::Exception &ex)
- {
- ex._tao_print_exception ("Failed to create unreachable POA manager");
- return 1;
- }
-
- try
- {
- PortableServer::ObjectId_var oid;
- CORBA::Object_var o = CORBA::Object::_nil();
- FILE *output_file= 0;
- // Create poas assiciated with the each the good poa manager and the
- // bad poa manager.
- policies.length(0);
- PortableServer::POA_var good_poa =
- root_poa->create_POA ("goodPOA",
- good_pm.in (),
- policies);
-
- PortableServer::POA_var bad_poa =
- root_poa->create_POA ("badPOA",
- bad_pm.in (),
- policies);
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- ACE_DEBUG ((LM_DEBUG, "Creating IOR from root poa\n"));
-
- oid = root_poa->activate_object (hello_impl);
- o = root_poa->id_to_reference (oid.in ());
-
- CORBA::String_var root_ior =
- orb->object_to_string (o.in ());
-
- output_file= ACE_OS::fopen (root_ior_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- root_ior_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", root_ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, "Creating IOR from bad poa\n"));
-
- oid = bad_poa->activate_object (hello_impl);
- o = bad_poa->id_to_reference (oid.in());
-
- CORBA::String_var bad_ior =
- orb->object_to_string (o.in ());
-
- ACE_DEBUG ((LM_DEBUG, "Creating IOR from good poa\n"));
-
- oid = good_poa->activate_object (hello_impl);
- o = good_poa->id_to_reference (oid.in ());
-
- CORBA::String_var good_ior =
- orb->object_to_string (o.in ());
-
- output_file= ACE_OS::fopen (good_ior_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- good_ior_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", good_ior.in ());
- ACE_OS::fclose (output_file);
-
- output_file= ACE_OS::fopen (bad_ior_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- bad_ior_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", bad_ior.in ());
- ACE_OS::fclose (output_file);
-
- good_pm->activate ();
- bad_pm->activate ();
-
- orb->run ();
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- }
- catch (CORBA::Exception &ex)
- {
- ex._tao_print_exception ("cannot run server");
- }
- root_poa->destroy (1, 1);
-
- orb->destroy ();
-
- return 0;
-}
diff --git a/TAO/tests/POA/Etherealization/.cvsignore b/TAO/tests/POA/Etherealization/.cvsignore
deleted file mode 100644
index 3e143a96f1d..00000000000
--- a/TAO/tests/POA/Etherealization/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Etherealization
diff --git a/TAO/tests/POA/Etherealization/Etherealization.cpp b/TAO/tests/POA/Etherealization/Etherealization.cpp
deleted file mode 100644
index 1471f38f8b3..00000000000
--- a/TAO/tests/POA/Etherealization/Etherealization.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Etherealization
-//
-// = FILENAME
-// Etherealization.cpp
-//
-// = DESCRIPTION
-// This program tests for deactivation and etherealization of
-// reference counted and non reference counted servants.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/OS_NS_string.h"
-#include "tao/PortableServer/ServantActivatorC.h"
-
-class test_i : public POA_test
-{
-public:
- void method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- }
-
- ~test_i (void)
- {
- ACE_DEBUG ((LM_DEBUG, "~test_i called\n"));
- }
-};
-
-class test_i_with_reference_counting :
- public virtual POA_test
-{
-public:
- void method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- }
-
- ~test_i_with_reference_counting (void)
- {
- ACE_DEBUG ((LM_DEBUG, "~test_i_with_reference_counting called\n"));
- }
-};
-
-class Servant_Activator : public PortableServer::ServantActivator
-{
-public:
- PortableServer::Servant incarnate (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest));
-
- void etherealize (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr adapter,
- PortableServer::Servant servant,
- CORBA::Boolean cleanup_in_progress,
- CORBA::Boolean remaining_activations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-PortableServer::Servant
-Servant_Activator::incarnate (const PortableServer::ObjectId &id,
- PortableServer::POA_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest))
-{
- CORBA::String_var object_name =
- PortableServer::ObjectId_to_string (id);
-
- ACE_DEBUG ((LM_DEBUG,
- "\nIncarnate called with id = \"%s\"\n",
- object_name.in ()));
-
- if (ACE_OS::strcmp (object_name.in (),
- "without reference counting") == 0)
- return new test_i;
- else
- return new test_i_with_reference_counting;
-}
-
-
-void
-Servant_Activator::etherealize (const PortableServer::ObjectId &id,
- PortableServer::POA_ptr ,
- PortableServer::Servant servant,
- CORBA::Boolean,
- CORBA::Boolean
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var object_name =
- PortableServer::ObjectId_to_string (id);
-
- ACE_DEBUG ((LM_DEBUG,
- "Etherealize called with id = \"%s\"\n",
- object_name.in ()));
-
- if (ACE_OS::strcmp (object_name.in (),
- "without reference counting") == 0)
- delete servant;
- else
- {
- servant->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies (3);
- policies.length (3);
-
- // ID Assignment Policy
- policies[0] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Lifespan Policy
- policies[1] =
- root_poa->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Request Processing Policy
- policies[2] =
- root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("child",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create servant activator.
- PortableServer::ServantManager_var servant_manager =
- new Servant_Activator;
-
- // Set servant_activator as the servant_manager of child POA.
- child_poa->set_servant_manager (servant_manager.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- {
- // Create a reference with user created ID in child POA which
- // uses the Servant_Activator.
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("without reference counting");
-
- object =
- child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- {
- // Create a reference with user created ID in child POA which
- // uses the Servant_Activator.
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("with reference counting");
-
- object =
- child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- {
- // Create a reference with user created ID in child POA which
- // uses the Servant_Activator.
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("no call made");
-
- object =
- child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- {
- // Create a reference with user created ID in child POA which
- // uses the Servant_Activator but just don't call the reference at all
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("no call");
-
- object =
- child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var oid =
- child_poa->reference_to_id (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- child_poa->deactivate_object (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\nEnd of main()\n\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Etherealization/Etherealization.mpc b/TAO/tests/POA/Etherealization/Etherealization.mpc
deleted file mode 100644
index 5400bf85c9b..00000000000
--- a/TAO/tests/POA/Etherealization/Etherealization.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoserver, minimum_corba {
- exename = Etherealization
-}
diff --git a/TAO/tests/POA/Etherealization/run_test.pl b/TAO/tests/POA/Etherealization/run_test.pl
deleted file mode 100755
index b5adebe1007..00000000000
--- a/TAO/tests/POA/Etherealization/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Etherealization");
-}
-else {
- $T = new PerlACE::Process ("Etherealization");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Etherealization/test.idl b/TAO/tests/POA/Etherealization/test.idl
deleted file mode 100644
index dd1b063b9bf..00000000000
--- a/TAO/tests/POA/Etherealization/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
-};
diff --git a/TAO/tests/POA/Excessive_Object_Deactivations/.cvsignore b/TAO/tests/POA/Excessive_Object_Deactivations/.cvsignore
deleted file mode 100644
index 2733a260597..00000000000
--- a/TAO/tests/POA/Excessive_Object_Deactivations/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Excessive_Object_Deactivations
diff --git a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp b/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
deleted file mode 100644
index 7880507c3fa..00000000000
--- a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Excessive_Object_Deactivations
-//
-// = FILENAME
-// Excessive_Object_Deactivations.cpp
-//
-// = DESCRIPTION
-// This program tests for excessive deactivations of a servant.
-// The test checks excessive deactivations in a POA with SYSTEM_ID
-// and other POA with USER_ID. The test also check for excessive
-// deactivations during upcalls.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-
-class test_i : public POA_test
-{
-public:
- void deactivate_self (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
- PortableServer::POA_var poa_;
-
- PortableServer::ObjectId id_;
-};
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-void
-test_i::deactivate_self (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->poa_->deactivate_object (this->id_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Exception flag
- int expected_exception_raised = 0;
-
- ACE_TRY
- {
- this->poa_->deactivate_object (this->id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (PortableServer::POA::ObjectNotActive, ex)
- {
- // This is the correct exception! Ignore
- expected_exception_raised = 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
- ACE_ASSERT (0);
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- // Make sure an exception was raised and it was of the correct type.
- ACE_ASSERT (expected_exception_raised);
-
- ACE_UNUSED_ARG (expected_exception_raised);
-}
-
-void
-test_object_deactivation (PortableServer::POA_ptr poa,
- const PortableServer::ObjectId &id
- ACE_ENV_ARG_DECL)
-{
- test_i servant;
- int expected_exception_raised = 0;
-
- PortableServer::ObjectId_var invalid_id =
- PortableServer::string_to_ObjectId ("invalid id");
-
- ACE_TRY_EX (invalid_id)
- {
- poa->deactivate_object (invalid_id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (invalid_id);
- }
- ACE_CATCH (PortableServer::POA::ObjectNotActive, ex)
- {
- // This is the correct exception! Ignore
- expected_exception_raised = 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
- ACE_ASSERT (0);
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- // Make sure an exception was raised and it was of the correct
- // type.
- ACE_ASSERT (expected_exception_raised);
-
-
-
- poa->activate_object_with_id (id,
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- poa->deactivate_object (id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Reset flag
- expected_exception_raised = 0;
-
- ACE_TRY_EX (double_deactivate)
- {
- poa->deactivate_object (id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (double_deactivate);
- }
- ACE_CATCH (PortableServer::POA::ObjectNotActive, ex)
- {
- // This is the correct exception! Ignore
- expected_exception_raised = 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
- ACE_ASSERT (0);
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- // Make sure an exception was raised and it was of the correct
- // type.
- ACE_ASSERT (expected_exception_raised);
-
- poa->activate_object_with_id (id,
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- servant.poa_ =
- PortableServer::POA::_duplicate (poa);
-
- servant.id_ = id;
-
- test_var test =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- test->deactivate_self (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // ACE_ASSERT dissappears in non-debug builds
- ACE_UNUSED_ARG (expected_exception_raised);
-
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList empty_policies;
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("child",
- poa_manager.in (),
- empty_policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- obj =
- root_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var id =
- root_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_object_deactivation (root_poa.in (),
- id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- id = PortableServer::string_to_ObjectId ("good id");
-
- test_object_deactivation (child_poa.in (),
- id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.mpc b/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.mpc
deleted file mode 100644
index 8b143029fd2..00000000000
--- a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver {
-}
diff --git a/TAO/tests/POA/Excessive_Object_Deactivations/run_test.pl b/TAO/tests/POA/Excessive_Object_Deactivations/run_test.pl
deleted file mode 100755
index 40272f8e2f5..00000000000
--- a/TAO/tests/POA/Excessive_Object_Deactivations/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Excessive_Object_Deactivations");
-}
-else {
- $T = new PerlACE::Process ("Excessive_Object_Deactivations");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Excessive_Object_Deactivations/test.idl b/TAO/tests/POA/Excessive_Object_Deactivations/test.idl
deleted file mode 100644
index c7d0b23d96e..00000000000
--- a/TAO/tests/POA/Excessive_Object_Deactivations/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void deactivate_self ();
-};
diff --git a/TAO/tests/POA/Identity/.cvsignore b/TAO/tests/POA/Identity/.cvsignore
deleted file mode 100644
index 58cf73e05e2..00000000000
--- a/TAO/tests/POA/Identity/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Identity
diff --git a/TAO/tests/POA/Identity/Identity.cpp b/TAO/tests/POA/Identity/Identity.cpp
deleted file mode 100644
index 1f3265ec6c4..00000000000
--- a/TAO/tests/POA/Identity/Identity.cpp
+++ /dev/null
@@ -1,800 +0,0 @@
-// $Id$
-
-// ==================================================
-// = LIBRARY
-// TAO/test/POA/Identity
-//
-// = FILENAME
-// Identity.cpp
-//
-// = DESCRIPTION
-// This program demonstrates and tests how to move between id,
-// reference, and servants.
-//
-// = AUTHOR
-// Irfan Pyarali
-// ==================================================
-
-#include "testS.h"
-#include "tao/ORB_Core.h"
-#include "tao/Server_Strategy_Factory.h"
-
-ACE_RCSID(Identity, Identity, "$Id$")
-
-class test_i : public POA_test
-{
-public:
-
- test_i (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa))
- {
- }
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- {
- return PortableServer::POA::_duplicate (this->poa_.in ());
- }
-
-protected:
-
- PortableServer::POA_var poa_;
-};
-
-void
-create_poas (PortableServer::POA_ptr root_poa,
- PortableServer::LifespanPolicyValue lifespan_policy,
- PortableServer::POA_out first_poa,
- PortableServer::POA_out second_poa,
- PortableServer::POA_out third_poa,
- PortableServer::POA_out forth_poa
- ACE_ENV_ARG_DECL)
-{
- // Policies for the new POAs
- CORBA::PolicyList policies (3);
- policies.length (3);
-
- policies[0] = root_poa->create_lifespan_policy (lifespan_policy
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[2] = root_poa->create_id_assignment_policy (PortableServer::SYSTEM_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Creation of the firstPOA
- ACE_CString name = "firstPOA";
- first_poa = root_poa->create_POA (name.c_str (),
- PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::UNIQUE_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Creation of the secondPOA
- name = "secondPOA";
- second_poa = root_poa->create_POA (name.c_str (),
- PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[2]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[2] = root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Creation of the thirdPOA
- name = "thirdPOA";
- third_poa = root_poa->create_POA (name.c_str (),
- PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Creation of the forthPOA
- name = "forthPOA";
- forth_poa = root_poa->create_POA (name.c_str (),
- PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Creation of the new POAs over, so destroy the policies
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-test_poas (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POA_ptr first_poa,
- PortableServer::POA_ptr second_poa,
- PortableServer::POA_ptr third_poa,
- PortableServer::POA_ptr forth_poa,
- int perform_deactivation_test
- ACE_ENV_ARG_DECL)
-{
- {
- test_i servant (root_poa);
-
- CORBA::Object_var obj = root_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id = root_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- root_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- obj = root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ServantBase_var servant_from_reference =
- root_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ServantBase_var servant_from_id =
- root_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (servant_from_reference.in () != servant_from_id.in ()
- || servant_from_reference.in () != &servant)
- {
- ACE_ERROR ((LM_ERROR,
- "Mismatched servant_from_reference, "
- "servant_from_id and &servant\n"));
- }
-
- obj = root_poa->servant_to_reference (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- obj = servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id_from_servant = root_poa->servant_to_id (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (id_from_servant.in () == id.in ());
-
- root_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (perform_deactivation_test)
- {
- root_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- servant_from_reference = root_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (servant_from_reference.in () == &servant);
-
- root_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- {
- test_i servant (root_poa);
-
- PortableServer::ObjectId_var id = root_poa->activate_object (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var obj = root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- obj = root_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- root_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- {
- test_i servant (first_poa);
-
- CORBA::Object_var obj = first_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id = first_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- first_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- obj = first_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ServantBase_var servant_from_reference =
- first_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ServantBase_var servant_from_id =
- first_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (servant_from_reference .in () != servant_from_id.in ()
- || servant_from_reference.in () != &servant)
- {
- ACE_ERROR ((LM_ERROR,
- "Mismatched servant_from_reference, "
- "servant_from_id and &servant\n"));
- }
-
- first_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (perform_deactivation_test)
- {
- first_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- servant_from_reference = first_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (servant_from_reference.in () == &servant);
-
- first_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- {
- test_i servant (first_poa);
-
- PortableServer::ObjectId_var id = first_poa->activate_object (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var obj = first_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- obj = first_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- first_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- {
- test_i servant (second_poa);
-
- CORBA::Object_var obj = second_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id = second_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- second_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- obj = second_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ServantBase_var servant_from_reference =
- second_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ServantBase_var servant_from_id =
- second_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (servant_from_reference.in () != servant_from_id.in ()
- || servant_from_reference.in () != &servant)
- {
- ACE_ERROR ((LM_ERROR,
- "Mismatched servant_from_reference, "
- "servant_from_id and &servant\n"));
- }
-
- obj = second_poa->servant_to_reference (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- obj = servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id_from_servant = second_poa->servant_to_id (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (id_from_servant.in () == id.in ());
-
- second_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (perform_deactivation_test)
- {
- second_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- servant_from_reference = second_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (servant_from_reference.in () == &servant);
-
- second_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- {
- test_i servant (second_poa);
-
- PortableServer::ObjectId_var id = second_poa->activate_object (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var obj = second_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- obj = second_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- second_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- {
- test_i servant (third_poa);
- PortableServer::ObjectId_var id = PortableServer::string_to_ObjectId ("hello");
-
- CORBA::Object_var obj = third_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id_from_reference = third_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = PortableServer::ObjectId_to_string (id_from_reference.in ());
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- ACE_ASSERT (id_from_reference.in () == id.in ());
-
- third_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- obj = third_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ServantBase_var servant_from_reference =
- third_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ServantBase_var servant_from_id =
- third_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (servant_from_reference.in () != servant_from_id.in ()
- || servant_from_reference.in () != &servant)
- {
- ACE_ERROR ((LM_ERROR,
- "Mismatched servant_from_reference, "
- "servant_from_id and &servant\n"));
- }
-
- obj = third_poa->servant_to_reference (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- obj = servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id_from_servant = third_poa->servant_to_id (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = PortableServer::ObjectId_to_string (id_from_servant.in ());
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- ACE_ASSERT (id_from_servant.in () == id.in ());
-
- third_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (perform_deactivation_test)
- {
- third_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- servant_from_reference = third_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (servant_from_reference.in () == &servant);
-
- third_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- {
- test_i servant (forth_poa);
- PortableServer::ObjectId_var id = PortableServer::string_to_ObjectId ("hello");
-
- CORBA::Object_var obj = forth_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ObjectId_var id_from_reference = forth_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = PortableServer::ObjectId_to_string (id_from_reference.in ());
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- ACE_ASSERT (id_from_reference.in () == id.in ());
-
- forth_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- obj = forth_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
-
- PortableServer::ServantBase_var servant_from_reference =
- forth_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ServantBase_var servant_from_id =
- forth_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (servant_from_reference.in () != servant_from_id.in ()
- || servant_from_reference.in () != &servant)
- {
- ACE_ERROR ((LM_ERROR,
- "Mismatched servant_from_reference, "
- "servant_from_id and &servant\n"));
- }
-
- forth_poa->deactivate_object (id.in ());
-
- if (perform_deactivation_test)
- {
- forth_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- servant_from_reference = forth_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (servant_from_reference.in () == &servant);
-
- forth_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters
- = TAO_ORB_Core_instance ()->server_factory ()->active_object_map_creation_parameters ();
-
- int perform_deactivation_test = creation_parameters.allow_reactivation_of_system_ids_;
-
- PortableServer::POA_var first_poa;
- PortableServer::POA_var second_poa;
- PortableServer::POA_var third_poa;
- PortableServer::POA_var forth_poa;
-
- create_poas (root_poa.in (),
- PortableServer::TRANSIENT,
- first_poa.out (),
- second_poa.out (),
- third_poa.out (),
- forth_poa.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_poas (orb.in (),
- root_poa.in (),
- first_poa.in (),
- second_poa.in (),
- third_poa.in (),
- forth_poa.in (),
- perform_deactivation_test
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- first_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- second_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- third_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- forth_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- create_poas (root_poa.in (),
- PortableServer::PERSISTENT,
- first_poa.out (),
- second_poa.out (),
- third_poa.out (),
- forth_poa.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_poas (orb.in (),
- root_poa.in (),
- first_poa.in (),
- second_poa.in (),
- third_poa.in (),
- forth_poa.in (),
- perform_deactivation_test
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception!");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Identity/Identity.mpc b/TAO/tests/POA/Identity/Identity.mpc
deleted file mode 100644
index 8e2c99d1610..00000000000
--- a/TAO/tests/POA/Identity/Identity.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoserver {
- exename = Identity
-}
diff --git a/TAO/tests/POA/Identity/run_test.pl b/TAO/tests/POA/Identity/run_test.pl
deleted file mode 100755
index dc23f38eeb4..00000000000
--- a/TAO/tests/POA/Identity/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Identity", "-ORBobjrefstyle url");
-}
-else {
- $T = new PerlACE::Process ("Identity", "-ORBobjrefstyle url");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
-
diff --git a/TAO/tests/POA/Identity/svc.conf b/TAO/tests/POA/Identity/svc.conf
deleted file mode 100644
index 21b46f90b5d..00000000000
--- a/TAO/tests/POA/Identity/svc.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# $Id$
-#
-# Please see $TAO_ROOT/docs/Options.html for details on these options.
-#
-
-static Server_Strategy_Factory "-ORBUseridPolicyDemuxStrategy dynamic -ORBSystemidPolicyDemuxStrategy active -ORBUniqueidPolicyReverseDemuxStrategy dynamic -ORBAllowReactivationOfSystemids 1 -ORBActiveHintInIds 1"
diff --git a/TAO/tests/POA/Identity/svc.conf.xml b/TAO/tests/POA/Identity/svc.conf.xml
deleted file mode 100644
index 0d727d7d414..00000000000
--- a/TAO/tests/POA/Identity/svc.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/POA/Identity/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. -->
- <!-- -->
- <static id="Server_Strategy_Factory" params="-ORBUseridPolicyDemuxStrategy dynamic -ORBSystemidPolicyDemuxStrategy active -ORBUniqueidPolicyReverseDemuxStrategy dynamic -ORBAllowReactivationOfSystemids 1 -ORBActiveHintInIds 1"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/POA/Identity/test.idl b/TAO/tests/POA/Identity/test.idl
deleted file mode 100644
index ae2a5fd10d4..00000000000
--- a/TAO/tests/POA/Identity/test.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-interface test
-{
-};
diff --git a/TAO/tests/POA/MT_Servant_Locator/.cvsignore b/TAO/tests/POA/MT_Servant_Locator/.cvsignore
deleted file mode 100644
index 3a06a6508b0..00000000000
--- a/TAO/tests/POA/MT_Servant_Locator/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-MT_Servant_Locator
diff --git a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp b/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
deleted file mode 100644
index 11d740642cd..00000000000
--- a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/MT_Servant_Locator
-//
-// = FILENAME
-// MT_Servant_Locator.cpp
-//
-// = DESCRIPTION
-// This program tests that multiple calls to the Servant Locator
-// can take place simultaneously.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Task.h"
-#include "ace/Auto_Event.h"
-#include "tao/PortableServer/ServantLocatorC.h"
-#include "tao/CDR.h"
-
-class test_i :
- public virtual POA_test
-{
-public:
-
- test_i (PortableServer::POA_ptr poa);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_var poa_;
-};
-
-test_i::test_i (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- void object (test_ptr test);
-
- int svc (void);
-
- test_var test_;
-
- ACE_Auto_Event pre_invoke_event_;
- ACE_Auto_Event post_invoke_event_;
-};
-
-void
-Task::object (test_ptr test)
-{
- this->test_ =
- test::_duplicate (test);
-}
-
-int
-Task::svc (void)
-{
- this->test_->method ();
- this->test_ =
- test::_nil ();
- return 0;
-}
-
-Task first_task;
-Task second_task;
-
-class Servant_Locator :
- public PortableServer::ServantLocator
-{
-public:
-
- Servant_Locator (PortableServer::POA_ptr poa);
-
- ::PortableServer::Servant preinvoke (const PortableServer::ObjectId &,
- PortableServer::POA_ptr,
- const char *,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest));
-
- void postinvoke (const PortableServer::ObjectId &,
- PortableServer::POA_ptr,
- const char *,
- PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- test_i servant_;
-};
-
-Servant_Locator::Servant_Locator (PortableServer::POA_ptr poa)
- : servant_ (poa)
-{
-}
-
-::PortableServer::Servant
-Servant_Locator::preinvoke (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr,
- const char *,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest))
-{
- CORBA::String_var name =
- PortableServer::ObjectId_to_string (oid);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%t) Starting Servant_Locator::preinvoke for %s servant\n",
- name.in ()));
-
- if (ACE_OS::strcmp (name.in (), "first") == 0)
- {
- second_task.pre_invoke_event_.signal ();
- first_task.pre_invoke_event_.wait ();
- }
- else
- {
- first_task.pre_invoke_event_.signal ();
- second_task.pre_invoke_event_.wait ();
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%t) Ending Servant_Locator::preinvoke for %s servant\n",
- name.in ()));
-
- return &this->servant_;
-}
-
-void
-Servant_Locator::postinvoke (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr,
- const char *,
- PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var name =
- PortableServer::ObjectId_to_string (oid);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%t) Starting Servant_Locator::postinvoke for %s servant\n",
- name.in ()));
-
- if (ACE_OS::strcmp (name.in (), "first") == 0)
- {
- second_task.post_invoke_event_.signal ();
- first_task.post_invoke_event_.wait ();
- }
- else
- {
- first_task.post_invoke_event_.signal ();
- second_task.post_invoke_event_.wait ();
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%t) Ending Servant_Locator::postinvoke for %s servant\n",
- name.in ()));
-}
-
-bool
-set_nil_servant_manager (PortableServer::POA_ptr poa)
-{
- bool succeed = false;
- ACE_TRY_NEW_ENV
- {
- // Setting a nil servant manager should give an OBJ_Adapter exception with
- // minor code 4
- poa->set_servant_manager (PortableServer::ServantManager::_nil()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::OBJ_ADAPTER, ex)
- {
- if ((ex.minor() & 0xFFFU) == 4)
- {
- succeed = true;
- }
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!succeed)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) ERROR, set nil servant manager failed\n"));
- }
-
- return succeed;
-}
-
-bool
-overwrite_servant_manager (PortableServer::POA_ptr poa)
-{
- bool succeed = false;
- ACE_TRY_NEW_ENV
- {
- Servant_Locator servant_locator (poa);
-
- // Setting a servant manager after it is already set should give
- // obj_adapter with minor code 6
- poa->set_servant_manager (&servant_locator
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
- {
- if ((ex.minor() & 0xFFFU) == 6)
- {
- succeed = true;
- }
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!succeed)
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) ERROR, overwrite servant manager failed\n"));
- }
-
- return succeed;
-}
-
-int
-main (int argc, char **argv)
-{
- int retval = 0;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies;
- CORBA::ULong current_length = 0;
-
- policies.length (current_length + 1);
- policies[current_length++] =
- root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies.length (current_length + 1);
- policies[current_length++] =
- root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies.length (current_length + 1);
- policies[current_length++] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("child",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!set_nil_servant_manager (child_poa.in()))
- retval = -1;
-
- Servant_Locator servant_locator (child_poa.in ());
- child_poa->set_servant_manager (&servant_locator
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!overwrite_servant_manager (child_poa.in()))
- retval = -1;
-
- PortableServer::ObjectId_var first_oid =
- PortableServer::string_to_ObjectId ("first");
-
- CORBA::Object_var first_object =
- child_poa->create_reference_with_id (first_oid.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var first_test =
- test::_narrow (first_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var second_oid =
- PortableServer::string_to_ObjectId ("second");
-
- CORBA::Object_var second_object =
- child_poa->create_reference_with_id (second_oid.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var second_test =
- test::_narrow (second_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- first_task.object (first_test.in ());
- second_task.object (second_test.in ());
-
- first_task.activate ();
- second_task.activate ();
-
- first_task.wait ();
- second_task.wait ();
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s successful\n",
- argv[0]));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- retval = -1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
diff --git a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.mpc b/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.mpc
deleted file mode 100644
index 6443ce82a36..00000000000
--- a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver, minimum_corba {
-}
diff --git a/TAO/tests/POA/MT_Servant_Locator/run_test.pl b/TAO/tests/POA/MT_Servant_Locator/run_test.pl
deleted file mode 100755
index bf3d2c7ee81..00000000000
--- a/TAO/tests/POA/MT_Servant_Locator/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("MT_Servant_Locator");
-}
-else {
- $T = new PerlACE::Process ("MT_Servant_Locator");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/MT_Servant_Locator/test.idl b/TAO/tests/POA/MT_Servant_Locator/test.idl
deleted file mode 100644
index dd1b063b9bf..00000000000
--- a/TAO/tests/POA/MT_Servant_Locator/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
-};
diff --git a/TAO/tests/POA/Nested_Non_Servant_Upcalls/.cvsignore b/TAO/tests/POA/Nested_Non_Servant_Upcalls/.cvsignore
deleted file mode 100644
index 482d2468c35..00000000000
--- a/TAO/tests/POA/Nested_Non_Servant_Upcalls/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Nested_Non_Servant_Upcalls
diff --git a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp b/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
deleted file mode 100644
index 70b54317789..00000000000
--- a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Nested_Non_Servant_Upcalls
-//
-// = FILENAME
-// Nested_Non_Servant_Upcalls.cpp
-//
-// = DESCRIPTION
-// This program tests that nested non-servant upcalls are handled
-// correctly.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Task.h"
-#include "ace/Auto_Event.h"
-#include "tao/PortableServer/ServantActivatorC.h"
-
-class test_i :
- public virtual POA_test
-{
-public:
-
- test_i (PortableServer::POA_ptr poa);
-
- ~test_i (void);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_var poa_;
-
-};
-
-test_i::test_i (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i created: instance %x\n",
- this));
-}
-
-test_i::~test_i (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i destroyed: instance %x\n",
- this));
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-class Object_Activator : public ACE_Task_Base
-{
-public:
-
- Object_Activator (ACE_Thread_Manager &thread_manager,
- PortableServer::POA_ptr poa);
-
- int svc (void);
-
- ACE_Auto_Event object_activated_;
-
- PortableServer::POA_var poa_;
-
-};
-
-
-Object_Activator::Object_Activator (ACE_Thread_Manager &thread_manager,
- PortableServer::POA_ptr poa)
- : ACE_Task_Base (&thread_manager),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-int
-Object_Activator::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- test_i *servant =
- new test_i (this->poa_.in ());
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- PortableServer::ObjectId_var id =
- this->poa_->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->object_activated_.signal ();
-
- this->poa_->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in activator thread");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-Object_Activator *global_object_activator = 0;
-
-class Servant_Activator :
- public PortableServer::ServantActivator
-{
-public:
-
- Servant_Activator (PortableServer::POA_ptr poa);
-
- PortableServer::Servant incarnate (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest));
-
- void etherealize (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr adapter,
- PortableServer::Servant servant,
- CORBA::Boolean cleanup_in_progress,
- CORBA::Boolean remaining_activations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_var poa_;
-
- PortableServer::ObjectId_var id_;
-
-};
-
-Servant_Activator::Servant_Activator (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-PortableServer::Servant
-Servant_Activator::incarnate (const PortableServer::ObjectId &,
- PortableServer::POA_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest))
-{
- test_i *servant =
- new test_i (this->poa_.in ());
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- this->id_ =
- this->poa_->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- this->poa_->deactivate_object (this->id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- int result =
- global_object_activator->activate ();
- ACE_ASSERT (result != -1);
-
- ACE_Time_Value timeout (5);
-
- result =
- global_object_activator->object_activated_.wait (&timeout, 0);
-
- if (result == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Object Activator was able to make progress during "
- "recursive non-servant upcall: test failed\n"));
-
- ACE_ASSERT (0);
- }
- else if (result == -1 && errno == ETIME)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Object Activator was not able to make progress during "
- "recursive non-servant upcall: test succeeded\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "Unexpected error during event.wait (): %d\n",
- result));
-
- ACE_ASSERT (0);
- }
-
- return new test_i (this->poa_.in ());
-}
-
-void
-Servant_Activator::etherealize (const PortableServer::ObjectId &,
- PortableServer::POA_ptr,
- PortableServer::Servant servant,
- CORBA::Boolean,
- CORBA::Boolean
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- servant->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies;
- CORBA::ULong current_length = 0;
-
- policies.length (current_length + 1);
- policies[current_length++] =
- root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("child",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Servant_Activator servant_activator (child_poa.in ());
- child_poa->set_servant_manager (&servant_activator
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var first_object =
- child_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var first_test =
- test::_narrow (first_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var id =
- child_poa->reference_to_id (first_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Thread_Manager thread_manager;
-
- Object_Activator object_activator (thread_manager,
- child_poa.in ());
-
- global_object_activator =
- &object_activator;
-
- first_test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for the Object_Activator thread to exit.
- thread_manager.wait ();
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.mpc b/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.mpc
deleted file mode 100644
index 6443ce82a36..00000000000
--- a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver, minimum_corba {
-}
diff --git a/TAO/tests/POA/Nested_Non_Servant_Upcalls/run_test.pl b/TAO/tests/POA/Nested_Non_Servant_Upcalls/run_test.pl
deleted file mode 100755
index 1e3f3eb4a31..00000000000
--- a/TAO/tests/POA/Nested_Non_Servant_Upcalls/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Nested_Non_Servant_Upcalls");
-}
-else {
- $T = new PerlACE::Process ("Nested_Non_Servant_Upcalls");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Nested_Non_Servant_Upcalls/test.idl b/TAO/tests/POA/Nested_Non_Servant_Upcalls/test.idl
deleted file mode 100644
index dd1b063b9bf..00000000000
--- a/TAO/tests/POA/Nested_Non_Servant_Upcalls/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
-};
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/.cvsignore b/TAO/tests/POA/Non_Servant_Upcalls/.cvsignore
deleted file mode 100644
index 37d45be2816..00000000000
--- a/TAO/tests/POA/Non_Servant_Upcalls/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Non_Servant_Upcalls
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp b/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
deleted file mode 100644
index 11aa293619d..00000000000
--- a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Non_Servant_Upcalls
-//
-// = FILENAME
-// Non_Servant_Upcalls.cpp
-//
-// = DESCRIPTION
-// This program tests the users ability to make calls on a POA
-// during non-servant upcalls. In this example, a servant which
-// is being destroyed during because of a deactivate_object()
-// call, tries to deactivate another object in its destructor.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined (_MSC_VER)
-# pragma warning (disable : 4250)
-#endif /* _MSC_VER */
-
-class test_i :
- public virtual POA_test
-{
-public:
- test_i (test_i *other);
-
- ~test_i (void);
-
- test_i *other_;
-};
-
-test_i::test_i (test_i *other)
- : other_ (other)
-{
-}
-
-test_i::~test_i (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) test_i::~test_i\n"));
-
- if (this->other_)
- {
- ACE_TRY_NEW_ENV
- {
- PortableServer::POA_var poa = this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var id = poa->servant_to_id (this->other_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%t) Deactivating other servant\n"));
-
- poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_i::~test_i");
- }
- ACE_ENDTRY;
- }
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *servant1 = new test_i (0);
- test_i *servant2 = new test_i (servant1);
-
- PortableServer::ObjectId_var id1 =
- root_poa->activate_object (servant1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Give ownership to POA.
- servant1->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var id2 =
- root_poa->activate_object (servant2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Give ownership to POA.
- servant2->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->deactivate_object (id2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.mpc b/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.mpc
deleted file mode 100644
index 8b143029fd2..00000000000
--- a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver {
-}
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/run_test.pl b/TAO/tests/POA/Non_Servant_Upcalls/run_test.pl
deleted file mode 100755
index fe15c9f87f5..00000000000
--- a/TAO/tests/POA/Non_Servant_Upcalls/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Non_Servant_Upcalls");
-}
-else {
- $T = new PerlACE::Process ("Non_Servant_Upcalls");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/test.idl b/TAO/tests/POA/Non_Servant_Upcalls/test.idl
deleted file mode 100644
index ae2a5fd10d4..00000000000
--- a/TAO/tests/POA/Non_Servant_Upcalls/test.idl
+++ /dev/null
@@ -1,5 +0,0 @@
-// $Id$
-
-interface test
-{
-};
diff --git a/TAO/tests/POA/Object_Reactivation/.cvsignore b/TAO/tests/POA/Object_Reactivation/.cvsignore
deleted file mode 100644
index ccf778224c8..00000000000
--- a/TAO/tests/POA/Object_Reactivation/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Object_Reactivation
diff --git a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp b/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
deleted file mode 100644
index 0c5c38a7ddf..00000000000
--- a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Object_Reactivation
-//
-// = FILENAME
-// Object_Reactivation.cpp
-//
-// = DESCRIPTION
-// This program tests the reactivation of a servant that has been
-// deactivated but not removed from the Active Object Map yet.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/SString.h"
-#include "ace/Auto_Event.h"
-#include "ace/OS_NS_unistd.h"
-
-static int debug = 1;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "d:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd':
- debug = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-d debug "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-class test_i : public POA_test
-{
-public:
- test_i (ACE_Auto_Event &event);
-
- void deactivate_self (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- ACE_Auto_Event &event_;
-};
-
-test_i::test_i (ACE_Auto_Event &event)
- : event_ (event)
-{
-}
-
-void
-test_i::deactivate_self (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableServer::POA_var poa = this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ObjectId_var id = poa->servant_to_id (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG, "(%t) Deactivating servant\n"));
-
- poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG, "(%t) Deactivation complete: signaling main thread and going to sleep\n"));
-
- int result = this->event_.signal ();
- ACE_ASSERT (result == 0);
- ACE_UNUSED_ARG (result);
-
- ACE_OS::sleep (3);
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG, "(%t) test_i::deactivate_self complete\n"));
-}
-
-class Activator : public ACE_Task_Base
-{
-public:
- Activator (test_ptr t,
- ACE_Auto_Event &event,
- PortableServer::POA_ptr poa,
- PortableServer::Servant servant,
- const ACE_CString &task_id,
- const PortableServer::ObjectId &id);
- int svc (void);
-
-private:
- test_var test_;
- ACE_Auto_Event &event_;
- PortableServer::POA_var poa_;
- PortableServer::Servant servant_;
- ACE_CString task_id_;
- PortableServer::ObjectId id_;
-};
-
-Activator::Activator (test_ptr t,
- ACE_Auto_Event &event,
- PortableServer::POA_ptr poa,
- PortableServer::Servant servant,
- const ACE_CString &task_id,
- const PortableServer::ObjectId &id)
- : test_ (test::_duplicate (t)),
- event_ (event),
- poa_ (PortableServer::POA::_duplicate (poa)),
- servant_ (servant),
- task_id_ (task_id),
- id_ (id)
-{
-}
-
-int
-Activator::svc (void)
-{
- if (debug)
- ACE_DEBUG ((LM_DEBUG, "(%t) Waiting for deactivation to complete\n"));
-
- int result = this->event_.wait ();
- ACE_ASSERT (result == 0);
- ACE_UNUSED_ARG (result);
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG, "(%t) Deactivation complete, trying to activate\n"));
-
- ACE_TRY_NEW_ENV
- {
- if (this->task_id_ == "first thread")
- {
- PortableServer::ObjectId_var id =
- this->poa_->activate_object (this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- this->poa_->activate_object_with_id (this->id_,
- this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG, "(%t) Activation complete\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Activator::svc");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-class Deactivator : public ACE_Task_Base
-{
-public:
- Deactivator (test_ptr t);
- int svc (void);
-
-private:
- test_var test_;
-};
-
-Deactivator::Deactivator (test_ptr t)
- : test_ (test::_duplicate (t))
-{
-}
-
-int
-Deactivator::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->test_->deactivate_self (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Deactivator::svc");
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int parse_args_result =
- parse_args (argc, argv);
-
- if (parse_args_result != 0)
- return parse_args_result;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Auto_Event event1;
- test_i servant1 (event1);
-
- ACE_Auto_Event event2;
- test_i servant2 (event2);
-
- test_var test_object1 = servant1._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test_object2 = servant2._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var id1 =
- root_poa->reference_to_id (test_object1.in ());
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var id2 =
- root_poa->reference_to_id (test_object2.in ());
- ACE_TRY_CHECK;
-
- Activator activator1 (test_object1.in (),
- event1,
- root_poa.in (),
- &servant1,
- "first thread",
- id1.in ());
-
- Activator activator2 (test_object2.in (),
- event2,
- root_poa.in (),
- &servant2,
- "second thread",
- id2.in ());
-
- Deactivator deactivator1 (test_object1.in ());
-
- Deactivator deactivator2 (test_object2.in ());
-
- if (activator1.activate () != 0 ||
- activator2.activate () != 0 ||
- deactivator1.activate () != 0 ||
- deactivator2.activate () != 0)
- return -1;
-
- int result = ACE_Thread_Manager::instance ()->wait ();
-
- if (result != 0)
- return result;
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.mpc b/TAO/tests/POA/Object_Reactivation/Object_Reactivation.mpc
deleted file mode 100644
index 8b143029fd2..00000000000
--- a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver {
-}
diff --git a/TAO/tests/POA/Object_Reactivation/run_test.pl b/TAO/tests/POA/Object_Reactivation/run_test.pl
deleted file mode 100755
index d4a3a6d1fc5..00000000000
--- a/TAO/tests/POA/Object_Reactivation/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Object_Reactivation");
-}
-else {
- $T = new PerlACE::Process ("Object_Reactivation");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/Object_Reactivation/test.idl b/TAO/tests/POA/Object_Reactivation/test.idl
deleted file mode 100644
index c7d0b23d96e..00000000000
--- a/TAO/tests/POA/Object_Reactivation/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void deactivate_self ();
-};
diff --git a/TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp b/TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp
deleted file mode 100644
index 1a4e7bd323a..00000000000
--- a/TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp
+++ /dev/null
@@ -1,307 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/POAManagerFactory
-//
-// = FILENAME
-// POAManagerFactory.cpp
-//
-// = DESCRIPTION
-// This program tests Root_POA::the_POAManagerFactory and
-// the POAManagerFactory interfaces such as create_POAManager(),
-// list () and find ().
-//
-// = AUTHOR
-// Yan Dai
-//
-//=========================================================================
-
-#include "tao/ORB.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-#include "ace/Get_Opt.h"
-
-int fail = 0;
-int pretest = 0;
-int verbose = 0;
-
-#define VERIFY(Condition) \
-{ \
- if (!(Condition)) \
- { \
- fail++; \
- if (!verbose) \
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%P|%t) - Failure at line %l\n"))); \
- } \
-}
-
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "v");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'v':
- verbose = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-v "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- "POAManagerFactoryTest"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow to POA.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Obtain PoaManagerFactory reference: ")));
- pretest = fail;
-
- // Obtain the POAManagerFactory.
- PortableServer::POAManagerFactory_var poa_manager_factory
- = root_poa->the_POAManagerFactory ();
-
- VERIFY (!CORBA::is_nil(poa_manager_factory.in()));
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- if (CORBA::is_nil(poa_manager_factory.in()))
- return 1;
-
- CORBA::PolicyList policies (0);
- policies.length (0);
-
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Create a POAManager: ")));
- pretest = fail;
-
- // Explicitly create a POAManager - "POAManager1" .
- PortableServer::POAManager_var poa_manager_1
- = poa_manager_factory->create_POAManager ("POAManager1",
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (!CORBA::is_nil(poa_manager_1.in()));
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- if (CORBA::is_nil(poa_manager_1.in()))
- return 1;
-
- // Creating a POAManager with an exiting POAManager name raises exception.
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Prevent duplicated POAManagers: ")));
- pretest = fail;
- CORBA::Boolean got_expected_exception = false;
- ACE_TRY_EX (create)
- {
- PortableServer::POAManager_var poa_manager
- = poa_manager_factory->create_POAManager ("POAManager1",
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (create);
- }
- ACE_CATCH (PortableServer::POAManagerFactory::ManagerAlreadyExists, mae)
- {
- got_expected_exception = true;
- }
- ACE_ENDTRY;
-
- VERIFY (got_expected_exception);
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed")));
-
- if (! got_expected_exception)
- return 1;
-
- {
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Implicitly create a POAManagers: ")));
- pretest = fail;
- // Implicitly create a POAManager instance which has an automatically
- // assigned name.
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA2",
- PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
-
- PortableServer::POAManager_var poa_manager_2
- = child_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (!CORBA::is_nil(poa_manager_2.in()));
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed")));
-
- if (CORBA::is_nil(poa_manager_2.in()))
- return 1;
-
- CORBA::String_var poa_manager_2_name
- = poa_manager_2->get_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Implicitly created POAManager's ID: [%s]\n"),
- ACE_TEXT_CHAR_TO_TCHAR(poa_manager_2_name.in())));
-
- if (ACE_OS::strlen(poa_manager_2_name.in()) == 0)
- return 1;
-
- if (verbose)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("List POAManagers: ")));
- pretest = fail;
-
- PortableServer::POAManagerFactory::POAManagerSeq_var managers
- = poa_manager_factory->list (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY (managers->length () == 3);
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed")));
-
- PortableServer::POAManager_var root_poa_manager
- = root_poa->the_POAManager(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (CORBA::ULong i = 0; i < managers->length(); ++i)
- {
- CORBA::String_var name = managers[i]->get_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Validate listed POAManager [%s]: "),
- ACE_TEXT_CHAR_TO_TCHAR(name.in())));
- pretest = fail;
-
- const PortableServer::POAManager_ptr tmp_pm = managers[i];
- if ((ACE_OS::strcmp (name.in (), "RootPOAManager") == 0
- && tmp_pm == root_poa_manager.in ())
- || (ACE_OS::strcmp (name.in (), "POAManager1") == 0
- && tmp_pm == poa_manager_1.in ())
- || (ACE_OS::strcmp (name.in (), poa_manager_2_name.in ()) == 0
- && tmp_pm == poa_manager_2.in ()))
- {
- if (verbose)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("passed\n")));
- continue;
- }
- else
- {
- if (verbose)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("failed\n")));
- fail++;
- }
- }
- }
-
- {
- // Find a specific POAManager.
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Find a POAManager: ")));
- pretest = fail;
-
- PortableServer::POAManager_var manager
- = poa_manager_factory->find ("POAManager1" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var name = manager->get_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- VERIFY ((ACE_OS::strcmp (name.in (), "POAManager1") == 0
- && manager.in () == poa_manager_1.in ()));
-
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("%s\n"),
- (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed")));
- }
-
- // Create a child poa that associates with the explicitly
- // created POAManager.
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("Create A POA with explicit POAManager: ")));
- pretest = fail;
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("childPOA",
- poa_manager_1.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager_1->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1);
-
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("passed\n")));
- }
- ACE_CATCHANY
- {
- fail++;
- if (verbose)
- ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("failed\n")));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("POAManagerFactory %s\n"),
- (pretest == fail) ? ACE_TEXT ("succeeded") : ACE_TEXT ("failed")));
-
- return 0;
-}
diff --git a/TAO/tests/POA/POAManagerFactory/POAManagerFactory.mpc b/TAO/tests/POA/POAManagerFactory/POAManagerFactory.mpc
deleted file mode 100644
index 49fcc0fc6a3..00000000000
--- a/TAO/tests/POA/POAManagerFactory/POAManagerFactory.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver, pi_server {
-}
diff --git a/TAO/tests/POA/POAManagerFactory/run_test.pl b/TAO/tests/POA/POAManagerFactory/run_test.pl
deleted file mode 100755
index 39be0d05e74..00000000000
--- a/TAO/tests/POA/POAManagerFactory/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("POAManagerFactory");
-}
-else {
- $T = new PerlACE::Process ("POAManagerFactory");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/POA_Destruction/.cvsignore b/TAO/tests/POA/POA_Destruction/.cvsignore
deleted file mode 100644
index 0b6ca378266..00000000000
--- a/TAO/tests/POA/POA_Destruction/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-POA_Destruction
diff --git a/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp b/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
deleted file mode 100644
index a35208aa000..00000000000
--- a/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/POA_Destruction
-//
-// = FILENAME
-// POA_Destruction.cpp
-//
-// = DESCRIPTION
-// This program tests the destruction of a POA while there is an
-// upcall in progress.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-
-class test_i : public POA_test
-{
-public:
- void destroy_poa (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-void
-test_i::destroy_poa (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableServer::POA_var poa = this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Boolean etherealize_objects = 1;
- CORBA::Boolean wait_for_completion = 0;
- poa->destroy (etherealize_objects,
- wait_for_completion
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant;
-
- test_var test_object = servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_object->destroy_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/POA_Destruction/POA_Destruction.mpc b/TAO/tests/POA/POA_Destruction/POA_Destruction.mpc
deleted file mode 100644
index 8b143029fd2..00000000000
--- a/TAO/tests/POA/POA_Destruction/POA_Destruction.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver {
-}
diff --git a/TAO/tests/POA/POA_Destruction/run_test.pl b/TAO/tests/POA/POA_Destruction/run_test.pl
deleted file mode 100755
index 8730e4c78dd..00000000000
--- a/TAO/tests/POA/POA_Destruction/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("POA_Destruction");
-}
-else {
- $T = new PerlACE::Process ("POA_Destruction");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/POA_Destruction/test.idl b/TAO/tests/POA/POA_Destruction/test.idl
deleted file mode 100644
index 098546eb56e..00000000000
--- a/TAO/tests/POA/POA_Destruction/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void destroy_poa ();
-};
diff --git a/TAO/tests/POA/Persistent_ID/.cvsignore b/TAO/tests/POA/Persistent_ID/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/POA/Persistent_ID/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/POA/Persistent_ID/Persistent_ID.mpc b/TAO/tests/POA/Persistent_ID/Persistent_ID.mpc
deleted file mode 100644
index de531ab3649..00000000000
--- a/TAO/tests/POA/Persistent_ID/Persistent_ID.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA_server*): taoserver {
- Source_Files {
- server.cpp
- }
-}
-
-project(POA_client*): taoserver {
- exename = client
- after += POA_server*
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/POA/Persistent_ID/README b/TAO/tests/POA/Persistent_ID/README
deleted file mode 100644
index 976de6c96e0..00000000000
--- a/TAO/tests/POA/Persistent_ID/README
+++ /dev/null
@@ -1,21 +0,0 @@
-$Id$
-
-This test checks the combination of PERSISTENT & SYSTEM_ID POA
-policies.
-
-A servant is registered on the RootPOA. The client tells the server to
-create a POA with PERSISTENT & SYSTEM_ID policies. The server does so
-and returns a object created and registered in the child POA using a
-system generated id. Before returning the object, the server saves the
-system generated id. The client make a call on this new object to make
-sure that the new object is valid.
-
-After this the client instructs the server to destroy the child POA.
-
-Then the client instructs the server to recreate the child POA. The
-server does so and returns a object created and registered in the
-child POA, but this time uses the previous generated id instead of
-using a newly generated one. Before returning the object, the server
-saves the system generated id. The client make a call on this new
-object and on the previous object to make sure that the objects are
-valid.
diff --git a/TAO/tests/POA/Persistent_ID/client.cpp b/TAO/tests/POA/Persistent_ID/client.cpp
deleted file mode 100644
index 45519fdd154..00000000000
--- a/TAO/tests/POA/Persistent_ID/client.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// $Id$
-
-// ================================================================
-//
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This is a client implementation.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ================================================================
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Generic_Servant, client, "$Id$")
-
-static const char *IOR = "file://ior";
-static int shutdown_server = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- IOR = ACE_OS::strdup (get_opts.opt_arg ());
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k IOR "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- if (IOR == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify the IOR\n"), -1);
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int parse_args_result =
- parse_args (argc, argv);
- if (parse_args_result != 0)
- return parse_args_result;
-
- CORBA::Object_var object =
- orb->string_to_object (IOR
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test1 =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test1->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test2 =
- test1->create_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test2->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test1->destroy_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test3 =
- test1->create_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test2->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test3->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (shutdown_server)
- {
- test1->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Error!");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Persistent_ID/run_test.pl b/TAO/tests/POA/Persistent_ID/run_test.pl
deleted file mode 100755
index b00f3f38c86..00000000000
--- a/TAO/tests/POA/Persistent_ID/run_test.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = "server.ior";
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-f server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-f $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-$server = $SV->WaitKill (5);
-
-unlink $iorfile;
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/POA/Persistent_ID/server.cpp b/TAO/tests/POA/Persistent_ID/server.cpp
deleted file mode 100644
index 15f8272c1a9..00000000000
--- a/TAO/tests/POA/Persistent_ID/server.cpp
+++ /dev/null
@@ -1,298 +0,0 @@
-// $Id$
-
-// ================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Persistent_ID
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// In this example of using Persistent IDs.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ================================================================
-
-#include "ace/Get_Opt.h"
-#include "ace/SString.h"
-#include "testS.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/PortableServer/PortableServer.h"
-
-ACE_RCSID(Explicit_Activation, server, "$Id$")
-
-class test_i :
- public virtual POA_test
-{
-public:
- test_i (CORBA::ORB_ptr orb_ptr,
- PortableServer::POA_ptr poa);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- test_ptr create_POA (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void destroy_POA (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-protected:
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- PortableServer::POA_var child_poa_;
- PortableServer::ObjectId_var oid_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("POACurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::Current_var current =
- PortableServer::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::POA_var poa =
- current->get_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var poa_name =
- poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Method invoked on servant in POA = %s\n",
- poa_name.in ()));
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-test_ptr
-test_i::create_POA (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::PolicyList policies (2);
- policies.length (2);
-
- policies[0] =
- this->poa_->create_id_assignment_policy (PortableServer::SYSTEM_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (test::_nil ());
-
- policies[1] =
- this->poa_->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (test::_nil ());
-
- PortableServer::POAManager_var poa_manager =
- this->poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (test::_nil ());
-
- ACE_CString name = "POA";
- this->child_poa_ =
- this->poa_->create_POA (name.c_str (),
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (test::_nil ());
-
- // Destroy the policies
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- test_i *servant =
- new test_i (this->orb_.in (),
- this->child_poa_.in ());
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- if (this->oid_.ptr () == 0)
- {
- this->oid_ =
- this->child_poa_->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (test::_nil ());
- }
- else
- {
- this->child_poa_->activate_object_with_id (this->oid_.in (),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (test::_nil ());
- }
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (test::_nil ());
-
- return test._retn ();
-}
-
-void
-test_i::destroy_POA (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->child_poa_->destroy (1, 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-const char *ior_file = "ior";
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "f:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'f':
- ior_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-f ior_file"
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-static int
-write_ior_to_file (const char *ior)
-{
- FILE *output_file =
- ACE_OS::fopen (ior_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output files for writing IOR: %s\n",
- ior_file),
- -1);
-
- u_int result = 0;
-
- result = ACE_OS::fprintf (output_file,
- "%s",
- ior);
- if (result != ACE_OS::strlen (ior))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_OS::fprintf failed while writing %s to %s\n",
- ior,
- ior_file),
- -1);
-
- ACE_OS::fclose (output_file);
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result = parse_args (argc, argv);
- if (result != 0)
- return result;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant (orb.in (),
- root_poa.in ());
-
- test_var test =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int write_result =
- write_ior_to_file (ior.in ());
- if (write_result != 0)
- return write_result;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Persistent_ID/test.idl b/TAO/tests/POA/Persistent_ID/test.idl
deleted file mode 100644
index 5651d1d18f6..00000000000
--- a/TAO/tests/POA/Persistent_ID/test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
- test create_POA ();
- void destroy_POA ();
- void shutdown ();
-};
diff --git a/TAO/tests/POA/Policies/.cvsignore b/TAO/tests/POA/Policies/.cvsignore
deleted file mode 100644
index a5bf361f073..00000000000
--- a/TAO/tests/POA/Policies/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Policies
diff --git a/TAO/tests/POA/Policies/Policies.cpp b/TAO/tests/POA/Policies/Policies.cpp
deleted file mode 100644
index 095c1dca356..00000000000
--- a/TAO/tests/POA/Policies/Policies.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Policies
-//
-// = FILENAME
-// Policies.cpp
-//
-// = DESCRIPTION
-// This program tests the construction of POA policies, both
-// through the generic ORB::create_policy interface and the
-// PortableServer specific interfaces.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "tao/ORB.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "ace/Log_Msg.h"
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow to POA.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the POA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-#if (TAO_HAS_MINIMUM_POA == 0)
-
- {
- PortableServer::ThreadPolicy_var policy1 =
- root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= PortableServer::ORB_CTRL_MODEL;
-
- CORBA::Policy_var policy =
- orb->create_policy (PortableServer::THREAD_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ThreadPolicy_var policy2 =
- PortableServer::ThreadPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->value () == policy2->value ());
- }
-
-#endif /* TAO_HAS_MINIMUM_POA == 0 */
-
- {
- PortableServer::LifespanPolicy_var policy1 =
- root_poa->create_lifespan_policy (PortableServer::TRANSIENT
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= PortableServer::TRANSIENT;
-
- CORBA::Policy_var policy =
- orb->create_policy (PortableServer::LIFESPAN_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::LifespanPolicy_var policy2 =
- PortableServer::LifespanPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->value () == policy2->value ());
- }
-
- {
- PortableServer::IdUniquenessPolicy_var policy1 =
- root_poa->create_id_uniqueness_policy (PortableServer::UNIQUE_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= PortableServer::UNIQUE_ID;
-
- CORBA::Policy_var policy =
- orb->create_policy (PortableServer::ID_UNIQUENESS_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::IdUniquenessPolicy_var policy2 =
- PortableServer::IdUniquenessPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->value () == policy2->value ());
- }
-
- {
- PortableServer::IdAssignmentPolicy_var policy1 =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= PortableServer::USER_ID;
-
- CORBA::Policy_var policy =
- orb->create_policy (PortableServer::ID_ASSIGNMENT_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::IdAssignmentPolicy_var policy2 =
- PortableServer::IdAssignmentPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->value () == policy2->value ());
- }
-
-#if (TAO_HAS_MINIMUM_POA == 0)
-
- {
- PortableServer::ImplicitActivationPolicy_var policy1 =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= PortableServer::IMPLICIT_ACTIVATION;
-
- CORBA::Policy_var policy =
- orb->create_policy (PortableServer::IMPLICIT_ACTIVATION_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ImplicitActivationPolicy_var policy2 =
- PortableServer::ImplicitActivationPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->value () == policy2->value ());
- }
-
- {
- PortableServer::ServantRetentionPolicy_var policy1 =
- root_poa->create_servant_retention_policy (PortableServer::RETAIN
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= PortableServer::RETAIN;
-
- CORBA::Policy_var policy =
- orb->create_policy (PortableServer::SERVANT_RETENTION_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ServantRetentionPolicy_var policy2 =
- PortableServer::ServantRetentionPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->value () == policy2->value ());
- }
-
- {
- PortableServer::RequestProcessingPolicy_var policy1 =
- root_poa->create_request_processing_policy (PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY;
-
- CORBA::Policy_var policy =
- orb->create_policy (PortableServer::REQUEST_PROCESSING_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::RequestProcessingPolicy_var policy2 =
- PortableServer::RequestProcessingPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->value () == policy2->value ());
- }
-
-#endif /* TAO_HAS_MINIMUM_POA == 0 */
-
- ACE_DEBUG ((LM_DEBUG,
- "%s successful\n",
- argv[0]));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/Policies/Policies.mpc b/TAO/tests/POA/Policies/Policies.mpc
deleted file mode 100644
index 49fcc0fc6a3..00000000000
--- a/TAO/tests/POA/Policies/Policies.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver, pi_server {
-}
diff --git a/TAO/tests/POA/Policies/run_test.pl b/TAO/tests/POA/Policies/run_test.pl
deleted file mode 100755
index 8c87f1f6805..00000000000
--- a/TAO/tests/POA/Policies/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Policies");
-}
-else {
- $T = new PerlACE::Process ("Policies");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/README b/TAO/tests/POA/README
deleted file mode 100644
index 9d4a03425d2..00000000000
--- a/TAO/tests/POA/README
+++ /dev/null
@@ -1,97 +0,0 @@
-// $Id$
-
-The following TAO applications test and illustate various Portable
-Object Adapter (POA) interfaces and their usage scenarios.
-
- . Identity
-
- The example shows the identity between servants, ids,
- and references.
-
- . POA_Destruction
-
- The program tests the destruction of a POA during an
- upcall.
-
- . Default_Servant
-
- This program tests the behavior of
- POA::id_to_servant() and POA::reference_to_servant()
- with the use of default servants.
-
- . Object_Reactivation
-
- This program tests the reactivation of a servant that
- has been deactivated but not removed from the Active
- Object Map yet.
-
- . Excessive_Object_Deactivations
-
- This program tests for excessive deactivations of a
- servant. The test checks excessive deactivations in a
- POA with SYSTEM_ID and other POA with USER_ID. The
- test also check for excessive deactivations during
- upcalls.
-
- . Non_Servant_Upcalls
-
- This program check the users ability to make calls on
- a POA during non-servant upcalls. In this example, a
- servant which is being destroyed during because of a
- deactivate_object() call, tries to deactivate another
- object in its destructor.
-
- . wait_for_completion
-
- This program tests the <wait_for_completion> feature
- of the POA.
-
- . Single_Threaded_POA
-
- This program tests to make sure that two threads
- cannot call servants in a single threaded POA
- simultaneously. At the same time, it makes sure that
- a servant can call itself or other servants in the
- same POA while in an upcall.
-
- . Etherealization
-
- This program tests for deactivation and
- etherealization of reference counted and non reference
- counted servants.
-
- . Persistent_ID
-
- This test checks the combination of PERSISTENT &
- SYSTEM_ID POA policies.
-
- . Policies
-
- This program tests the construction of POA policies,
- both through the generic ORB::create_policy interface
- and the PortableServer specific interfaces.
-
- . MT_Servant_Locator
-
- This program tests that multiple calls to the Servant
- Locator can take place simultaneously.
-
- . Nested_Non_Servant_Upcalls
-
- This program tests that nested non-servant upcalls are
- handled correctly.
-
- . POAManagerFactory
-
- The program tests the POAManagerFactory interface. Test may
- be run by hand using "POAManagerFactory -v" to get a verbose
- report of individual tests being run.
-
- . EndpointPolicy
-
- Tests for the endpoint policy, the server listens on two
- endpoints, one with an alias rendering it unreachable. The
- server uses the endpoint policy to create two IORs, one with
- the only the good endpoint and another with only the bad. The
- client expects to reach the good ior and expects to fail with
- the bad ior.
diff --git a/TAO/tests/POA/Reference_Counting/Hello.idl b/TAO/tests/POA/Reference_Counting/Hello.idl
deleted file mode 100644
index de1bd50f878..00000000000
--- a/TAO/tests/POA/Reference_Counting/Hello.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-// $Id$
-//
-
-interface Hello {
- void moo ();
-};
diff --git a/TAO/tests/POA/Reference_Counting/Reference_Counting.mpc b/TAO/tests/POA/Reference_Counting/Reference_Counting.mpc
deleted file mode 100644
index 68a3f8087d1..00000000000
--- a/TAO/tests/POA/Reference_Counting/Reference_Counting.mpc
+++ /dev/null
@@ -1,8 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- test.cpp
- }
-}
diff --git a/TAO/tests/POA/Reference_Counting/run_test.pl b/TAO/tests/POA/Reference_Counting/run_test.pl
deleted file mode 100755
index 46ebddc873c..00000000000
--- a/TAO/tests/POA/Reference_Counting/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-$server = $SV->SpawnWaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/POA/Reference_Counting/test.cpp b/TAO/tests/POA/Reference_Counting/test.cpp
deleted file mode 100644
index bd7b83a4082..00000000000
--- a/TAO/tests/POA/Reference_Counting/test.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-// $Id$
-
-#include "HelloS.h"
-
-ACE_RCSID (Reference_Counting,
- test,
- "$Id$")
-
-class Hello_impl :
- virtual public POA_Hello
-{
-public:
- Hello_impl ()
- {
- ACE_DEBUG ((LM_DEBUG, "Hello_impl::Hello_impl()\n"));
- }
-
- ~Hello_impl ()
- {
- ACE_DEBUG ((LM_DEBUG, "Hello_impl::~Hello_impl()\n"));
- }
-
- virtual void moo (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
- {
- }
-};
-
-CORBA::ULong
-getRefCount (PortableServer::ServantBase * sb ACE_ENV_ARG_DECL)
-{
- return sb->_refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-int
-main (int argc, char * argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- Hello_impl * h = 0;
- ACE_NEW_RETURN (h,Hello_impl, 1);
-
- CORBA::ULong before_act = h->_refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Before activation: %d\n", before_act));
-
- PortableServer::ObjectId_var oid = poa->activate_object (h ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong after_act = h->_refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "After activation: %d\n", after_act));
- {
- /*
- * C++ Language Mapping (formal/03-06-03), section 1.37.3 (Servant
- * Memory Management Considerations), first bullet on page 1-136:
- *
- * POA::id_to_servant returns a Servant. The POA invokes _add_ref
- * once on the Servant before returning it; the caller of
- * id_to_servant is responsible for invoking _remove_ref on the
- * returned servant when it is finished with it.
- */
-
- CORBA::ULong refCountBeforeIdToServant =
- h->_refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Before id_to_servant: %d\n", refCountBeforeIdToServant));
-
- PortableServer::ServantBase_var srv = poa->id_to_servant (oid.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong refCountAfterIdToServant =
- srv->_refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);;
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "After id_to_servant: %d\n", refCountAfterIdToServant));
-
- /*
- * According to the above quote, this assertion shall be true.
- */
- ACE_ASSERT (refCountAfterIdToServant == refCountBeforeIdToServant + 1);
-
- /*
- * At the end of this scope, "srv" is destructed, which decrements
- * the servant's reference count.
- */
- }
-
- CORBA::ULong before_deact = h->_refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Before deactivate_object: %d\n", before_deact));
-
- poa->deactivate_object (oid.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /*
- * Because id_to_servant did not increment the reference count, but
- * the reference count was decremented by the "srv" destructor, the
- * reference count, using TAO 1.4.5, is now 0, and the servant has
- * been destructed. So the following will crash, despite being
- * correct.
- */
-
- CORBA::ULong after_deact = h->_refcount_value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "After deactivate_object: %d\n", after_deact));
-
- h->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->shutdown (1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/POA/Single_Threaded_POA/.cvsignore b/TAO/tests/POA/Single_Threaded_POA/.cvsignore
deleted file mode 100644
index e376b320c12..00000000000
--- a/TAO/tests/POA/Single_Threaded_POA/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Single_Threaded_POA
diff --git a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
deleted file mode 100644
index f841fcdfdfd..00000000000
--- a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/Single_Threaded_POA
-//
-// = FILENAME
-// Single_Threaded_POA.cpp
-//
-// = DESCRIPTION
-// This program tests to make sure that two threads cannot call
-// servants in a single threaded POA simultaneously. At the same
-// time, it makes sure that a servant can call itself or other
-// servants in the same POA while in an upcall.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
-
-class test_i : public virtual POA_test
-{
-public:
- test_i (PortableServer::POA_ptr poa);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- PortableServer::POA_var poa_;
- int called_self_;
-};
-
-test_i::test_i (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa)),
- called_self_ (0)
-{
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Entering Worker::svc from %t and sleeping....\n"));
-
- ACE_OS::sleep (3);
-
- ACE_DEBUG ((LM_DEBUG,
- "Done resting from %t\n"));
-
- if (this->called_self_ == 0)
- {
- this->called_self_ = 1;
-
- ACE_DEBUG ((LM_DEBUG,
- "Calling self from %t\n"));
-
- test_var self = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- self->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-class Worker : public ACE_Task_Base
-{
-public:
- Worker (test_ptr t);
- int svc (void);
-
-private:
- test_var test_;
-};
-
-Worker::Worker (test_ptr t)
- : test_ (test::_duplicate (t))
-{
-}
-
-int
-Worker::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->test_->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in thread");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain the RootPOA.
- CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Policies for the new POA.
- CORBA::PolicyList policies (2);
- policies.length (2);
-
- policies[0] =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[1] =
- root_poa->create_thread_policy (PortableServer::SINGLE_THREAD_MODEL
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creation of the child POA.
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("child",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Destroy the policies
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant1 (child_poa.in ());
- test_i servant2 (child_poa.in ());
-
- test_var object1 = servant1._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var object2 = servant2._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Worker worker1 (object1.in ());
- Worker worker2 (object2.in ());
-
- int result =
- worker1.activate () != 0 ||
- worker2.activate () != 0;
- ACE_ASSERT (result == 0);
-
- result = ACE_Thread_Manager::instance ()->wait ();
- ACE_ASSERT (result == 0);
-
- // In non-debug compiles, asserts will disappear.
- ACE_UNUSED_ARG (result);
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.mpc b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.mpc
deleted file mode 100644
index 6443ce82a36..00000000000
--- a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoexe, portableserver, minimum_corba {
-}
diff --git a/TAO/tests/POA/Single_Threaded_POA/run_test.pl b/TAO/tests/POA/Single_Threaded_POA/run_test.pl
deleted file mode 100755
index c84a9db2a34..00000000000
--- a/TAO/tests/POA/Single_Threaded_POA/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Single_Threaded_POA");
-}
-else {
- $T = new PerlACE::Process ("Single_Threaded_POA");
-}
-
-$client = $T->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: test returned $client\n";
- exit 1;
-}
-
-exit 0;
-
diff --git a/TAO/tests/POA/Single_Threaded_POA/test.idl b/TAO/tests/POA/Single_Threaded_POA/test.idl
deleted file mode 100644
index dd1b063b9bf..00000000000
--- a/TAO/tests/POA/Single_Threaded_POA/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
-};
diff --git a/TAO/tests/POA/wait_for_completion/.cvsignore b/TAO/tests/POA/wait_for_completion/.cvsignore
deleted file mode 100644
index 8386b39bdc5..00000000000
--- a/TAO/tests/POA/wait_for_completion/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-wait_for_completion
diff --git a/TAO/tests/POA/wait_for_completion/run_test.pl b/TAO/tests/POA/wait_for_completion/run_test.pl
deleted file mode 100755
index 515cd528d22..00000000000
--- a/TAO/tests/POA/wait_for_completion/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("wait_for_completion");
-}
-else {
- $T = new PerlACE::Process ("wait_for_completion");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/POA/wait_for_completion/test.idl b/TAO/tests/POA/wait_for_completion/test.idl
deleted file mode 100644
index 098546eb56e..00000000000
--- a/TAO/tests/POA/wait_for_completion/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-interface test
-{
- void destroy_poa ();
-};
diff --git a/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp b/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
deleted file mode 100644
index 8b945a68c1b..00000000000
--- a/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/POA/wait_for_completion
-//
-// = FILENAME
-// wait_for_completion.cpp
-//
-// = DESCRIPTION
-// This program tests the wait_for_completion feature of a POA.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "testS.h"
-
-class test_i : public POA_test
-{
-public:
- void destroy_poa (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void test_poa (PortableServer::POA_ptr poa);
-
- PortableServer::POA_var poa_;
-};
-
-void
-test_i::test_poa (PortableServer::POA_ptr poa)
-{
- this->poa_ = PortableServer::POA::_duplicate (poa);
-}
-
-void
-test_i::destroy_poa (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Boolean etherealize_objects = 1;
- CORBA::Boolean wait_for_completion = 1;
- this->poa_->destroy (etherealize_objects,
- wait_for_completion
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableServer::POA_ptr
-init_orb (int argc,
- char **argv,
- const char *orb_name
- ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- orb_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Obtain the RootPOA.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POA_var object from Object_var.
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (PortableServer::POA::_nil ());
-
- return root_poa._retn ();
-}
-
-int
-main (int argc,
- char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- PortableServer::POA_var first_poa =
- init_orb (argc,
- argv,
- "first ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var second_poa =
- init_orb (argc,
- argv,
- "second ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant;
- test_var test_object = servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int expected_exception_raised = 0;
-
- ACE_TRY_EX (first_poa)
- {
- servant.test_poa (first_poa.in ());
-
- test_object->destroy_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (first_poa);
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
- {
- // This is the correct exception! Ignore
- expected_exception_raised = 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- // Make sure an exception was raised and it was of the correct
- // type.
- ACE_ASSERT (expected_exception_raised);
-
- // In non-debug compiles, asserts will disappear.
- ACE_UNUSED_ARG (expected_exception_raised);
-
- servant.test_poa (second_poa.in ());
-
- test_object->destroy_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- first_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Unexpected exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/POA/wait_for_completion/wait_for_completion.mpc b/TAO/tests/POA/wait_for_completion/wait_for_completion.mpc
deleted file mode 100644
index dc2f374ac05..00000000000
--- a/TAO/tests/POA/wait_for_completion/wait_for_completion.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(POA*): taoserver {
- exename = wait_for_completion
-}
diff --git a/TAO/tests/Parallel_Connect_Strategy/Parallel_Connect_Strategy.mpc b/TAO/tests/Parallel_Connect_Strategy/Parallel_Connect_Strategy.mpc
deleted file mode 100644
index 29d26448590..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/Parallel_Connect_Strategy.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable {
- idlflags += -Sa -St
- Source_Files {
- Test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Parallel_Connect_Strategy/README b/TAO/tests/Parallel_Connect_Strategy/README
deleted file mode 100644
index 75dac13ce01..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/README
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
-
-@page Parallel Connect Strategy Test README File
-
-This test is intended to demonstrate that the Parallel Connect
-strategy improves performance of connection establishment regardless
-of the wait strategy involved.
-
-The measurements are timed invocations based on the ACE_High_Res_Timer.
-
-Sample run_test.pl output:
-LF wait strategy test
-Starting invocation 1 - call completed in 6347 usec
-Starting invocation 2 - call completed in 406 usec
-
-LF wait strategy, corbaloc test
-Narrowing IOR - call completed in 5172 usec
-Starting invocation 1 - call completed in 193 usec
-Starting invocation 2 - call completed in 170 usec
-
-Reactive wait strategy test
-Starting invocation 1 - call completed in 4469 usec
-Starting invocation 2 - call completed in 361 usec
-
-Blocked wait strategy test
-Starting invocation 1 - call completed in 189015027 usec
-Starting invocation 2 - call completed in 408 usec
-
-No parallel connect test
-Starting invocation 1 - call completed in 189014806 usec
-Starting invocation 2 - call completed in 189012352 usec
-
-*/
diff --git a/TAO/tests/Parallel_Connect_Strategy/Test.idl b/TAO/tests/Parallel_Connect_Strategy/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Parallel_Connect_Strategy/Test_i.cpp b/TAO/tests/Parallel_Connect_Strategy/Test_i.cpp
deleted file mode 100644
index bdf487d4a54..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/Test_i.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// $Id$
-//
-#include "Test_i.h"
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Parallel_Connect_Strategy/Test_i.h b/TAO/tests/Parallel_Connect_Strategy/Test_i.h
deleted file mode 100644
index 0fbcc7a4ab6..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/Test_i.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- C++ -*-
-
-//
-// $Id$
-//
-
-#ifndef TEST_I_H
-#define TEST_I_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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Parallel_Connect_Strategy/blocked.conf b/TAO/tests/Parallel_Connect_Strategy/blocked.conf
deleted file mode 100644
index 2feddbe2302..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/blocked.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# test for using the blocked connect strategy
-
-static Client_Strategy_Factory "-ORBConnectStrategy Blocked"
diff --git a/TAO/tests/Parallel_Connect_Strategy/client.cpp b/TAO/tests/Parallel_Connect_Strategy/client.cpp
deleted file mode 100644
index ee7747bb1ca..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/client.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-
-ACE_RCSID(Hello, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int kill_server = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'x':
- kill_server = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-x "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_High_Res_Timer hrt;
- ACE_hrtime_t elapsed;
-
- ACE_DEBUG ((LM_DEBUG,"Narrowing IOR - "));
- hrt.start();
-
- Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- hrt.stop();
- hrt.elapsed_microseconds (elapsed);
- hrt.reset();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("call completed in %d usec\n"),
- elapsed ));
-
- if (CORBA::is_nil (hello.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Hello reference <%s>\n",
- ior),
- 1);
- }
- if (kill_server)
- {
- hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,"Starting invocation 1 - "));
- hrt.start();
- CORBA::String_var the_string =
- hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- hrt.stop();
- hrt.elapsed_microseconds (elapsed);
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("call completed in %d usec\n"),
- elapsed ));
- ACE_DEBUG ((LM_DEBUG,"Starting invocation 2 - "));
- hrt.reset();
- hrt.start();
- the_string = hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- hrt.stop();
- hrt.elapsed_microseconds (elapsed);
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("call completed in %d usec\n"),
- elapsed ));
- }
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Parallel_Connect_Strategy/reactive.conf b/TAO/tests/Parallel_Connect_Strategy/reactive.conf
deleted file mode 100644
index 0317f1c624c..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/reactive.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# test for using the blocked connect strategy
-
-static Client_Strategy_Factory "-ORBConnectStrategy Reactive"
diff --git a/TAO/tests/Parallel_Connect_Strategy/run_test.pl b/TAO/tests/Parallel_Connect_Strategy/run_test.pl
deleted file mode 100755
index ca4b3805da4..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/run_test.pl
+++ /dev/null
@@ -1,97 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("altiiop.ior");
-unlink $iorfile;
-$status = 0;
-@bogus_eps = ("-orbendpoint iiop://localhost:10200/hostname_in_ior=126.0.0.123",
- "-orbendpoint iiop://localhost:10202/hostname_in_ior=126.0.0.124");
-$valid_ep = "-orbendpoint iiop://localhost:10201";
-
-$corbaloc = "corbaloc::126.0.0.123:10200,:localhost:10201,:126.0.0.124:10202/pcs_test";
-
-$SV_ALT_IIOP = new PerlACE::Process ("server", "-ORBUseSharedProfile 1 -o $iorfile $bogus_eps[0] $valid_ep $bogus_eps[1]");
-
-$CL_LF = new PerlACE::Process ("client", "-ORBuseParallelConnects 1 -k file://$iorfile");
-$CL_CORBALOC = new PerlACE::Process ("client", "-ORBUseSharedProfile 1 -ORBuseParallelConnects 1 -k $corbaloc");
-$CL_Reactive = new PerlACE::Process ("client", "-ORBSvcConf reactive.conf -ORBuseParallelConnects 1 -k file://$iorfile");
-$CL_Blocked = new PerlACE::Process ("client", "-ORBSvcConf blocked.conf -ORBuseParallelConnects 1 -k file://$iorfile");
-$CL_None = new PerlACE::Process ("client", "-ORBuseParallelConnects 0 -k file://$iorfile");
-$CL_Shutdown = new PerlACE::Process ("client", "-ORBuseParallelConnects 1 -k file://$iorfile -x");
-
-$SV_ALT_IIOP->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-print "LF wait strategy test\n";
-
-$client = $CL_LF->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print "\nLF wait strategy, corbaloc test\n";
-
-$client = $CL_CORBALOC->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print "\nReactive wait strategy test\n";
-
-$client = $CL_Reactive->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print "\nBlocked wait strategy test\n";
-
-$client = $CL_Blocked->SpawnWaitKill (600);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-print "\nNo parallel connect test\n";
-
-$client = $CL_None->SpawnWaitKill (900);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$client = $CL_Shutdown->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV_ALT_IIOP->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Parallel_Connect_Strategy/server.cpp b/TAO/tests/Parallel_Connect_Strategy/server.cpp
deleted file mode 100644
index 153aba883ff..00000000000
--- a/TAO/tests/Parallel_Connect_Strategy/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/IORTable/IORTable.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- CORBA::Object_var table_object =
- orb->resolve_initial_references ("IORTable"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (adapter.in ()))
- {
- ACE_ERROR ((LM_ERROR, "Nil IORTable\n"));
- }
- else
- {
- adapter->bind ("pcs_test", ior.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Param_Test/.cvsignore b/TAO/tests/Param_Test/.cvsignore
deleted file mode 100644
index 3e5043763cd..00000000000
--- a/TAO/tests/Param_Test/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-anyop
-client
-param_testA.cpp
-server
diff --git a/TAO/tests/Param_Test/Param_Test.mpc b/TAO/tests/Param_Test/Param_Test.mpc
deleted file mode 100644
index 4ad4fa1ba44..00000000000
--- a/TAO/tests/Param_Test/Param_Test.mpc
+++ /dev/null
@@ -1,70 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, minimum_corba {
- Source_Files {
- param_test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoserver, minimum_corba, dynamicinterface {
- avoids += ace_for_tao
- exename = client
- after += *Server
-
- Source_Files {
- any.cpp
- bd_array_seq.cpp
- bd_long_seq.cpp
- bd_short_seq.cpp
- bd_string.cpp
- bd_struct_seq.cpp
- bd_str_seq.cpp
- bd_wstring.cpp
- bd_wstr_seq.cpp
- big_union.cpp
- client.cpp
- complex_any.cpp
- driver.cpp
- except.cpp
- fixed_array.cpp
- fixed_struct.cpp
- helper.cpp
- multdim_array.cpp
- nested_struct.cpp
- objref.cpp
- objref_struct.cpp
- options.cpp
- recursive_struct.cpp
- recursive_union.cpp
- results.cpp
- short.cpp
- small_union.cpp
- typecode.cpp
- ub_any_seq.cpp
- ub_array_seq.cpp
- ub_long_seq.cpp
- ub_objref_seq.cpp
- ub_short_seq.cpp
- ub_string.cpp
- ub_struct_seq.cpp
- ub_str_seq.cpp
- ub_wstring.cpp
- ub_wstr_seq.cpp
- ulonglong.cpp
- var_array.cpp
- var_struct.cpp
- }
-}
-
-project(*Anyop): taoserver, minimum_corba {
- exename = anyop
- after += *Client
-
- Source_Files {
- param_testC.cpp
- anyop.cpp
- }
-}
-
diff --git a/TAO/tests/Param_Test/README b/TAO/tests/Param_Test/README
deleted file mode 100644
index 3bd468d2ff3..00000000000
--- a/TAO/tests/Param_Test/README
+++ /dev/null
@@ -1,109 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// README
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-This directory contains an application that tests all the parameter
-passing conventions in CORBA for a number of OMG IDL data types.
-
-Type "make" to make the application. The server executable is called
-"server" and the client executable is called "client".
-
-You should have the TAO IDL compiler and the TAO library installed
-before using this application.
-
-The -GA options has been added the IDL compiler command line for this
-test. This option moves the generation of implementations for type
-codes and Any insertion/extraction operators to a separate file with
-the extension *A.cpp. Adding this option tests that it is handled
-correctly for all the various IDL types used in this test.
-
-To run the server, type
-
- server [arguments to ORB_init] [-d] [-o <ior_output_file>]
-
- arguments to ORB_init start with the letters -ORB. Please
- see TAO documentattion on all the supported arguments
-
- -d for debugging.
- -o <ior_output_file> for outputting the servant IOR to a file.
-
-To run the client, type
-
- client [arguments to ORB_init] [options for this application]
-
- Supported options are:
-
- [-d] debugging
- [-n loopcount] number of times to run the test
- [-f servant-IOR-file] reads the servant-IOR from the
- specified file.
- [-k Param_Test-obj-ref-key] object key of Param_Test object
- [-i invocation (sii/dii)] default is static invocation
- interface. To use DII, type
- -i dii
- [-t data type]
- Data types supported in this version are:
-
- short for shorts
- ulonglong for unsigned long long
- ubstring for unbounded string
- ubwstring for unbounded wide string
- bdstring for bounded string
- bswstring for bounded wide string
- fixed_struct for fixed sized structs
- ub_strseq for sequences of strings
- ub_wstrseq for sequences of wide strings
- bd_strseq for bounded sequences of strings
- bd_wstrseq for bounded sequences of wide strings
- var_struct for variable structs
- nested_struct for nested structs
- objref_struct for object references inside structures
- ub_struct_seq for sequences of structs
- bd_struct_seq for bounded sequences of structs
- any for Any
- objref for object references
- objref_sequence for sequences object references
- any_sequence for sequences of Any
- ub_short_sequence for sequences of shorts
- ub_long_sequence for sequences of shorts
- bd_short_sequence for bounded sequences of shorts
- bd_long_sequence for bounded sequences of shorts
- fixed_array for arrays of fixed sized types (longs)
- var_array for arrays of var sized types (strings)
- typecode for typecode
- exception for exceptions
- multdim_array for multi dimensional arrays
-
-
- There are 2 options of giving the Param_obj-ref-key i.e IOR to
-the client:
-
- 1. Using the -f option to read the IOR from a file.
-
- 2. Using the -k option to read the IOR from the
- command line.
-
-run_test.pl:
------------
- There is a perl script in this directory named run_test.pl to
- test all the types. It starts the server first and then runs
- the client with the different data type parameters. The
- arguments it takes are:
-
- -n num -- runs the client num times (default is 5)
- -d -- runs each in debug mode
- -onewin -- keeps all tests in one window on NT
- -h -- prints this information
- -t type -- runs only one type of param test
- -i (dii|sii) -- Changes the type of invocation (default is sii)
diff --git a/TAO/tests/Param_Test/any.cpp b/TAO/tests/Param_Test/any.cpp
deleted file mode 100644
index 42d992cd65a..00000000000
--- a/TAO/tests/Param_Test/any.cpp
+++ /dev/null
@@ -1,485 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// any.cpp
-//
-// = DESCRIPTION
-// tests Anys
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "any.h"
-#include "tao/debug.h"
-
-ACE_RCSID (Param_Test,
- any,
- "$Id$")
-
-// ************************************************************************
-// Test_Any
-// ************************************************************************
-
-size_t Test_Any::counter = 0;
-
-Test_Any::Test_Any (void)
- : opname_ (CORBA::string_dup ("test_any")),
- out_ (new CORBA::Any),
- ret_ (new CORBA::Any)
-{
-}
-
-Test_Any::~Test_Any (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Any::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Any::dii_req_invoke (CORBA::Request *req ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("o1") <<= this->in_;
- req->add_inout_arg ("o2") <<= this->inout_;
- req->add_out_arg ("o3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_any);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const CORBA::Any *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new CORBA::Any (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = CORBA::Any (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new CORBA::Any (*tmp);
-}
-
-#if 0 /* any_table isn't currently used */
-static const CORBA::TypeCode_ptr any_table [] =
-{
- // primitive parameterless typecodes
- CORBA::_tc_short,
- // typecode with a simple parameter
- CORBA::_tc_string,
- // complex typecodes
- _tc_Coffee,
- Param_Test::_tc_StrSeq,
- Param_Test::_tc_StructSeq,
- Param_Test::_tc_Nested_Struct
-};
-#endif /* any_table isn't currently used */
-
-int
-Test_Any::init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- // get access to a Coffee Object
- this->cobj_ = objref->make_coffee (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->reset_parameters ();
- return 0;
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception doing make_coffee");
- }
- ACE_ENDTRY;
- return -1;
-}
-
-int
-Test_Any::reset_parameters (void)
-{
- Generator *gen = GENERATOR::instance (); // value generator
- CORBA::ULong index = (counter++ % Test_Any::ANY_LAST_TEST_ITEM);
-
- switch (index)
- {
- default:
- case Test_Any::ANY_SHORT:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_SHORT subtest\n"));
- CORBA::Short s;
- s = gen->gen_short ();
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "setting short = %d\n", s));
- this->in_ <<= s;
- this->inout_ <<= s;
- }
- break;
-
- case Test_Any::ANY_STRING:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_STRING subtest\n"));
- char *str = gen->gen_string ();
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "setting string = %s\n", str));
- this->in_ <<= str;
- this->inout_ <<= str;
- CORBA::string_free (str);
- }
- break;
-
- case Test_Any::ANY_OBJREF:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_OBJREF subtest\n"));
-
- // insert the coffee object into the Any
- this->in_ <<= this->cobj_.in ();
- this->inout_ <<= this->cobj_.in ();
- }
- break;
-
- case Test_Any::ANY_ARRAY:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_ARRAY subtest\n"));
-
- Param_Test::Fixed_Array array;
- for (size_t i = 0; i < Param_Test::DIM1; i++)
- array[i] = i;
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Setting Fixed_Array\n"));
- this->in_ <<= Param_Test::Fixed_Array_forany (array);
- this->inout_ <<= Param_Test::Fixed_Array_forany (array);
- }
- break;
-
- case Test_Any::ANY_SHORT_SEQ:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_SHORT_SEQ subtest\n"));
- CORBA::ShortSeq seq;
- seq.length (gen->gen_short () % 16);
- for (size_t i = 0; i < seq.length (); i++)
- seq[i] = gen->gen_short ();
- this->in_ <<= seq;
- this->inout_ <<= seq;
- }
- break;
-
- case Test_Any::ANY_BD_SHORT_SEQ:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_BD_SHORT_SEQ subtest\n"));
- Param_Test::Bounded_Short_Seq seq;
- seq.length (gen->gen_short () % seq.maximum ());
- for (size_t i = 0; i < seq.length (); i++)
- seq[i] = gen->gen_short ();
- this->in_ <<= seq;
- this->inout_ <<= seq;
- }
- break;
-
- case Test_Any::ANY_STRUCT:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_STRUCT subtest\n"));
- Param_Test::Fixed_Struct structure;
- structure = gen->gen_fixed_struct ();
- this->in_ <<= structure;
- this->inout_ <<= structure;
- }
- break;
-
- case Test_Any::ANY_BIG_UNION:
- {
- CORBA::Long x = gen->gen_long ();
- Param_Test::Big_Union the_union;
- the_union.the_long (x);
- this->in_ <<= the_union;
- this->inout_ <<= the_union;
-
- if (TAO_debug_level > 0)
- {
- Param_Test::Big_Union *bu_in, *bu_inout;
- this->in_ >>= bu_in;
- this->inout_ >>= bu_inout;
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_BIG_UNION subtest\n"
- " in %d\n"
- " inout %d\n",
- bu_in->the_long (),
- bu_inout->the_long ()));
- }
- }
- break;
-
- case Test_Any::ANY_SMALL_UNION:
- {
- CORBA::Long x = gen->gen_long ();
- Param_Test::Small_Union the_union;
- the_union.the_long (x);
- this->in_ <<= the_union;
- this->inout_ <<= the_union;
-
- if (TAO_debug_level > 0)
- {
- Param_Test::Small_Union *bu_in, *bu_inout;
- this->in_ >>= bu_in;
- this->inout_ >>= bu_inout;
- ACE_DEBUG ((LM_DEBUG,
- "Param_Test: ANY_SMALL_UNION subtest\n"
- " in %d\n"
- " inout %d\n",
- bu_in->the_long (),
- bu_inout->the_long ()));
- }
- }
- break;
- }
- return 0;
-}
-
-int
-Test_Any::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_any (this->in_,
- this->inout_,
- this->out_.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-CORBA::Boolean
-Test_Any::check_validity (void)
-{
- CORBA::Short short_in, short_inout, short_out, short_ret;
- const char *str_in;
- const char *str_inout;
- const char *str_out;
- const char *str_ret;
- Coffee_ptr obj_in, obj_inout, obj_out, obj_ret;
- Param_Test::Fixed_Array_forany array_in, array_inout, array_out, array_ret;
- Param_Test::Bounded_Short_Seq *bdss_in, *bdss_inout, *bdss_out, *bdss_ret;
- CORBA::ShortSeq *ubss_in, *ubss_inout, *ubss_out, *ubss_ret;
- Param_Test::Fixed_Struct *fs_in, *fs_inout, *fs_out, *fs_ret;
- Param_Test::Big_Union *bu_in, *bu_inout, *bu_out, *bu_ret;
- Param_Test::Small_Union *su_in, *su_inout, *su_out, *su_ret;
-
- if ((this->in_ >>= short_in) &&
- (this->inout_ >>= short_inout) &&
- (this->out_.in () >>= short_out) &&
- (this->ret_.in () >>= short_ret))
- {
- // ACE_DEBUG ((LM_DEBUG, "Received shorts: in = %d, "
- // "inout = %d, out = %d, ret = %d\n",
- // short_in, short_inout, short_out, short_ret));
-
- if ((short_in == short_inout) &&
- (short_in == short_out) &&
- (short_in == short_ret))
- return 1;
- else
- {
- ACE_DEBUG ((LM_DEBUG, "mismatch of short values\n"));
- return 0;
- }
- }
- else if ((this->in_ >>= str_in) &&
- (this->inout_ >>= str_inout) &&
- (this->out_.in () >>= str_out) &&
- (this->ret_.in () >>= str_ret))
- {
- if (!ACE_OS::strcmp (str_in, str_inout) &&
- !ACE_OS::strcmp (str_in, str_out) &&
- !ACE_OS::strcmp (str_in, str_ret))
- return 1;
- else
- {
- ACE_DEBUG ((LM_DEBUG, "mismatch of string values\n"));
- return 0;
- }
- }
- else if ((this->in_ >>= obj_in) &&
- (this->inout_ >>= obj_inout) &&
- (this->out_.in () >>= obj_out) &&
- (this->ret_.in () >>= obj_ret))
- {
- // all the >>= operators returned true so we are OK.
- return 1;
- }
- else if ((this->in_ >>= array_in) &&
- (this->inout_ >>= array_inout) &&
- (this->out_.in () >>= array_out) &&
- (this->ret_.in () >>= array_ret))
- {
- for (size_t i = 0; i < Param_Test::DIM1; i ++)
- {
- ssize_t ii = i;
- ssize_t square = i * i;
- if (array_in[i] != ii ||
- array_out[i] != ii ||
- array_inout[i] != square ||
- array_ret[i] != square)
- return 0;
- }
- return 1;
- }
- else if ((this->in_ >>= bdss_in) &&
- (this->inout_ >>= bdss_inout) &&
- (this->out_.in () >>= bdss_out) &&
- (this->ret_.in () >>= bdss_ret))
- {
- for (size_t i = 0; i < bdss_in->length (); i ++)
- {
- ssize_t square = i * i;
- if ((*bdss_in)[i] != (*bdss_out)[i] ||
- (*bdss_inout)[i] != square ||
- (*bdss_inout)[i] != (*bdss_ret)[i])
- return 0;
- }
- return 1;
- }
- else if ((this->in_ >>= ubss_in) &&
- (this->inout_ >>= ubss_inout) &&
- (this->out_.in () >>= ubss_out) &&
- (this->ret_.in () >>= ubss_ret))
- {
- for (size_t i = 0; i < ubss_in->length (); i ++)
- {
- ssize_t square = i * i;
- if ((*ubss_in)[i] != (*ubss_out)[i] ||
- (*ubss_inout)[i] != square ||
- (*ubss_inout)[i] != (*ubss_ret)[i])
- return 0;
- }
- return 1;
- }
- else if ((this->in_ >>= fs_in) &&
- (this->inout_ >>= fs_inout) &&
- (this->out_.in () >>= fs_out) &&
- (this->ret_.in () >>= fs_ret))
- {
- // @@ Added test for data validity here.
- return 1;
- }
- else if ((this->in_ >>= bu_in) &&
- (this->inout_ >>= bu_inout) &&
- (this->out_.in () >>= bu_out) &&
- (this->ret_.in () >>= bu_ret))
- {
- if (bu_in->_d () != 2
- || bu_inout->_d () != 2
- || bu_out->_d () != 2
- || bu_ret->_d () != 2)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Any - not all unions contain a long\n"));
- return 0;
- }
-
- if (bu_in->the_long () != bu_inout->the_long ()
- || bu_in->the_long () != bu_out->the_long ()
- || bu_in->the_long () != bu_ret->the_long ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Any - values mismatch\n"
- " in %d\n"
- " inout %d\n"
- " out %d\n"
- " ret %d\n",
- bu_in->the_long (),
- bu_inout->the_long (),
- bu_out->the_long (),
- bu_ret->the_long () ));
- return 0;
- }
- return 1;
- }
- else if ((this->in_ >>= su_in) &&
- (this->inout_ >>= su_inout) &&
- (this->out_.in () >>= su_out) &&
- (this->ret_.in () >>= su_ret))
- {
- if (su_in->_d () != Param_Test::A_LONG
- || su_inout->_d () != Param_Test::A_LONG
- || su_out->_d () != Param_Test::A_LONG
- || su_ret->_d () != Param_Test::A_LONG)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Any - not all unions contain a long\n"));
- return 0;
- }
-
- if (su_in->the_long () != su_inout->the_long ()
- || su_in->the_long () != su_out->the_long ()
- || su_in->the_long () != su_ret->the_long ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Any - values mismatch\n"
- " in %d\n"
- " inout %d\n"
- " out %d\n"
- " ret %d\n",
- su_in->the_long (),
- su_inout->the_long (),
- su_out->the_long (),
- su_ret->the_long () ));
- return 0;
- }
- return 1;
- }
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Any::check_validity (CORBA::Request_ptr /*req*/)
-{
- return this->check_validity ();
-}
-
-void
-Test_Any::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/any.h b/TAO/tests/Param_Test/any.h
deleted file mode 100644
index f27f8be3c99..00000000000
--- a/TAO/tests/Param_Test/any.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// any.h
-//
-// = DESCRIPTION
-// Tests Anys
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_ANY_H
-#define PARAM_TEST_ANY_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test Anys
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Any
-{
-public:
- Test_Any (void);
- // ctor
-
- ~Test_Any (void);
- // dtor
-
- enum
- {
- ANY_SHORT = 0,
- ANY_STRING,
- ANY_OBJREF,
- ANY_ARRAY,
- ANY_SHORT_SEQ,
- ANY_BD_SHORT_SEQ,
- ANY_STRUCT,
- ANY_BIG_UNION,
- ANY_SMALL_UNION,
- ANY_LAST_TEST_ITEM
- };
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Coffee_var cobj_;
- // Coffee object used to test Any with object.
-
- static size_t counter;
- // test counter.
-
- CORBA::Any in_;
- // in parameter
-
- CORBA::Any inout_;
- // inout parameter
-
- CORBA::Any_var out_;
- // out parameter
-
- CORBA::Any_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_ANY_H */
diff --git a/TAO/tests/Param_Test/anyop.cpp b/TAO/tests/Param_Test/anyop.cpp
deleted file mode 100644
index c15ba6afd10..00000000000
--- a/TAO/tests/Param_Test/anyop.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// anyop.cpp
-//
-// = DESCRIPTION
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "param_testC.h"
-
-#include "tao/debug.h"
-#include "ace/OS_NS_string.h"
-
-// Not normally needed, but we create an object reference in this test,
-// and we have to narrow it.
-#include "tao/Object_T.h"
-
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (Param_Test,
- anyop,
- "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- int n = 1024;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Get_Opt get_opt (argc, argv, "dn:");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt)
- {
- case 'd':
- TAO_debug_level++;
- break;
- case 'n':
- n = ACE_OS::atoi (get_opt.opt_arg ());
- break;
- case '?':
- default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "-d debug"
- "-n <num> "
- "\n",
- argv[0]));
- return -1;
- }
- }
-
- for (int i = 0; i != n; ++i)
- {
- CORBA::Any any;
-
- {
- Param_Test::Var_Array var_array;
- any <<= Param_Test::Var_Array_forany (var_array);
-
- Param_Test::Var_Array_forany forany;
-
- if (!(any >>= forany))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for Param_Test::Var_Array\n"));
- }
- Param_Test::Var_Array_var var =
- Param_Test::Var_Array_dup (forany.in ());
- any <<= Param_Test::Var_Array_forany (var.inout ());
-
- if (!(any >>= forany))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for Param_Test::Var_Array[2]\n"));
- }
- }
-
- {
- CORBA::Object_var obj =
- orb->string_to_object ("corbaloc:iiop:localhost:1234/Foo/Bar"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Param_Test_var param_test =
- TAO::Narrow_Utils<Param_Test>::unchecked_narrow (
- obj.in (),
- _TAO_Param_Test_Proxy_Broker_Factory_function_pointer
- );
- ACE_TRY_CHECK;
- TAO_Stub *stub = param_test->_stubobj ();
- stub->type_id = CORBA::string_dup ("IDL:Param_Test:1.0");
-
- any <<= param_test.in ();
-
- Param_Test_ptr o;
-
- if (!(any >>= o))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Cannot extract Param_Test (oh the horror)\n"));
- }
- CORBA::Boolean equiv =
- param_test->_is_equivalent (o ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!equiv)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Mismatched Param_Test extraction\n"));
- }
-
- CORBA::Object_var other;
-
- if (!(any >>= CORBA::Any::to_object (other.inout ())))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Cannot extract Param_Test as Object\n"));
- }
- }
-
- {
- CORBA::Short i = 123;
- any <<= i;
-
- CORBA::Short o;
-
- if (!(any >>= o)
- || i != o)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for CORBA::Short (%d,%d)\n",
- i, o));
- }
- }
-
- {
- CORBA::Long i = 123;
- any <<= i;
-
- CORBA::Long o;
-
- if (!(any >>= o)
- || i != o)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for CORBA::Long (%d,%d)\n",
- i, o));
- }
- }
-
- {
- CORBA::ULongLong i = 123;
- any <<= i;
-
- CORBA::ULongLong o;
-
- if (!(any >>= o)
- || i != o)
- {
-#if defined (ACE_LACKS_LONGLONG_T)
- char bufferi[32];
- char buffero[32];
- ACE_DEBUG ((LM_DEBUG,
- "Failure for CORBA::ULongLong (%s,%s)\n",
- i.as_string (bufferi),
- o.as_string (buffero)));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Failure for CORBA::ULongLong (%Q,%Q)\n",
- i, o));
-#endif
- }
- }
-
- {
- CORBA::Double i = 123;
- any <<= i;
-
- CORBA::Double o;
-
- if (!(any >>= o)
- || i != o)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for CORBA::Double (%f,%f)\n",
- i, o));
- }
- }
-
- {
- CORBA::Any any;
- CORBA::Any *i = 0;
- ACE_NEW_RETURN (i,
- CORBA::Any,
- -1);
- *i <<= CORBA::Short (123);
- any <<= *i;
-
- const CORBA::Any *o;
- CORBA::Short oo;
-
- if (!(any >>= o)
- || !(*o >>= oo)
- || 123 != oo)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for CORBA::Any "
- "(copying insertion, %d)\n",
- oo));
- }
-
- any <<= i;
-
- if (!(any >>= o)
- || !(*o >>= oo)
- || 123 != oo)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for CORBA::Any "
- "(non-copying insertion, %d)\n",
- oo));
- }
- }
-
- {
- const char i[] = "123";
- any <<= i;
-
- const char *o;
-
- if (!(any >>= o)
- || ACE_OS::strcmp (i, o) != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for char* (%s,%s)\n",
- i, o));
- }
- }
-
- {
- CORBA::Any any;
- Param_Test::Fixed_Struct *i = 0;
- ACE_NEW_RETURN (i,
- Param_Test::Fixed_Struct,
- -1);
- i->l = -7;
- i->c = 'c';
- i->s = 5;
- i->o = 255;
- i->f = 2.3f;
- i->b = 0;
- i->d = 3.1416;
-
- any <<= *i;
- Param_Test::Fixed_Struct *o;
-
- if (!(any >>= o)
- || o->l != i->l
- || o->c != i->c
- || o->s != i->s
- || o->o != i->o
- || o->f != i->f
- || o->b != i->b
- || o->d != i->d)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for Fixed_Struct "
- "(copying insertion)\n"));
- }
-
- any <<= i;
-
- if (!(any >>= o)
- || o->l != i->l
- || o->c != i->c
- || o->s != i->s
- || o->o != i->o
- || o->f != i->f
- || o->b != i->b
- || o->d != i->d)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for Fixed_Struct "
- "(non-copying insertion)\n"));
- }
- }
-
- {
- CORBA::ULong len = 3;
- CORBA::Any any;
- CORBA::LongSeq *i = 0;
- ACE_NEW_RETURN (i,
- CORBA::LongSeq (len),
- -1);
- i->length (len);
-
- for (CORBA::ULong k = 0; k < len; ++k)
- {
- (*i)[k] = k;
- }
-
- any <<= *i;
- CORBA::LongSeq *o;
-
- if (!(any >>= o)
- || (*i)[0] != (*o)[0]
- || (*i)[1] != (*o)[1]
- || (*i)[2] != (*o)[2])
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for Long_Seq "
- "(copying insertion)\n"));
- }
-
- any <<= i;
-
- if (!(any >>= o)
- || (*i)[0] != (*o)[0]
- || (*i)[1] != (*o)[1]
- || (*i)[2] != (*o)[2])
- {
- ACE_DEBUG ((LM_DEBUG,
- "Failure for Long_Seq "
- "(non-copying insertion)\n"));
- }
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "IDL Types");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Param_Test/bd_array_seq.cpp b/TAO/tests/Param_Test/bd_array_seq.cpp
deleted file mode 100644
index 9c2b6ea098e..00000000000
--- a/TAO/tests/Param_Test/bd_array_seq.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_array_seq.cpp
-//
-// = DESCRIPTION
-// tests bounded array sequences
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_array_seq.h"
-
-ACE_RCSID (Param_Test,
- bd_array_seq,
- "$Id$")
-
-const CORBA::ULong MAX_ARRAYSEQ_LEN = 1;
-
-// ************************************************************************
-// Test_Bounded_Array_Sequence
-// ************************************************************************
-
-Test_Bounded_Array_Sequence::Test_Bounded_Array_Sequence (void)
- : opname_ (CORBA::string_dup ("test_bounded_array_sequence")),
- inout_ (new Param_Test::Bounded_ArraySeq),
- out_ (new Param_Test::Bounded_ArraySeq),
- ret_ (new Param_Test::Bounded_ArraySeq)
-{
-}
-
-Test_Bounded_Array_Sequence::~Test_Bounded_Array_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Bounded_Array_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_Array_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
- req->set_return_type (Param_Test::_tc_Bounded_ArraySeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Bounded_ArraySeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Bounded_ArraySeq (*tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = new Param_Test::Bounded_ArraySeq (*tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = new Param_Test::Bounded_ArraySeq (*tmp);
-}
-
-int
-Test_Bounded_Array_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // set the length of the sequence
- this->in_.length (MAX_ARRAYSEQ_LEN);
- // different from in_.
- this->inout_->length (1);
-
- // now set each individual element
- Param_Test::Fixed_Array tmp;
-
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- tmp[j] = gen->gen_long ();
- }
-
- Param_Test::Fixed_Array_copy (this->inout_[0], tmp);
-
- for (CORBA::ULong i = 0; i < this->in_.length (); i++)
- {
- // Generate some arbitrary array to be filled into the ith
- // location in the sequence.
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- tmp[j] = gen->gen_long ();
- }
-
- Param_Test::Fixed_Array_copy (this->in_[i], tmp);
- }
-
- return 0;
-}
-
-int
-Test_Bounded_Array_Sequence::reset_parameters (void)
-{
- // Delete the previous ones.
- this->inout_ = new Param_Test::Bounded_ArraySeq;
- this->out_ = new Param_Test::Bounded_ArraySeq;
- this->ret_ = new Param_Test::Bounded_ArraySeq;
- return 0;
-}
-
-int
-Test_Bounded_Array_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Bounded_ArraySeq_out out (this->out_.out ());
-
- this->ret_ =
- objref->test_bounded_array_sequence (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_Array_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_Array_Sequence::check_validity (void)
-{
- if (this->compare (this->in_, this->inout_.in ()) &&
- this->compare (this->in_, this->out_.in ()) &&
- this->compare (this->in_, this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Bounded_Array_Sequence::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_Bounded_Array_Sequence::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "IN sequence\n"));
- this->print_sequence (this->in_);
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "INOUT sequence\n"));
- this->print_sequence (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "OUT sequence\n"));
- this->print_sequence (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "RET sequence\n"));
- this->print_sequence (this->ret_.in ());
-}
-
-CORBA::Boolean
-Test_Bounded_Array_Sequence::compare (const Param_Test::Bounded_ArraySeq &s1,
- const Param_Test::Bounded_ArraySeq &s2)
-{
- if (s1.maximum () != s2.maximum ())
- {
- return 0;
- }
-
- if (s1.length () != s2.length ())
- {
- return 0;
- }
-
- for (CORBA::ULong i = 0; i < s1.length (); i++)
- {
- const Param_Test::Fixed_Array& vs1 = s1[i];
- const Param_Test::Fixed_Array& vs2 = s2[i];
-
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- if (vs1[j] != vs2[j])
- {
- return 0;
- }
- }
- }
-
- return 1; // success
-}
-
-void
-Test_Bounded_Array_Sequence::print_sequence (const Param_Test::Bounded_ArraySeq &s)
-{
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s.maximum (),
- s.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
-
- for (CORBA::ULong i=0; i < s.length (); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d --\n",
- i));
-
- const Param_Test::Fixed_Array& vs = s[i];
-
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element%d[%d] = %d\n",
- i,
- j,
- vs[j]));
- }
- }
-}
diff --git a/TAO/tests/Param_Test/bd_array_seq.h b/TAO/tests/Param_Test/bd_array_seq.h
deleted file mode 100644
index 060454b6e71..00000000000
--- a/TAO/tests/Param_Test/bd_array_seq.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_array_seq.h
-//
-// = DESCRIPTION
-// Tests bounded array sequence
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_ARRAY_SEQUENCE_H
-#define PARAM_TEST_BOUNDED_ARRAY_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test bounded sequence of arrays
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Bounded_Array_Sequence
-{
-public:
- Test_Bounded_Array_Sequence (void);
- // ctor
-
- ~Test_Bounded_Array_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-protected:
- CORBA::Boolean compare (const Param_Test::Bounded_ArraySeq &s1,
- const Param_Test::Bounded_ArraySeq &s2);
- // compare
-
- void print_sequence (const Param_Test::Bounded_ArraySeq &s);
- // print individual sequence
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Bounded_ArraySeq in_;
- // in parameter
-
- // these need memory management
- Param_Test::Bounded_ArraySeq_var inout_;
- // inout parameter
-
- Param_Test::Bounded_ArraySeq_var out_;
- // out parameter
-
- Param_Test::Bounded_ArraySeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_ARRAY_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/bd_long_seq.cpp b/TAO/tests/Param_Test/bd_long_seq.cpp
deleted file mode 100644
index 44be6ed3932..00000000000
--- a/TAO/tests/Param_Test/bd_long_seq.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_long_seq.cpp
-//
-// = DESCRIPTION
-// tests bounded long sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_long_seq.h"
-
-ACE_RCSID (Param_Test,
- bd_long_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Bounded_Long_Sequence
-// ************************************************************************
-
-Test_Bounded_Long_Sequence::Test_Bounded_Long_Sequence (void)
- : opname_ (CORBA::string_dup ("test_bounded_long_sequence")),
- in_ (new Param_Test::Bounded_Long_Seq),
- inout_ (new Param_Test::Bounded_Long_Seq),
- out_ (new Param_Test::Bounded_Long_Seq),
- ret_ (new Param_Test::Bounded_Long_Seq)
-{
-}
-
-Test_Bounded_Long_Sequence::~Test_Bounded_Long_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Bounded_Long_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_Long_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
- req->set_return_type (Param_Test::_tc_Bounded_Long_Seq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const Param_Test::Bounded_Long_Seq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Bounded_Long_Seq (*tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = new Param_Test::Bounded_Long_Seq (*tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = new Param_Test::Bounded_Long_Seq (*tmp);
-}
-
-int
-Test_Bounded_Long_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- // get some sequence length (32 in this case)
- CORBA::ULong len = this->in_->maximum ();
-
- // set the length of the sequence
- this->in_->length (len);
- this->inout_->length (len);
- // now set each individual element
- for (CORBA::ULong i=0; i < this->in_->maximum (); i++)
- {
- this->in_[i] = i;
- this->inout_[i] = i+1; // different from in_
- }
-
- this->inout_->length (0);
- this->out_->length (0);
- this->ret_->length (0);
-
- return 0;
-}
-
-int
-Test_Bounded_Long_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Bounded_Long_Seq; // delete the previous ones
- this->out_ = new Param_Test::Bounded_Long_Seq;
- this->ret_ = new Param_Test::Bounded_Long_Seq;
-
- this->inout_->length (0);
- this->out_->length (0);
- this->ret_->length (0);
-
- return 0;
-}
-
-int
-Test_Bounded_Long_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Bounded_Long_Seq_out out (this->out_.out ());
- this->ret_ = objref->test_bounded_long_sequence (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_Long_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_Long_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (this->in_[i] != this->inout_[i] ||
- this->in_[i] != this->out_[i] ||
- this->in_[i] != this->ret_[i])
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Bounded_Long_Sequence::check_validity (CORBA::Request_ptr req)
-{
- ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-void
-Test_Bounded_Long_Sequence::print_values (void)
-{
- CORBA::ULong i;
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->in_.ptr () && (i < this->in_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->in_[i]));
- }
- if (!this->in_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->inout_.ptr () && (i < this->inout_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->inout_[i]));
- }
- if (!this->inout_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->out_.ptr () && (i < this->out_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->out_[i]));
- }
- if (!this->out_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->ret_.ptr () && (i < this->ret_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->ret_[i]));
- }
- if (!this->ret_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-}
diff --git a/TAO/tests/Param_Test/bd_long_seq.h b/TAO/tests/Param_Test/bd_long_seq.h
deleted file mode 100644
index 52e9fbdeb02..00000000000
--- a/TAO/tests/Param_Test/bd_long_seq.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_long_seq.h
-//
-// = DESCRIPTION
-// Tests bounded long sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_LONG_SEQUENCE_H
-#define PARAM_TEST_BOUNDED_LONG_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test bounded sequences of longs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Bounded_Long_Sequence
-{
-public:
- Test_Bounded_Long_Sequence (void);
- // ctor
-
- ~Test_Bounded_Long_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Bounded_Long_Seq_var in_;
- // in parameter
-
- Param_Test::Bounded_Long_Seq_var inout_;
- // inout parameter
-
- Param_Test::Bounded_Long_Seq_var out_;
- // out parameter
-
- Param_Test::Bounded_Long_Seq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_LONG_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/bd_short_seq.cpp b/TAO/tests/Param_Test/bd_short_seq.cpp
deleted file mode 100644
index 0faa3656552..00000000000
--- a/TAO/tests/Param_Test/bd_short_seq.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_short_seq.cpp
-//
-// = DESCRIPTION
-// tests bounded short sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_short_seq.h"
-
-ACE_RCSID (Param_Test,
- bd_short_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Bounded_Short_Sequence
-// ************************************************************************
-
-Test_Bounded_Short_Sequence::Test_Bounded_Short_Sequence (void)
- : opname_ (CORBA::string_dup ("test_bounded_short_sequence")),
- in_ (new Param_Test::Bounded_Short_Seq),
- inout_ (new Param_Test::Bounded_Short_Seq),
- out_ (new Param_Test::Bounded_Short_Seq),
- ret_ (new Param_Test::Bounded_Short_Seq)
-{
-}
-
-Test_Bounded_Short_Sequence::~Test_Bounded_Short_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Bounded_Short_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_Short_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
- req->set_return_type (Param_Test::_tc_Bounded_Short_Seq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Bounded_Short_Seq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Bounded_Short_Seq (*tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = new Param_Test::Bounded_Short_Seq (*tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = new Param_Test::Bounded_Short_Seq (*tmp);
-}
-
-int
-Test_Bounded_Short_Sequence::init_parameters (Param_Test_ptr /*objref*/
- ACE_ENV_ARG_DECL_NOT_USED /*env*/)
-{
- // ACE_UNUSED_ARG (objref);
-
- // get some sequence length (32 in this case)
- CORBA::ULong len = this->in_->maximum ();
-
- // set the length of the sequence
- this->in_->length (len);
- this->inout_->length (len);
- // now set each individual element
- for (CORBA::ULong i = 0; i < len; ++i)
- {
- // generate some arbitrary string to be filled into the ith location in
- // the sequence
- this->in_[i] = i;
- this->inout_[i] = i + 1; // different from in_
- }
-
- this->inout_->length (0);
- this->out_->length (0);
- this->ret_->length (0);
-
- return 0;
-}
-
-int
-Test_Bounded_Short_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Bounded_Short_Seq; // delete the previous ones
- this->out_ = new Param_Test::Bounded_Short_Seq;
- this->ret_ = new Param_Test::Bounded_Short_Seq;
-
- this->inout_->length (0);
- this->out_->length (0);
- this->ret_->length (0);
-
- return 0;
-}
-
-int
-Test_Bounded_Short_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Bounded_Short_Seq_out out (this->out_.out ());
-
- this->ret_ = objref->test_bounded_short_sequence (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_Short_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_Short_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (this->in_[i] != this->inout_[i] ||
- this->in_[i] != this->out_[i] ||
- this->in_[i] != this->ret_[i])
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Bounded_Short_Sequence::check_validity (CORBA::Request_ptr /*req*/)
-{
- return this->check_validity ();
-}
-
-void
-Test_Bounded_Short_Sequence::print_values (void)
-{
- CORBA::ULong i;
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-
- for (i = 0; this->in_.ptr () && (i < this->in_->length ()); ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->in_[i]));
- }
-
- if (!this->in_.ptr ())
- {
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-
- for (i = 0; this->inout_.ptr () && (i < this->inout_->length ()); ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "inout : %d\n",
- i,
- this->inout_[i]));
- }
-
- if (!this->inout_.ptr ())
- {
- ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-
- for (i = 0; this->out_.ptr () && (i < this->out_->length ()); ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "out : %d\n",
- i,
- this->out_[i]));
- }
-
- if (!this->out_.ptr ())
- {
- ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-
- for (i = 0; this->ret_.ptr () && (i < this->ret_->length ()); ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->ret_[i]));
- }
-
- if (!this->ret_.ptr ())
- {
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-}
diff --git a/TAO/tests/Param_Test/bd_short_seq.h b/TAO/tests/Param_Test/bd_short_seq.h
deleted file mode 100644
index 78f402b4f63..00000000000
--- a/TAO/tests/Param_Test/bd_short_seq.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_short_seq.h
-//
-// = DESCRIPTION
-// Tests bounded short sequence
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_SHORT_SEQUENCE_H
-#define PARAM_TEST_BOUNDED_SHORT_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test bounded sequences of shorts
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Bounded_Short_Sequence
-{
-public:
- Test_Bounded_Short_Sequence (void);
- // ctor
-
- ~Test_Bounded_Short_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Bounded_Short_Seq_var in_;
- // in parameter
-
- Param_Test::Bounded_Short_Seq_var inout_;
- // inout parameter
-
- Param_Test::Bounded_Short_Seq_var out_;
- // out parameter
-
- Param_Test::Bounded_Short_Seq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_SHORT_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/bd_str_seq.cpp b/TAO/tests/Param_Test/bd_str_seq.cpp
deleted file mode 100644
index 5d542556fa8..00000000000
--- a/TAO/tests/Param_Test/bd_str_seq.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_str_seq.cpp
-//
-// = DESCRIPTION
-// tests bounded string sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_str_seq.h"
-
-ACE_RCSID (Param_Test,
- bd_str_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Bounded_String_Sequence
-// ************************************************************************
-
-Test_Bounded_String_Sequence::Test_Bounded_String_Sequence (void)
- : opname_ (CORBA::string_dup ("test_bounded_strseq")),
- in_ (new Param_Test::Bounded_StrSeq),
- inout_ (new Param_Test::Bounded_StrSeq),
- out_ (new Param_Test::Bounded_StrSeq),
- ret_ (new Param_Test::Bounded_StrSeq)
-{
-}
-
-Test_Bounded_String_Sequence::~Test_Bounded_String_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Bounded_String_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_String_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Bounded_StrSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const Param_Test::Bounded_StrSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Bounded_StrSeq (*tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = new Param_Test::Bounded_StrSeq (*tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = new Param_Test::Bounded_StrSeq (*tmp);
-}
-
-int
-Test_Bounded_String_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- const char *choiceList[] =
- {
- "one",
- "two",
- "three"
- };
-
- CORBA::ULong len = this->in_->maximum ();
-
- // set the length of the sequence
- this->in_->length (len);
- this->inout_->length (len);
- // now set each individual element
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
- {
- this->in_[i] = choiceList[i%3];
- this->inout_[i] = choiceList[(i+1)%3]; // different from in_
- }
- return 0;
-}
-
-int
-Test_Bounded_String_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Bounded_StrSeq; // delete the previous ones
- this->out_ = new Param_Test::Bounded_StrSeq;
- this->ret_ = new Param_Test::Bounded_StrSeq;
- return 0;
-}
-
-int
-Test_Bounded_String_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Bounded_StrSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_bounded_strseq (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_String_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_String_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (ACE_OS::strcmp(this->in_[i], this->inout_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->out_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->ret_[i]))
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Bounded_String_Sequence::check_validity (CORBA::Request_ptr /*req*/)
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-void
-Test_Bounded_String_Sequence::print_values (void)
-{
- CORBA::ULong i;
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->in_.ptr () && (i < this->in_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- this->in_[i]? (const char *)this->in_[i]:"<nul>"));
- }
- if (!this->in_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->inout_.ptr () && (i < this->inout_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->inout_[i]? (const char *)this->inout_[i]:"<nul>")));
- }
- if (!this->inout_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->out_.ptr () && (i < this->out_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->out_[i]? (const char *)this->out_[i]:"<nul>")));
- }
- if (!this->out_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->ret_.ptr () && (i < this->ret_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->ret_[i]? (const char *)this->ret_[i]:"<nul>")));
- }
- if (!this->ret_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-}
diff --git a/TAO/tests/Param_Test/bd_str_seq.h b/TAO/tests/Param_Test/bd_str_seq.h
deleted file mode 100644
index 31936d01fec..00000000000
--- a/TAO/tests/Param_Test/bd_str_seq.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_str_seq.h
-//
-// = DESCRIPTION
-// Tests bounded sequences of strings
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_STRING_SEQUENCE_H
-#define PARAM_TEST_BOUNDED_STRING_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test typedefed sequences (in our case, sequences of strings)
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Bounded_String_Sequence
-{
-public:
- Test_Bounded_String_Sequence (void);
- // ctor
-
- ~Test_Bounded_String_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Bounded_StrSeq_var in_;
- // in parameter
-
- Param_Test::Bounded_StrSeq_var inout_;
- // inout parameter
-
- Param_Test::Bounded_StrSeq_var out_;
- // out parameter
-
- Param_Test::Bounded_StrSeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_STRING_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/bd_string.cpp b/TAO/tests/Param_Test/bd_string.cpp
deleted file mode 100644
index 149ac604a6a..00000000000
--- a/TAO/tests/Param_Test/bd_string.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_string.cpp
-//
-// = DESCRIPTION
-// tests bounded strings
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_string.h"
-
-ACE_RCSID (Param_Test,
- bd_string,
- "$Id$")
-
-// ************************************************************************
-// Test_Bounded_String
-// ************************************************************************
-
-Test_Bounded_String::Test_Bounded_String (void)
- : opname_ (CORBA::string_dup ("test_bounded_string")),
- in_ (0),
- inout_ (0),
- out_ (0),
- ret_ (0)
-{
-}
-
-Test_Bounded_String::~Test_Bounded_String (void)
-{
- CORBA::string_free (this->opname_);
- CORBA::string_free (this->in_);
- CORBA::string_free (this->inout_);
- CORBA::string_free (this->out_);
- CORBA::string_free (this->ret_);
- this->opname_ = 0;
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-}
-
-const char *
-Test_Bounded_String::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_String::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= CORBA::Any::from_string (this->in_, 128);
- req->add_inout_arg ("s2") <<= CORBA::Any::from_string (this->inout_, 128);
- req->add_out_arg ("s3") <<= CORBA::Any::from_string (this->out_, 128);
-
- // The Any arg manages its memory but this class member does not.
- CORBA::string_free (this->inout_);
-
- req->set_return_type (Param_Test::_tc_short_string);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- char *tmp;
- req->return_value () >>= CORBA::Any::to_string (tmp, 128);
- this->ret_ = CORBA::string_dup (tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= CORBA::Any::to_string (tmp, 128);
- this->inout_ = CORBA::string_dup (tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= CORBA::Any::to_string (tmp, 128);
- this->out_ = CORBA::string_dup (tmp);
-}
-
-int
-Test_Bounded_String::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // release any previously occupied values
- CORBA::string_free (this->in_);
- CORBA::string_free (this->inout_);
- CORBA::string_free (this->out_);
- CORBA::string_free (this->ret_);
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->in_ = gen->gen_string (32);
- this->inout_ = CORBA::string_dup (this->in_);
- return 0;
-}
-
-int
-Test_Bounded_String::reset_parameters (void)
-{
- // release any previously occupied values
- CORBA::string_free (this->inout_);
- CORBA::string_free (this->out_);
- CORBA::string_free (this->ret_);
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->inout_ = CORBA::string_dup (this->in_);
- return 0;
-}
-
-int
-Test_Bounded_String::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::String_out str_out (this->out_);
-
- this->ret_ = objref->test_bounded_string (this->in_,
- this->inout_,
- str_out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_String::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_String::check_validity (void)
-{
- CORBA::ULong len = ACE_OS::strlen (this->in_);
-
- if (!ACE_OS::strcmp (this->in_, this->out_) &&
- !ACE_OS::strcmp (this->in_, this->ret_) &&
- ACE_OS::strlen (this->inout_) == 2*len &&
- !ACE_OS::strncmp (this->in_, this->inout_, len) &&
- !ACE_OS::strncmp (this->in_, &this->inout_[len], len))
- return 1;
-
- return 0; // otherwise
-}
-
-CORBA::Boolean
-Test_Bounded_String::check_validity (CORBA::Request_ptr)
-{
- // No need to retrieve anything because, for all the args and
- // the return, we provided the memory and we own it.
- return this->check_validity ();
-}
-
-void
-Test_Bounded_String::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*\n"
- "in with len (%d) = %s\n"
- "inout with len (%d) = %s\n"
- "out with len (%d) = %s\n"
- "ret with len (%d) = %s\n"
- "\n=*=*=*=*=*=*\n",
- (this->in_ ? ACE_OS::strlen (this->in_):0),
- (this->in_ ? this->in_:"<nul string>"),
- (this->inout_ ? ACE_OS::strlen (this->inout_):0),
- (this->inout_ ? this->inout_:"<nul string>"),
- (this->out_ ? ACE_OS::strlen (this->out_):0),
- (this->out_ ? this->out_:"<nul string>"),
- (this->ret_ ? ACE_OS::strlen (this->ret_):0),
- (this->ret_ ? this->ret_:"<nul string>")));
-}
diff --git a/TAO/tests/Param_Test/bd_string.h b/TAO/tests/Param_Test/bd_string.h
deleted file mode 100644
index f8024a686ff..00000000000
--- a/TAO/tests/Param_Test/bd_string.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_string.h
-//
-// = DESCRIPTION
-// Tests bounded string
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_STRING_H
-#define PARAM_TEST_BOUNDED_STRING_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// tests bounded strings
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Bounded_String
-{
-public:
- Test_Bounded_String (void);
- // ctor
-
- ~Test_Bounded_String (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- char *in_;
- // in parameter
-
- char *inout_;
- // inout parameter
-
- char *out_;
- // out parameter
-
- char *ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_STRING_H */
diff --git a/TAO/tests/Param_Test/bd_struct_seq.cpp b/TAO/tests/Param_Test/bd_struct_seq.cpp
deleted file mode 100644
index 1c2593b9f40..00000000000
--- a/TAO/tests/Param_Test/bd_struct_seq.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_struct_seq.cpp
-//
-// = DESCRIPTION
-// tests bounded struct sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_struct_seq.h"
-
-ACE_RCSID (Param_Test,
- bd_struct_seq,
- "$Id$")
-
-const CORBA::ULong MAX_STRUCTSEQ_LEN = 1;
-
-// ************************************************************************
-// Test_Bounded_Struct_Sequence
-// ************************************************************************
-
-Test_Bounded_Struct_Sequence::Test_Bounded_Struct_Sequence (void)
- : opname_ (CORBA::string_dup ("test_bounded_struct_sequence")),
- inout_ (new Param_Test::Bounded_StructSeq),
- out_ (new Param_Test::Bounded_StructSeq),
- ret_ (new Param_Test::Bounded_StructSeq)
-{
-}
-
-Test_Bounded_Struct_Sequence::~Test_Bounded_Struct_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Bounded_Struct_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_Struct_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
- req->set_return_type (Param_Test::_tc_Bounded_StructSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Bounded_StructSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Bounded_StructSeq (*tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = new Param_Test::Bounded_StructSeq (*tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = new Param_Test::Bounded_StructSeq (*tmp);
-}
-
-int
-Test_Bounded_Struct_Sequence::init_parameters (Param_Test_ptr /* objref */
- ACE_ENV_ARG_DECL_NOT_USED /* env */)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // set the length of the sequence
- this->in_.length (MAX_STRUCTSEQ_LEN);
- // now set each individual element
- for (CORBA::ULong i = 0; i < this->in_.length (); i++)
- {
- // generate some arbitrary struct to be filled into the ith location in
- // the sequence
- this->in_[i] = gen->gen_fixed_struct ();
- }
-
- this->inout_->length (0);
- this->out_->length (0);
- this->ret_->length (0);
-
- return 0;
-}
-
-int
-Test_Bounded_Struct_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Bounded_StructSeq; // delete the previous ones
- this->out_ = new Param_Test::Bounded_StructSeq;
- this->ret_ = new Param_Test::Bounded_StructSeq;
-
- this->inout_->length (0);
- this->out_->length (0);
- this->ret_->length (0);
-
- return 0;
-}
-
-int
-Test_Bounded_Struct_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Bounded_StructSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_bounded_struct_sequence (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_Struct_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_Struct_Sequence::check_validity (void)
-{
- if (this->compare (this->in_, this->inout_.in ()) &&
- this->compare (this->in_, this->out_.in ()) &&
- this->compare (this->in_, this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Bounded_Struct_Sequence::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_Bounded_Struct_Sequence::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "IN sequence\n"));
- this->print_sequence (this->in_);
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "INOUT sequence\n"));
- this->print_sequence (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "OUT sequence\n"));
- this->print_sequence (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "RET sequence\n"));
- this->print_sequence (this->ret_.in ());
-}
-
-CORBA::Boolean
-Test_Bounded_Struct_Sequence::compare (const Param_Test::Bounded_StructSeq &s1,
- const Param_Test::Bounded_StructSeq &s2)
-{
- if (s1.maximum () != s2.maximum ())
- return 0;
- if (s1.length () != s2.length ())
- return 0;
-
- for (CORBA::ULong i=0; i < s1.length (); i++)
- {
- const Param_Test::Fixed_Struct& vs1 = s1[i];
- const Param_Test::Fixed_Struct& vs2 = s2[i];
-
- if (vs1.l != vs2.l
- || vs1.c != vs2.c
- || vs1.s != vs2.s
- || vs1.o != vs2.o
- || vs1.f != vs2.f
- || vs1.b != vs2.b
- || vs1.d != vs2.d )
- return 0;
- }
-
- return 1; // success
-}
-
-void
-Test_Bounded_Struct_Sequence::print_sequence (const Param_Test::Bounded_StructSeq &s)
-{
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s.maximum (),
- s.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
- for (CORBA::ULong i=0; i < s.length (); i++)
- {
- const Param_Test::Fixed_Struct& vs = s[i];
-
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "\tl = %d\n"
- "\tc = %c\n"
- "\ts = %d\n"
- "\to = %x\n"
- "\tf = %f\n"
- "\tb = %d\n"
- "\td = %f\n",
- i,
- vs.l, vs.c, vs.s, vs.o, vs.f, vs.b, vs.d));
- }
-}
diff --git a/TAO/tests/Param_Test/bd_struct_seq.h b/TAO/tests/Param_Test/bd_struct_seq.h
deleted file mode 100644
index e59ef86b43e..00000000000
--- a/TAO/tests/Param_Test/bd_struct_seq.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_struct_seq.h
-//
-// = DESCRIPTION
-// Tests bounded struct sequence
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_STRUCT_SEQUENCE_H
-#define PARAM_TEST_BOUNDED_STRUCT_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test bounded sequence of structs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Bounded_Struct_Sequence
-{
-public:
- Test_Bounded_Struct_Sequence (void);
- // ctor
-
- ~Test_Bounded_Struct_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-protected:
- CORBA::Boolean compare (const Param_Test::Bounded_StructSeq &s1,
- const Param_Test::Bounded_StructSeq &s2);
- // compare
-
- void print_sequence (const Param_Test::Bounded_StructSeq &s);
- // print individual sequence
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Bounded_StructSeq in_;
- // in parameter
-
- // these need memory management
- Param_Test::Bounded_StructSeq_var inout_;
- // inout parameter
-
- Param_Test::Bounded_StructSeq_var out_;
- // out parameter
-
- Param_Test::Bounded_StructSeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_STRUCT_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/bd_wstr_seq.cpp b/TAO/tests/Param_Test/bd_wstr_seq.cpp
deleted file mode 100644
index 16d32473b03..00000000000
--- a/TAO/tests/Param_Test/bd_wstr_seq.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_wstr_seq.cpp
-//
-// = DESCRIPTION
-// tests bounded wide string sequences
-//
-// = AUTHORS
-// Jeff Parsons
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_wstr_seq.h"
-#include "ace/OS_NS_wchar.h"
-
-ACE_RCSID (Param_Test,
- bd_wstr_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Bounded_WString_Sequence
-// ************************************************************************
-
-Test_Bounded_WString_Sequence::Test_Bounded_WString_Sequence (void)
- : opname_ (CORBA::string_dup ("test_bounded_wstrseq")),
- in_ (new Param_Test::Bounded_WStrSeq),
- inout_ (new Param_Test::Bounded_WStrSeq),
- out_ (new Param_Test::Bounded_WStrSeq),
- ret_ (new Param_Test::Bounded_WStrSeq)
-{
-}
-
-Test_Bounded_WString_Sequence::~Test_Bounded_WString_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Bounded_WString_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_WString_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Bounded_WStrSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const Param_Test::Bounded_WStrSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Bounded_WStrSeq (*tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = new Param_Test::Bounded_WStrSeq (*tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = new Param_Test::Bounded_WStrSeq (*tmp);
-}
-
-int
-Test_Bounded_WString_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- CORBA::ULong len = this->in_->maximum ();
-
- // set the length of the sequence
- this->in_->length (len);
- this->inout_->length (len);
-
- // now set each individual element
- for (CORBA::ULong i = 0; i < this->in_->length (); i++)
- {
- this->in_[i] = gen->gen_wstring ();
-
- // different from in_
- this->inout_[i] = gen->gen_wstring ();
- }
-
- return 0;
-}
-
-int
-Test_Bounded_WString_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Bounded_WStrSeq; // delete the previous ones
- this->out_ = new Param_Test::Bounded_WStrSeq;
- this->ret_ = new Param_Test::Bounded_WStrSeq;
- return 0;
-}
-
-int
-Test_Bounded_WString_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Bounded_WStrSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_bounded_wstrseq (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_WString_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_WString_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (ACE_OS::wscmp (this->in_[i], this->inout_[i]) ||
- ACE_OS::wscmp (this->in_[i], this->out_[i]) ||
- ACE_OS::wscmp (this->in_[i], this->ret_[i]))
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Bounded_WString_Sequence::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_Bounded_WString_Sequence::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/bd_wstr_seq.h b/TAO/tests/Param_Test/bd_wstr_seq.h
deleted file mode 100644
index b1057f513f6..00000000000
--- a/TAO/tests/Param_Test/bd_wstr_seq.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_wstr_seq.h
-//
-// = DESCRIPTION
-// Tests bounded sequences of wide strings
-//
-// = AUTHORS
-// Jeff Parsons
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_WSTRING_SEQUENCE_H
-#define PARAM_TEST_BOUNDED_WSTRING_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test typedefed sequences (in our case, sequences of wstrings)
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Bounded_WString_Sequence
-{
-public:
- Test_Bounded_WString_Sequence (void);
- // ctor
-
- ~Test_Bounded_WString_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Bounded_WStrSeq_var in_;
- // in parameter
-
- Param_Test::Bounded_WStrSeq_var inout_;
- // inout parameter
-
- Param_Test::Bounded_WStrSeq_var out_;
- // out parameter
-
- Param_Test::Bounded_WStrSeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_WSTRING_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/bd_wstring.cpp b/TAO/tests/Param_Test/bd_wstring.cpp
deleted file mode 100644
index 30689ff028c..00000000000
--- a/TAO/tests/Param_Test/bd_wstring.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_wstring.cpp
-//
-// = DESCRIPTION
-// tests bounded wide strings
-//
-// = AUTHORS
-// Jeff Parsons
-//
-// ============================================================================
-
-#include "helper.h"
-#include "bd_wstring.h"
-#include "ace/OS_NS_wchar.h"
-
-ACE_RCSID (Param_Test,
- bd_wstring,
- "$Id$")
-
-// ************************************************************************
-// Test_Bounded_WString
-// ************************************************************************
-
-Test_Bounded_WString::Test_Bounded_WString (void)
- : opname_ (CORBA::string_dup ("test_bounded_wstring")),
- in_ (0),
- inout_ (0),
- out_ (0),
- ret_ (0)
-{
-}
-
-Test_Bounded_WString::~Test_Bounded_WString (void)
-{
- CORBA::string_free (this->opname_);
- CORBA::wstring_free (this->in_);
- CORBA::wstring_free (this->inout_);
- CORBA::wstring_free (this->out_);
- CORBA::wstring_free (this->ret_);
- this->opname_ = 0;
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-}
-
-const char *
-Test_Bounded_WString::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Bounded_WString::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= CORBA::Any::from_wstring (this->in_, 128);
- req->add_inout_arg ("s2") <<= CORBA::Any::from_wstring (this->inout_, 128);
- req->add_out_arg ("s3") <<= CORBA::Any::from_wstring (this->out_, 128);
-
- // The Any arg manages its memory but this class member does not.
- CORBA::wstring_free (this->inout_);
-
- req->set_return_type (Param_Test::_tc_short_wstring);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::WChar *tmp;
- req->return_value () >>= CORBA::Any::to_wstring (tmp, 128);
- this->ret_ = CORBA::wstring_dup (tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= CORBA::Any::to_wstring (tmp, 128);
- this->inout_ = CORBA::wstring_dup (tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= CORBA::Any::to_wstring (tmp, 128);
- this->out_ = CORBA::wstring_dup (tmp);
-}
-
-int
-Test_Bounded_WString::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // release any previously occupied values
- CORBA::wstring_free (this->in_);
- CORBA::wstring_free (this->inout_);
- CORBA::wstring_free (this->out_);
- CORBA::wstring_free (this->ret_);
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->in_ = gen->gen_wstring (32);
- this->inout_ = CORBA::wstring_dup (this->in_);
- return 0;
-}
-
-int
-Test_Bounded_WString::reset_parameters (void)
-{
- // release any previously occupied values
- CORBA::wstring_free (this->inout_);
- CORBA::wstring_free (this->out_);
- CORBA::wstring_free (this->ret_);
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->inout_ = CORBA::wstring_dup (this->in_);
- return 0;
-}
-
-int
-Test_Bounded_WString::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::WString_out str_out (this->out_);
-
- this->ret_ = objref->test_bounded_wstring (this->in_,
- this->inout_,
- str_out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_WString::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Bounded_WString::check_validity (void)
-{
- CORBA::ULong len = ACE_OS::wslen (this->in_);
-
- if (!ACE_OS::wscmp (this->in_, this->out_) &&
- !ACE_OS::wscmp (this->in_, this->ret_) &&
- ACE_OS::wslen (this->inout_) == 2*len &&
- !ACE_OS::wsncmp (this->in_, this->inout_, len) &&
- !ACE_OS::wsncmp (this->in_, &this->inout_[len], len))
- return 1;
-
- return 0; // otherwise
-}
-
-CORBA::Boolean
-Test_Bounded_WString::check_validity (CORBA::Request_ptr)
-{
- // No need to retrieve anything because, for all the args and
- // the return, we provided the memory and we own it.
- return this->check_validity ();
-}
-
-void
-Test_Bounded_WString::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/bd_wstring.h b/TAO/tests/Param_Test/bd_wstring.h
deleted file mode 100644
index ec0fb098b2e..00000000000
--- a/TAO/tests/Param_Test/bd_wstring.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// bd_wstring.h
-//
-// = DESCRIPTION
-// Tests bounded wide string
-//
-// = AUTHORS
-// Jeff Parsons
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BOUNDED_WSTRING_H
-#define PARAM_TEST_BOUNDED_WSTRING_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// tests bounded wide strings
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Bounded_WString
-{
-public:
- Test_Bounded_WString (void);
- // ctor
-
- ~Test_Bounded_WString (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::WChar *in_;
- // in parameter
-
- CORBA::WChar *inout_;
- // inout parameter
-
- CORBA::WChar *out_;
- // out parameter
-
- CORBA::WChar *ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BOUNDED_WSTRING_H */
diff --git a/TAO/tests/Param_Test/big_union.cpp b/TAO/tests/Param_Test/big_union.cpp
deleted file mode 100644
index ee1737e545f..00000000000
--- a/TAO/tests/Param_Test/big_union.cpp
+++ /dev/null
@@ -1,553 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// big_union.cpp
-//
-// = DESCRIPTION
-// tests Big_Unions
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "big_union.h"
-
-ACE_RCSID (Param_Test,
- big_union,
- "$Id$")
-
-// ************************************************************************
-// Test_Big_Union
-// ************************************************************************
-
-size_t Test_Big_Union::counter = 0;
-
-Test_Big_Union::Test_Big_Union (void)
- : opname_ (CORBA::string_dup ("test_big_union"))
-{
-}
-
-Test_Big_Union::~Test_Big_Union (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Big_Union::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Big_Union::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Big_Union);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Big_Union *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Big_Union (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = *tmp;
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::Big_Union (*tmp);
-}
-
-int
-Test_Big_Union::init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- // get access to a Coffee Object
- this->cobj_ = objref->make_coffee (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->reset_parameters ();
- return 0;
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex,"System Exception doing make_coffee");
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "An exception caught in make_coffee");
- }
- ACE_ENDTRY;
- return -1;
-}
-
-int
-Test_Big_Union::reset_parameters (void)
-{
- Generator *gen = GENERATOR::instance (); // value generator
- CORBA::ULong index = (counter++ % Test_Big_Union::BIG_UNION_N_BRANCHES);
-
- switch (index)
- {
- case 0:
- {
- Param_Test::Fixed_Array x;
- for (CORBA::ULong i = 0; i < Param_Test::DIM1; ++i)
- {
- x[i] = gen->gen_long ();
- }
- this->in_.the_array (x);
- this->inout_.the_array (x);
- }
- break;
- case 1:
- {
- this->in_.the_interface (this->cobj_.in ());
- this->inout_.the_interface (this->cobj_.in ());
- }
- break;
- case 2:
- {
- CORBA::Long x = gen->gen_long ();
- this->in_.the_long (x);
- this->inout_.the_long (x);
- }
- break;
- case 3:
- {
- Param_Test::Big_Union::_another_array x;
- for (int i = 0; i < 32; ++i)
- {
- x[i] = gen->gen_short ();
- }
- this->in_.another_array (x);
- this->inout_.another_array (x);
- }
- break;
- case 4:
- {
- CORBA::String_var str = gen->gen_string ();
- this->in_.the_string (str);
- this->inout_.the_string (str);
- }
- break;
- case 5:
- {
- CORBA::ShortSeq seq;
- seq.length (gen->gen_short () % 50);
- for (size_t i = 0; i < seq.length (); i++)
- seq[i] = gen->gen_short ();
- this->in_.the_sequence (seq);
- this->inout_.the_sequence (seq);
- }
- break;
- case 6:
- {
- CORBA::Any any;
- any <<= CORBA::Short (25);
- this->in_.the_any (any);
- this->inout_.the_any (any);
- }
- break;
- case 7:
- {
- CORBA::Octet octet = gen->gen_short () % 255;
- this->in_.the_octet (octet);
- this->inout_.the_octet (octet);
- }
- break;
- case 8:
- {
- CORBA::Char x = '@';
- this->in_.the_char (x);
- this->inout_.the_char (x);
- }
- break;
- case 9:
- {
- CORBA::Boolean x = gen->gen_short () % 2;
- this->in_.the_boolean (x);
- this->inout_.the_boolean (x);
- }
- break;
- case 10:
- {
- Param_Test::Var_Struct var_struct;
- var_struct.dbl = 3.14159;
- var_struct.boole = gen->gen_short () % 2;
- var_struct.shrt = gen->gen_short ();
- // set the length of the sequence
- var_struct.dummy1 = gen->gen_string ();
- var_struct.dummy2 = gen->gen_string ();
- CORBA::ULong len = gen->gen_long () % 10 + 1;
- var_struct.seq.length (len);
- for (CORBA::ULong i = 0; i != len; ++i)
- {
- var_struct.seq[i] = gen->gen_string ();
- }
- this->in_.the_var_struct (var_struct);
- this->inout_.the_var_struct (var_struct);
- }
- break;
- case 11:
- {
- Param_Test::Fixed_Struct fixed_struct;
- fixed_struct.l = gen->gen_long ();
- fixed_struct.c = gen->gen_long () % 255;
- fixed_struct.s = gen->gen_long () % 32768;
- fixed_struct.o = gen->gen_long () % 255;
- fixed_struct.f = gen->gen_short () / 255.0f;
- fixed_struct.b = gen->gen_long () % 2;
- fixed_struct.d = gen->gen_short () / 255.0;
- this->in_.the_fixed_struct (fixed_struct);
- this->inout_.the_fixed_struct (fixed_struct);
- }
- break;
- }
- this->out_ = new Param_Test::Big_Union (this->in_);
- this->ret_ = new Param_Test::Big_Union (this->in_);
- return 0;
-}
-
-int
-Test_Big_Union::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_big_union (this->in_,
- this->inout_,
- this->out_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Big_Union::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Big_Union::check_validity (void)
-{
- if (this->in_._d () != this->inout_._d ()
- || this->in_._d () != this->out_->_d ()
- || this->in_._d () != this->ret_->_d ())
- {
- ACE_DEBUG ((LM_DEBUG, "mismatch of discriminators\n"));
- return 0;
- }
-
-
- switch (this->in_._d ())
- {
- case 0:
- {
- Param_Test::Fixed_Array_slice* in_array = this->in_.the_array ();
- Param_Test::Fixed_Array_slice* inout_array = this->inout_.the_array ();
- Param_Test::Fixed_Array_slice* out_array = this->out_->the_array ();
- Param_Test::Fixed_Array_slice* ret_array = this->ret_->the_array ();
- for (CORBA::ULong i = 0; i < Param_Test::DIM1; ++i)
- {
- if (in_array[i] != inout_array[i]
- || in_array[i] != out_array[i]
- || in_array[i] != ret_array[i])
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of arrays\n"));
- return 0;
- }
- }
- }
- break;
- case 1:
- {
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- Coffee_ptr in = this->in_.the_interface ();
- Coffee_ptr inout = this->inout_.the_interface ();
- Coffee_ptr out = this->out_->the_interface ();
- Coffee_ptr ret = this->ret_->the_interface ();
-
- if (CORBA::is_nil (in)
- || CORBA::is_nil (inout)
- || CORBA::is_nil (out)
- || CORBA::is_nil (ret))
- return 0;
-
- Coffee::Desc_var in_desc =
- in->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Coffee::Desc_var inout_desc =
- inout->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Coffee::Desc_var out_desc =
- out->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Coffee::Desc_var ret_desc =
- ret->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (in_desc->name.in (),
- inout_desc->name.in ())
- || ACE_OS::strcmp (in_desc->name.in (),
- out_desc->name.in ())
- || ACE_OS::strcmp (in_desc->name.in (),
- ret_desc->name.in ()))
- return 0;
- }
- ACE_CATCHANY
- {
- return 0;
- }
- ACE_ENDTRY;
- }
- break;
- case 2:
- {
- CORBA::Long in = this->in_.the_long ();
- CORBA::Long inout = this->inout_.the_long ();
- CORBA::Long out = this->out_->the_long ();
- CORBA::Long ret = this->ret_->the_long ();
- if (in != out || in != inout || in != ret)
- return 0;
- }
- break;
-
- case 3:
- {
- Param_Test::Big_Union::_another_array_slice* in_array =
- this->in_.another_array ();
- Param_Test::Big_Union::_another_array_slice* inout_array =
- this->inout_.another_array ();
- Param_Test::Big_Union::_another_array_slice* out_array =
- this->out_->another_array ();
- Param_Test::Big_Union::_another_array_slice* ret_array =
- this->ret_->another_array ();
- for (int i = 0; i != 32; ++i)
- {
- if (in_array[i] != inout_array[i]
- || in_array[i] != out_array[i]
- || in_array[i] != ret_array[i])
- return 0;
- }
- }
- break;
-
- case 4:
- {
- const char* in = this->in_.the_string ();
- const char* inout = this->inout_.the_string ();
- const char* out = this->out_->the_string ();
- const char* ret = this->ret_->the_string ();
- if (ACE_OS::strcmp (in,out)
- || ACE_OS::strcmp (in,inout)
- || ACE_OS::strcmp (in,ret))
- return 0;
- }
- break;
-
- case 5:
- {
- const CORBA::ShortSeq& in =
- this->in_.the_sequence ();
- const CORBA::ShortSeq& inout =
- this->inout_.the_sequence ();
- const CORBA::ShortSeq& out =
- this->out_->the_sequence ();
- const CORBA::ShortSeq& ret =
- this->ret_->the_sequence ();
-
- if (in.length () != out.length ()
- || in.length () != inout.length ()
- || in.length () != ret.length ())
- return 0;
-
- for (CORBA::ULong i = 0; i != in.length (); ++i)
- {
- if (in[i] != out[i]
- || in[i] != inout[i]
- || in[i] != ret[i])
- return 0;
- }
- }
- break;
-
- case 6:
- {
- CORBA::Any in = this->in_.the_any ();
- CORBA::Any inout = this->inout_.the_any ();
- CORBA::Any out = this->out_->the_any ();
- CORBA::Any ret = this->ret_->the_any ();
-
- CORBA::Short in_short;
- CORBA::Short inout_short;
- CORBA::Short out_short;
- CORBA::Short ret_short;
- if (!(in >>= in_short)
- || !(inout >>= inout_short)
- || !(out >>= out_short)
- || !(ret >>= ret_short))
- return 0;
-
- if (in_short != inout_short
- || in_short != out_short
- || in_short != ret_short)
- return 0;
- }
- break;
-
- case 7:
- {
- CORBA::Octet in = this->in_.the_octet ();
- CORBA::Octet inout = this->inout_.the_octet ();
- CORBA::Octet out = this->out_->the_octet ();
- CORBA::Octet ret = this->ret_->the_octet ();
- if (in != out || in != inout || in != ret)
- return 0;
- }
- break;
-
- case 8:
- {
- CORBA::Char in = this->in_.the_char ();
- CORBA::Char inout = this->inout_.the_char ();
- CORBA::Char out = this->out_->the_char ();
- CORBA::Char ret = this->ret_->the_char ();
- if (in != out || in != inout || in != ret)
- return 0;
- }
- break;
-
- case 9:
- {
- CORBA::Boolean in = this->in_.the_boolean ();
- CORBA::Boolean inout = this->inout_.the_boolean ();
- CORBA::Boolean out = this->out_->the_boolean ();
- CORBA::Boolean ret = this->ret_->the_boolean ();
- if (in != out || in != inout || in != ret)
- return 0;
- }
- break;
-
- case 10:
- {
- const Param_Test::Var_Struct& in =
- this->in_.the_var_struct ();
- const Param_Test::Var_Struct& inout =
- this->inout_.the_var_struct ();
- const Param_Test::Var_Struct& out =
- this->out_->the_var_struct ();
- const Param_Test::Var_Struct& ret =
- this->ret_->the_var_struct ();
-
- if (!(ACE_OS::strcmp (in.dummy1.in (),
- inout.dummy1.in ()) == 0
- && ACE_OS::strcmp (in.dummy2.in (),
- inout.dummy2.in ()) == 0)
- || !(ACE_OS::strcmp (in.dummy1.in (),
- out.dummy1.in ()) == 0
- && ACE_OS::strcmp (in.dummy2.in (),
- out.dummy2.in ()) == 0)
- || !(ACE_OS::strcmp (in.dummy1.in (),
- ret.dummy1.in ()) == 0
- && ACE_OS::strcmp (in.dummy2.in (),
- ret.dummy2.in ()) == 0))
- return 0;
-
- if (in.seq.length () != inout.seq.length ()
- || in.seq.length () != out.seq.length ()
- || in.seq.length () != ret.seq.length ())
- return 0;
-
- CORBA::ULong len = in.seq.length ();
- for (CORBA::ULong i = 0; i != len; ++i)
- {
- if (ACE_OS::strcmp (in.seq[i],
- inout.seq[i])
- || ACE_OS::strcmp (in.seq[i],
- out.seq[i])
- || ACE_OS::strcmp (in.seq[i],
- ret.seq[i]))
- return 0;
- }
- }
- break;
- case 11:
- {
- const Param_Test::Fixed_Struct& in =
- this->in_.the_fixed_struct ();
- const Param_Test::Fixed_Struct& inout =
- this->inout_.the_fixed_struct ();
- const Param_Test::Fixed_Struct& out =
- this->out_->the_fixed_struct ();
- const Param_Test::Fixed_Struct& ret =
- this->ret_->the_fixed_struct ();
-
- if (! (in.l == inout.l
- && in.c == inout.c
- && in.s == inout.s
- && in.o == inout.o
- && in.f == inout.f
- && in.b == inout.b
- && in.d == inout.d)
- || !(in.l == out.l
- && in.c == out.c
- && in.s == out.s
- && in.o == out.o
- && in.f == out.f
- && in.b == out.b
- && in.d == out.d)
- || !(in.l == ret.l
- && in.c == ret.c
- && in.s == ret.s
- && in.o == ret.o
- && in.f == ret.f
- && in.b == ret.b
- && in.d == ret.d))
- return 0;
- }
- break;
- }
-
- return 1;
-}
-
-CORBA::Boolean
-Test_Big_Union::check_validity (CORBA::Request_ptr /*req*/)
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-void
-Test_Big_Union::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/big_union.h b/TAO/tests/Param_Test/big_union.h
deleted file mode 100644
index f08e0eac9c3..00000000000
--- a/TAO/tests/Param_Test/big_union.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// big_union.h
-//
-// = DESCRIPTION
-// Tests Anys
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_BIG_UNION_H
-#define PARAM_TEST_BIG_UNION_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test Anys
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Big_Union
-{
-public:
- Test_Big_Union (void);
- // ctor
-
- ~Test_Big_Union (void);
- // dtor
-
- enum {
- BIG_UNION_N_BRANCHES = 12
- };
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Coffee_var cobj_;
- // Coffee object used to test Big_Union with object.
-
- static size_t counter;
- // test counter.
-
- Param_Test::Big_Union in_;
- // in parameter
-
- Param_Test::Big_Union inout_;
- // inout parameter
-
- Param_Test::Big_Union_var out_;
- // out parameter
-
- Param_Test::Big_Union_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_BIG_UNION_H */
diff --git a/TAO/tests/Param_Test/client.cpp b/TAO/tests/Param_Test/client.cpp
deleted file mode 100644
index 33f7f961f40..00000000000
--- a/TAO/tests/Param_Test/client.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This file contains the implementation of the client-side of the
-// Param_Test application.
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef CLIENT_CPP
-#define CLIENT_CPP
-
-#include "options.h"
-#include "results.h"
-#include "client.h"
-
-ACE_RCSID (Param_Test,
- client,
- "$Id$")
-
-// Constructor.p
-template <class T>
-Param_Test_Client<T>::Param_Test_Client (CORBA::ORB_ptr orb,
- Param_Test_ptr objref,
- T *t)
- : orb_ (orb),
- param_test_ (objref),
- test_object_ (t)
-{
-}
-
-// destructor
-template <class T>
-Param_Test_Client<T>::~Param_Test_Client (void)
-{
- delete this->test_object_;
-}
-
-// All the individual tests.
-template <class T> int
-Param_Test_Client<T>::run_sii_test (void)
-{
- CORBA::ULong i = 0; // loop index
- Options *opt = OPTIONS::instance (); // get the options
- const char *opname = this->test_object_->opname (); // operation
-
- if (opt->debug ())
- ACE_DEBUG ((LM_DEBUG,
- "********** %s SII *********\n",
- opname));
-
- // Initialize call count and error count.
- this->results_.call_count (0);
- this->results_.error_count (0);
- this->results_.iterations (opt->loop_count ());
-
- // Declare the Env
- ACE_DECLARE_NEW_CORBA_ENV;
- // Initialize parameters for the test.
- int check = this->test_object_->init_parameters (this->param_test_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (check == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) client.cpp - run_sii_test:"
- "init_parameters failed for opname - %s",
- opname),
- -1);
- }
-
-
- // Make the calls in a loop.
- for (i = 0; i < opt->loop_count (); i++)
- {
- ACE_TRY
- {
- this->results_.call_count (this->results_.call_count () + 1);
- if (opt->debug ())
- {
- ACE_DEBUG ((LM_DEBUG, "\n****** Before call values *****\n"));
- this->test_object_->print_values ();
- }
-
- // start the timing
- this->results_.start_timer ();
-
- // make the call
- this->test_object_->run_sii_test (this->param_test_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // stop the timer.
- this->results_.stop_timer ();
-
- // now check if the values returned are as expected
- if (opt->debug ())
- {
- ACE_DEBUG ((LM_DEBUG, "\n****** After call values *****\n"));
- this->test_object_->print_values ();
- }
- }
- ACE_CATCHANY
- {
-
- this->results_.error_count (this->results_.error_count () + 1);
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, opname);
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) client.cpp - run_sii_test:"
- "run_sii_test exception in iteration %d",
- i));
- goto loop_around;
-
- }
- ACE_ENDTRY;
-
- if (!this->test_object_->check_validity ())
- {
- this->results_.error_count (this->results_.error_count () + 1);
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) client.cpp - run_sii_test: "
- "Invalid results in iteration %d\n",
- i));
- continue;
- }
- // reset parameters for the test.
- if (this->test_object_->reset_parameters () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) client.cpp - run_sii_test:"
- "init_parameters failed for opname - %s",
- opname), -1);
- loop_around: continue;
- }
-
- // print statistics
- this->results_.print_stats ();
- if (this->results_.error_count () != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "********** Error running %s SII *********\n",
- opname));
- }
- else if (opt->debug ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "********** Finished running %s SII *********\n",
- opname));
- }
- return this->results_.error_count ()? -1:0;
-}
-
-// use DII
-template <class T> int
-Param_Test_Client<T>::run_dii_test (void)
-{
- const char *opname = this->test_object_->opname ();
- Options *opt = OPTIONS::instance ();
-
- if (opt->debug ())
- ACE_DEBUG ((LM_DEBUG,
- "********** %s DII *********\n",
- opname));
-
- // initialize call count and error count
- this->results_.call_count (0);
- this->results_.error_count (0);
- this->results_.iterations (opt->loop_count ());
-
- // Environment variable
- ACE_DECLARE_NEW_CORBA_ENV;
- // initialize parameters for the test
- int check = this->test_object_->init_parameters (this->param_test_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (check == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) client.cpp - run_dii_test:"
- "init_parameters failed for opname - %s",
- opname),
- -1);
- }
-
- // Make the calls in a loop.
- for (CORBA::ULong i = 0; i < opt->loop_count (); i++)
- {
- this->results_.call_count (this->results_.call_count () + 1);
-
- // start the timing. We measure the entire overhead of DII, including the
- // time required to create and populate the NVList
- this->results_.start_timer ();
-
- // create the request
- CORBA::Request_var req;
-
- ACE_TRY
- {
- req = this->param_test_->_request (opname
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (opt->debug ())
- {
- ACE_DEBUG ((LM_DEBUG, "\n****** Before call values *****\n"));
- this->test_object_->print_values ();
- }
-
- // Make the invocation, verify the result.
- this->test_object_->dii_req_invoke (req.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- this->results_.error_count (this->results_.error_count () + 1);
-
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- opname);
- goto loop_around;
- }
- ACE_ENDTRY;
-
- if (opt->debug ())
- {
- ACE_DEBUG ((LM_DEBUG, "\n****** After call values *****\n"));
- this->test_object_->print_values ();
- }
- // now check if the values returned are as expected
- if (!this->test_object_->check_validity (req.in ()))
- {
- this->results_.error_count (this->results_.error_count () + 1);
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) client.cpp - "
- "Invalid results in run_dii_test in iteration %d\n",
- i));
-
- continue;
- }
-
- // stop the this->results_.
- this->results_.stop_timer ();
-
- // reset parameters for the test
- this->test_object_->reset_parameters ();
-
- loop_around:continue;
- } // for loop
-
- // print statistics
- this->results_.print_stats ();
- if (this->results_.error_count () != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "********** Error running %s DII *********\n",
- opname));
- }
- else if (opt->debug ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "********** Finished running %s DII *********\n",
- opname));
- }
- return this->results_.error_count () ? -1 : 0;
-}
-
-
-#endif /* CLIENT_CPP */
diff --git a/TAO/tests/Param_Test/client.h b/TAO/tests/Param_Test/client.h
deleted file mode 100644
index 937717371c7..00000000000
--- a/TAO/tests/Param_Test/client.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// client.h
-//
-// = DESCRIPTION
-// Header file for the Param_Test client application.
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_CLIENT_H
-#define PARAM_TEST_CLIENT_H
-
-#include "tao/DynamicInterface/Request.h"
-#include "param_testC.h"
-#include "results.h"
-
-template <class T>
-class Param_Test_Client
-{
- // = TITLE
- // Param_Test_Client
- //
- // = DESCRIPTION
- // This class declares an interface to run the example client for
- // Param_Test CORBA server. All the complexity for initializing
- // the client is hidden in the class. Just the run () interface
- // is needed. The template class does the specific work of making
- // the request of the desired data type
-public:
- typedef T TEST_OBJECT;
-
- // = Constructor and destructor.
- Param_Test_Client (CORBA::ORB_ptr orb,
- Param_Test_ptr objref,
- T *);
-
- ~Param_Test_Client (void);
-
- int run_sii_test (void);
- // run the SII test
-
- int run_dii_test (void);
- // run the DII test
-
-private:
- CORBA::ORB_ptr orb_;
- // underlying ORB
-
- Param_Test_ptr param_test_;
- // param test object reference
-
- TEST_OBJECT *test_object_;
- // object doing the actual work
-
- Results results_;
- // results
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "client.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("client.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* CLIENTS_H */
diff --git a/TAO/tests/Param_Test/complex_any.cpp b/TAO/tests/Param_Test/complex_any.cpp
deleted file mode 100644
index 0dd6c1199fe..00000000000
--- a/TAO/tests/Param_Test/complex_any.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// complex_any.cpp
-//
-// = DESCRIPTION
-// tests complex Anys
-//
-// = AUTHORS
-// Aniruddha Gokhale, Jeff Parsons, Frank Buschmann
-//
-// ============================================================================
-
-#include "helper.h"
-#include "complex_any.h"
-#include "tao/debug.h"
-
-ACE_RCSID (Param_Test,
- complex_any,
- "$Id$")
-
-const int LEVEL_2_LENGTH = 5;
-const int LEVEL_3_LENGTH = 3;
-
-// ************************************************************************
-// Test_Complex_Any
-// ************************************************************************
-
-size_t Test_Complex_Any::counter = 0;
-
-Test_Complex_Any::Test_Complex_Any (void)
- : opname_ (CORBA::string_dup ("test_complex_any")),
- out_ (new CORBA::Any),
- ret_ (new CORBA::Any)
-{
-}
-
-Test_Complex_Any::~Test_Complex_Any (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Complex_Any::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Complex_Any::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_any);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const CORBA::Any *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new CORBA::Any (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = CORBA::Any (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new CORBA::Any (*tmp);
-}
-
-int
-Test_Complex_Any::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- return this->reset_parameters ();
-}
-
-// This Any is a real-world use cases
-// submitted by Frank Buschmann of Siemens. Here's the structure:
-//
-// Any <- AnySeq <- AnySeq <- struct <- string
-// <- Any <- Any <- Any <- struct <- string
-// <- boolean
-// <- short
-int
-Test_Complex_Any::reset_parameters (void)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- CORBA::AnySeq level2_seq, level3_seq;
- level2_seq.length (LEVEL_2_LENGTH);
- level3_seq.length (LEVEL_3_LENGTH);
-
- for (int j = 0; j < LEVEL_2_LENGTH; j++)
- {
- for (int i = 0; i < LEVEL_3_LENGTH; i++)
- {
- Param_Test::level4 level4_struct;
-
- char *l5_str = gen->gen_string ();
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting level 5 string = %s\n",
- l5_str));
-
- level4_struct.level5_string = l5_str;
-
- CORBA::Any level6_any, level7_any;
-
- Param_Test::level8 level8_struct;
-
- char *l9_str = gen->gen_string ();
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting level 9 string = %s\n",
- l9_str));
-
- level8_struct.level9_string = l9_str;
-
- CORBA::Short l9_bool = ACE_OS::rand () % 2;
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting level 9 boolean = %d\n",
- l9_bool));
-
- level8_struct.level9_boolean = (CORBA::Boolean) l9_bool;
-
- CORBA::Short l9_short = gen->gen_short ();
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting level 9 short = %d\n",
- l9_short));
-
- level8_struct.level9_short = l9_short;
-
- level7_any <<= level8_struct;
-
- level6_any <<= level7_any;
-
- level4_struct.level5_any <<= level6_any;
-
- level3_seq[i] <<= level4_struct;
- }
-
- level2_seq[j] <<= level3_seq;
- }
-
- this->in_ <<= level2_seq;
-
- return 0;
-}
-
-int
-Test_Complex_Any::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_complex_any (this->in_,
- this->inout_,
- this->out_.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-CORBA::Boolean
-Test_Complex_Any::check_validity (void)
-{
- CORBA::AnySeq *level2_in_seq;
- CORBA::AnySeq *level2_test_seq;
-
- if (!(this->in_ >>= level2_in_seq))
- return 0;
-
- if (!(this->inout_ >>= level2_test_seq))
- return 0;
-
- if (this->comp_engine (level2_in_seq, level2_test_seq) == 0)
- return 0;
-
- if (!(this->out_.in () >>= level2_test_seq))
- return 0;
-
- if (this->comp_engine (level2_in_seq, level2_test_seq) == 0)
- return 0;
-
- if (!(this->ret_.in () >>= level2_test_seq))
- return 0;
-
- if (this->comp_engine (level2_in_seq, level2_test_seq) == 0)
- return 0;
-
- return 1;
-}
-
-// Private helper function for check_validity.
-CORBA::Boolean
-Test_Complex_Any::comp_engine (const CORBA::AnySeq *level2_in_seq,
- const CORBA::AnySeq *level2_comp_seq)
-{
- if (level2_in_seq->length() != level2_comp_seq->length())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of level 2 sequence lengths\n"));
- return 0;
- }
-
- for (CORBA::ULong i = 0; i < level2_in_seq->length (); i++)
- {
- CORBA::AnySeq *level3_in_seq;
- CORBA::AnySeq *level3_test_seq;
-
- if (!((*level2_in_seq)[i] >>= level3_in_seq))
- return 0;
- if (!((*level2_comp_seq)[i] >>= level3_test_seq))
- return 0;
-
- if (level3_in_seq->length() != level3_test_seq->length())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of level 3 sequence lengths\n"));
- return 0;
- }
-
- for (CORBA::ULong j = 0; j < level3_in_seq->length (); j ++)
- {
- Param_Test::level4 *level4_in_struct;
- Param_Test::level4 *level4_test_struct;
-
- if (!((*level3_in_seq)[j] >>= level4_in_struct))
- return 0;
- if (!((*level3_test_seq)[j] >>= level4_test_struct))
- return 0;
-
- if (ACE_OS::strcmp (level4_in_struct->level5_string,
- level4_test_struct->level5_string))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of level 5 string values\n"));
- return 0;
- }
-
- const CORBA::Any *level6_in_any;
- const CORBA::Any *level6_test_any;
- const CORBA::Any *level7_in_any;
- const CORBA::Any *level7_test_any;
-
- if (!(level4_in_struct->level5_any >>= level6_in_any))
- return 0;
- if (!(level4_test_struct->level5_any >>= level6_test_any))
- return 0;
-
- if (!((*level6_in_any) >>= level7_in_any))
- return 0;
- if (!((*level6_test_any) >>= level7_test_any))
- return 0;
-
- Param_Test::level8 *level8_in_struct;
- Param_Test::level8 *level8_test_struct;
-
- if (!((*level7_in_any) >>= level8_in_struct))
- return 0;
- if (!((*level7_test_any) >>= level8_test_struct))
- return 0;
-
- if (ACE_OS::strcmp (level8_in_struct->level9_string,
- level8_test_struct->level9_string))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of level 9 string values\n"));
- return 0;
- }
-
- if (level8_in_struct->level9_boolean != level8_test_struct->level9_boolean)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of level 9 boolean values\n"));
- return 0;
- }
-
- if (level8_in_struct->level9_short != level8_test_struct->level9_short)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of level 9 short values\n"));
- return 0;
- }
- }
- }
-
- // If we get here, all is correct.
- return 1;
-}
-
-CORBA::Boolean
-Test_Complex_Any::check_validity (CORBA::Request_ptr /*req*/)
-{
- return this->check_validity ();
-}
-
-void
-Test_Complex_Any::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/complex_any.h b/TAO/tests/Param_Test/complex_any.h
deleted file mode 100644
index 58763ad6761..00000000000
--- a/TAO/tests/Param_Test/complex_any.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// complex_any.h
-//
-// = DESCRIPTION
-// Tests complex Anys
-//
-// = AUTHORS
-// Aniruddha Gokhale, Jeff Parsons, Frank Buschmann
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_COMPLEX_ANY_H
-#define PARAM_TEST_COMPLEX_ANY_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test complex Anys
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Complex_Any
-{
-public:
- Test_Complex_Any (void);
- // ctor
-
- ~Test_Complex_Any (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- static size_t counter;
- // test counter.
-
- CORBA::Any in_;
- // in parameter
-
- CORBA::Any inout_;
- // inout parameter
-
- CORBA::Any_var out_;
- // out parameter
-
- CORBA::Any_var ret_;
- // return value
-
- CORBA::Boolean comp_engine (const CORBA::AnySeq *in_seq,
- const CORBA::AnySeq *comp_seq);
- // Compares the sequence extracted from in_ to one of the others.
-};
-
-#endif /* PARAM_TEST_COMPLEX_ANY_H */
diff --git a/TAO/tests/Param_Test/driver.cpp b/TAO/tests/Param_Test/driver.cpp
deleted file mode 100644
index 45a45f49b38..00000000000
--- a/TAO/tests/Param_Test/driver.cpp
+++ /dev/null
@@ -1,634 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// driver.cpp
-//
-// = DESCRIPTION
-// Driver program
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "client.h"
-#include "driver.h"
-#include "results.h"
-#include "tests.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (Param_Test,
- driver,
- "$Id$")
-
-// This function runs the test (main program)
-int
-main (int argc, char **argv)
-{
- // get an instance of the driver object
- 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);
-
- // run various tests
- if (drv.run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) driver.cpp - "
- "tests failed\n"),
- -1);
- return 0;
-}
-
-// constructor
-Driver::Driver (void)
-{
-}
-
-Driver::~Driver (void)
-{
-}
-
-// initialize the driver
-int
-Driver::init (int argc, char **argv)
-{
- // environment to track exceptions
- ACE_DECLARE_NEW_CORBA_ENV;
-
- // retrieve the instance of Options
- Options *opt = OPTIONS::instance ();
-
- char exception_string[256];
-
- ACE_TRY
- {
- ACE_OS::strcpy (exception_string, "ORB Initialization");
-
- // Retrieve the underlying ORB
- this->orb_ = CORBA::ORB_init (argc,
- argv,
- "internet"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse command line and verify parameters.
- if (opt->parse_args (argc, argv) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) driver.cpp - "
- "parse_args failed\n"),
- -1);
- // Retrieve a Param_Test object reference
- ACE_OS::strcpy (exception_string,"ORB::string_to_object() failed.");
-
- CORBA::Object_var temp =
- this->orb_->string_to_object (opt->param_test_ior () ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (temp.in()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ORB::string_to_object() returned null object for IOR <%s>\n",
- opt->param_test_ior ()),
- -1);
-
- // Get the object reference
- ACE_OS::strcpy (exception_string,"Param_Test::_narrow () failed.");
-
- this->objref_ = Param_Test::_narrow (temp.in() ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, exception_string);
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-int
-Driver::run (void)
-{
- // serves as a factory of Param_Client objects. It is also responsible to
- // start the test
-
- Options *opt = OPTIONS::instance (); // get the options object
- int retstatus = -1;
-
- switch (opt->test_type ())
- {
- case Options::TEST_SHORT:
- {
- Param_Test_Client<Test_Short> *client = new
- Param_Test_Client<Test_Short> (this->orb_.in (),
- this->objref_.in(),
- new Test_Short);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_ULONGLONG:
- {
- Param_Test_Client<Test_ULongLong> *client = new
- Param_Test_Client<Test_ULongLong> (this->orb_.in (),
- this->objref_.in(),
- new Test_ULongLong);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_STRING:
- {
- Param_Test_Client<Test_Unbounded_String> *client = new
- Param_Test_Client<Test_Unbounded_String> (this->orb_.in (),
- this->objref_.in(),
- new Test_Unbounded_String);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BD_STRING:
- {
- Param_Test_Client<Test_Bounded_String> *client = new
- Param_Test_Client<Test_Bounded_String> (this->orb_.in (),
- this->objref_.in(),
- new Test_Bounded_String);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_WSTRING:
- {
- Param_Test_Client<Test_Unbounded_WString> *client = new
- Param_Test_Client<Test_Unbounded_WString> (this->orb_.in (),
- this->objref_.in(),
- new Test_Unbounded_WString);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BD_WSTRING:
- {
- Param_Test_Client<Test_Bounded_WString> *client = new
- Param_Test_Client<Test_Bounded_WString> (this->orb_.in (),
- this->objref_.in(),
- new Test_Bounded_WString);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_FIXED_STRUCT:
- {
- Param_Test_Client<Test_Fixed_Struct> *client = new
- Param_Test_Client<Test_Fixed_Struct> (this->orb_.in (),
- this->objref_.in(),
- new Test_Fixed_Struct);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_STRING_SEQUENCE:
- {
- Param_Test_Client<Test_String_Sequence> *client = new
- Param_Test_Client<Test_String_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_String_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BD_STRING_SEQUENCE:
- {
- Param_Test_Client<Test_Bounded_String_Sequence> *client = new
- Param_Test_Client<Test_Bounded_String_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_Bounded_String_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_WSTRING_SEQUENCE:
- {
- Param_Test_Client<Test_WString_Sequence> *client = new
- Param_Test_Client<Test_WString_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_WString_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BD_WSTRING_SEQUENCE:
- {
- Param_Test_Client<Test_Bounded_WString_Sequence> *client = new
- Param_Test_Client<Test_Bounded_WString_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_Bounded_WString_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_VAR_STRUCT:
- {
- Param_Test_Client<Test_Var_Struct> *client = new
- Param_Test_Client<Test_Var_Struct> (this->orb_.in (),
- this->objref_.in(),
- new Test_Var_Struct);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_NESTED_STRUCT:
- {
- Param_Test_Client<Test_Nested_Struct> *client = new
- Param_Test_Client<Test_Nested_Struct> (this->orb_.in (),
- this->objref_.in(),
- new Test_Nested_Struct);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_RECURSIVE_STRUCT:
- {
- Param_Test_Client<Test_Recursive_Struct> *client = new
- Param_Test_Client<Test_Recursive_Struct> (this->orb_.in (),
- this->objref_.in(),
- new Test_Recursive_Struct);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_OBJREF_STRUCT:
- {
- Param_Test_Client<Test_Objref_Struct> *client = new
- Param_Test_Client<Test_Objref_Struct> (this->orb_.in (),
- this->objref_.in(),
- new Test_Objref_Struct);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_STRUCT_SEQUENCE:
- {
- Param_Test_Client<Test_Struct_Sequence> *client = new
- Param_Test_Client<Test_Struct_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_Struct_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
-
- Param_Test_Client<Test_Unbounded_Struct_Sequence> *client2 = new
- Param_Test_Client<Test_Unbounded_Struct_Sequence>
- (this->orb_.in (),
- this->objref_.in(),
- new Test_Unbounded_Struct_Sequence);
-
- if (opt->invoke_type () == Options::SII)
- retstatus = client2->run_sii_test ();
- else
- retstatus = client2->run_dii_test ();
- delete client2;
- }
- break;
- case Options::TEST_BD_STRUCT_SEQUENCE:
- {
- Param_Test_Client<Test_Bounded_Struct_Sequence> *client = new
- Param_Test_Client<Test_Bounded_Struct_Sequence> (this->orb_.in (),
- this->objref_.in (),
- new Test_Bounded_Struct_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_ARRAY_SEQUENCE:
- {
- Param_Test_Client<Test_Array_Sequence> *client = new
- Param_Test_Client<Test_Array_Sequence> (this->orb_.in (),
- this->objref_.in (),
- new Test_Array_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BD_ARRAY_SEQUENCE:
- {
- Param_Test_Client<Test_Bounded_Array_Sequence> *client = new
- Param_Test_Client<Test_Bounded_Array_Sequence> (this->orb_.in (),
- this->objref_.in (),
- new Test_Bounded_Array_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_OBJREF:
- {
- Param_Test_Client<Test_ObjRef> *client = new
- Param_Test_Client<Test_ObjRef> (this->orb_.in (),
- this->objref_.in (),
- new Test_ObjRef);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_TYPECODE:
- {
- Param_Test_Client<Test_TypeCode> *client = new
- Param_Test_Client<Test_TypeCode> (this->orb_.in (),
- this->objref_.in(),
- new Test_TypeCode);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_ANY:
- {
- Param_Test_Client<Test_Any> *client = new
- Param_Test_Client<Test_Any> (this->orb_.in (),
- this->objref_.in(),
- new Test_Any);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_OBJREF_SEQUENCE:
- {
- Param_Test_Client<Test_ObjRef_Sequence> *client = new
- Param_Test_Client<Test_ObjRef_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_ObjRef_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_ANYSEQ:
- {
- Param_Test_Client<Test_AnySeq> *client = new
- Param_Test_Client<Test_AnySeq> (this->orb_.in (),
- this->objref_.in(),
- new Test_AnySeq);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_SHORTSEQ:
- {
- Param_Test_Client<Test_Short_Sequence> *client = new
- Param_Test_Client<Test_Short_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_Short_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BD_SHORTSEQ:
- {
- Param_Test_Client<Test_Bounded_Short_Sequence> *client = new
- Param_Test_Client<Test_Bounded_Short_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_Bounded_Short_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_UB_LONGSEQ:
- {
- Param_Test_Client<Test_Long_Sequence> *client = new
- Param_Test_Client<Test_Long_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_Long_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BD_LONGSEQ:
- {
- Param_Test_Client<Test_Bounded_Long_Sequence> *client = new
- Param_Test_Client<Test_Bounded_Long_Sequence> (this->orb_.in (),
- this->objref_.in(),
- new Test_Bounded_Long_Sequence);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_FIXED_ARRAY:
- {
- Param_Test_Client<Test_Fixed_Array> *client = new
- Param_Test_Client<Test_Fixed_Array> (this->orb_.in (),
- this->objref_.in(),
- new Test_Fixed_Array);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_VAR_ARRAY:
- {
- Param_Test_Client<Test_Var_Array> *client = new
- Param_Test_Client<Test_Var_Array> (this->orb_.in (),
- this->objref_.in(),
- new Test_Var_Array);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_EXCEPTION:
- {
- Param_Test_Client<Test_Exception> *client = new
- Param_Test_Client<Test_Exception> (this->orb_.in (),
- this->objref_.in(),
- new Test_Exception);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_BIG_UNION:
- {
- Param_Test_Client<Test_Big_Union> *client = new
- Param_Test_Client<Test_Big_Union> (this->orb_.in (),
- this->objref_.in(),
- new Test_Big_Union);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_SMALL_UNION:
- {
- Param_Test_Client<Test_Small_Union> *client = new
- Param_Test_Client<Test_Small_Union> (this->orb_.in (),
- this->objref_.in(),
- new Test_Small_Union);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_RECURSIVE_UNION:
- {
- Param_Test_Client<Test_Recursive_Union> *client = new
- Param_Test_Client<Test_Recursive_Union> (this->orb_.in (),
- this->objref_.in(),
- new Test_Recursive_Union);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_COMPLEX_ANY:
- {
- Param_Test_Client<Test_Complex_Any> *client = new
- Param_Test_Client<Test_Complex_Any> (this->orb_.in (),
- this->objref_.in(),
- new Test_Complex_Any);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- case Options::TEST_MULTDIM_ARRAY:
- {
- Param_Test_Client<Test_Multdim_Array> *client = new
- Param_Test_Client<Test_Multdim_Array> (this->orb_.in (),
- this->objref_.in(),
- new Test_Multdim_Array);
- if (opt->invoke_type () == Options::SII)
- retstatus = client->run_sii_test ();
- else
- retstatus = client->run_dii_test ();
- delete client;
- }
- break;
- default:
- break;
- }
-
- // Get in a new environment variable
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- if (opt->shutdown ())
- {
- this->objref_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "during shutdown");
- }
- ACE_ENDTRY;
-
- return retstatus;
-}
diff --git a/TAO/tests/Param_Test/driver.h b/TAO/tests/Param_Test/driver.h
deleted file mode 100644
index 820a62c43b3..00000000000
--- a/TAO/tests/Param_Test/driver.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// driver.h
-//
-// = DESCRIPTION
-// Header file for the driver program. The driver is a singleton.
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef DRIVER_H
-#define DRIVER_H
-
-#include "options.h"
-#include "param_testC.h"
-
-class Driver
-{
- // = TITLE
- // Driver
- //
- // = DESCRIPTION
- // Driver program for the client
-public:
- // = Constructor and destructor.
- Driver (void);
- ~Driver (void);
-
- int init (int argc, char **argv);
- // Initialize the driver object
-
- int run (void);
- // Execute client example code.
-
-private:
- CORBA::ORB_var orb_;
- // underlying ORB (we do not own it)
-
- Param_Test_var objref_;
- // object reference (we do not own it)
-};
-
-#endif /* !defined */
diff --git a/TAO/tests/Param_Test/except.cpp b/TAO/tests/Param_Test/except.cpp
deleted file mode 100644
index 959d2459c07..00000000000
--- a/TAO/tests/Param_Test/except.cpp
+++ /dev/null
@@ -1,441 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// except.cpp
-//
-// = DESCRIPTION
-// tests exception
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#include "helper.h"
-#include "except.h"
-#include "tao/debug.h"
-
-#include "tao/DynamicInterface/Unknown_User_Exception.h"
-
-ACE_RCSID (Param_Test,
- except,
- "$Id$")
-
-// ************************************************************************
-// Test_Exception
-// ************************************************************************
-
-Test_Exception::Test_Exception (void)
- : opname_ (CORBA::string_dup ("test_exception")),
- iterations_ (0)
-{
-}
-
-Test_Exception::~Test_Exception (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Exception::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Exception::dii_req_invoke (CORBA::Request_ptr req
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->in_++;
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_;
-
- req->set_return_type (CORBA::_tc_ulong);
-
- req->exceptions ()->add (CORBA::TypeCode::_duplicate (
- Param_Test::_tc_Ooops
- ));
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- req->return_value () >>= this->ret_;
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- *o2->value () >>= this->inout_;
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- *o3->value () >>= this->out_;
- }
- ACE_CATCH (CORBA::UnknownUserException, user_ex)
- {
- Param_Test::Ooops* oops;
- Param_Test::BadBoy* bad_boy;
-
- if (user_ex.exception () >>= oops)
- {
- const char *reason = oops->reason.in ();
- CORBA::ULong mod_value = oops->input;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::dii_req_invoke - "
- "expected user exception"
- " (%s,%d)\n",
- reason,
- mod_value));
- }
-
- if (reason != 0 && mod_value == 1)
- {
- this->inout_ = this->in_ * 2;
- this->out_ = this->in_ * 3;
- this->ret_ = this->in_ * 4;
- }
- }
- else if (user_ex.exception () >>= bad_boy)
- {
- ACE_PRINT_EXCEPTION ((*bad_boy),
- "Test_Exception::dii_req_invoke - "
- "unexpected (but known) user exception\n");
-
- // Since 'BadBoy' is not in the exception list the DII request,
- // it should not be caught explicitly. See comment below.
- this->inout_ = this->in_ * 5;
- this->out_ = this->in_ * 5;
- this->ret_ = this->in_ * 5;
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR Test_Exception::dii_req_invoke - "
- "unexpected (and unknown) user exception\n"));
- }
-
- return;
- }
- // Catch the SystemException type CORBA::NO_MEMORY thrown by the
- // server to test the system exception.
- ACE_CATCH (CORBA::NO_MEMORY, ex)
- {
- // 'NO_MEMORY' system exception should be caught here. This
- // happens when the IN arg == 2.
- // Otherwise we don't set the other arg values so the validity
- // check will flag the error.
- if (this->in_ % 4 == 2)
- {
- this->inout_ = this->in_ * 2;
- this->out_ = this->in_ * 3;
- this->ret_ = this->in_ * 4;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::dii_req_invoke - "
- "expected CORBA::NO_MEMORY system exception\n"));
- }
- }
- else if (this->in_ % 4 == 1)
- {
- // We caught NO_MEMORY system exception when we should have caught Ooops.
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught NO_MEMORY system exception - "
- "expected known user exception\n"));
- }
- }
- else if (this->in_ % 4 == 3)
- {
- // We caught NO_MEMORY system exception when we should have caught UNKNOWN.
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught NO_MEMORY system exception - "
- "expected UNKNOWN exception\n"));
- }
- }
- else
- {
- // We caught NO_MEMORY system exception when we should have caught nothing.
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught unexpected uknown exception\n"));
- }
- }
- }
- ACE_CATCH (CORBA::UNKNOWN, ex)
- {
- // 'BadBoy' should be caught here. This happens when the IN arg == 3.
- // Otherwise we don't set the other arg values so the validity
- // check will flag the error.
- if (this->in_ % 4 == 3)
- {
- this->inout_ = this->in_ * 2;
- this->out_ = this->in_ * 3;
- this->ret_ = this->in_ * 4;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::dii_req_invoke - "
- "expected CORBA::UNKNOWN\n"));
- }
- }
- else if (this->in_ % 4 == 1)
- {
- // We caught UNKNOWN when we should have caught Ooops.
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught unknown exception - "
- "expected known user exception\n"));
- }
- }
- else if (this->in_ % 4 == 2)
- {
- // We caught UNKNOWN exception when we should have caught NO_MEMORY.
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught unknown exception - "
- "expected NO_MEMORY system exception\n"));
- }
- }
- else
- {
- // We caught UNKNOWN when we should have caught nothing.
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught unexpected uknown exception\n"));
- }
- }
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-Test_Exception::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- this->in_ = 0;
- this->inout_ = 0;
- return 0;
-}
-
-int
-Test_Exception::reset_parameters (void)
-{
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
- return 0;
-}
-
-int
-Test_Exception::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->in_++;
- this->ret_ = objref->test_exception (this->in_,
- this->inout_,
- this->out_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Param_Test::Ooops, ex)
- {
- const char *reason = ex.reason.in ();
-
- if (reason == 0)
- {
- return -1;
- }
-
- CORBA::ULong mod_value = ex.input;
-
- // We should be catching Ooops only when this is true.
- if (mod_value != 1)
- {
- return -1;
- }
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "expected user exception"
- " (%s,%d)\n",
- reason,
- mod_value));
- }
-
- // These weren't passed back because of the exception. We
- // set them here to the 'correct' values so the validity
- // check won't return an error.
- this->inout_ = this->in_ * 2;
- this->out_ = this->in_ * 3;
- this->ret_ = this->in_ * 4;
- return 0;
- }
- ACE_CATCH (CORBA::NO_MEMORY, ex)
- {
- // 'SystemException' should be caught here, 'CORBA::NO_MEMORY'
- // system exception is thrown by the servant when the
- // IN argument == 2.
- int d = this->in_ % 4;
-
- if (d != 2)
- {
- if (d == 1 && TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught system exception - "
- "expected known user exception\n"));
- }
- else if (d == 3 && TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught system exception - "
- "expected unknown exception\n"));
- }
-
- return -1;
- }
-
- if (TAO_debug_level > 0)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Test_Exception::run_sii_test - "
- "expected system exception\n");
- }
-
- // These weren't passed back because of the exception. We
- // set them here to the 'correct' values so the validity
- // check won't return an error.
- this->inout_ = this->in_ * 2;
- this->out_ = this->in_ * 3;
- this->ret_ = this->in_ * 4;
- return 0;
- }
- ACE_CATCH (CORBA::UNKNOWN, ex)
- {
- // 'BadBoy' should be caught here, since generated code for
- // Param_Test::test_exception() knows nothing about it.
- // 'Ooops' however, should not be caught here. 'BadBoy'
- // is thrown by the servant when the IN argument == 3.
- int d = this->in_ % 4;
-
- if (d != 3)
- {
- if (d == 1 && TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught unknown exception - "
- "expected known user exception\n"));
- }
- else if (d == 2 && TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Test_Exception::run_sii_test - "
- "caught unknown exception - "
- "expected known system exception\n"));
- }
-
- return -1;
- }
-
- if (TAO_debug_level > 0)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Test_Exception::run_sii_test - "
- "expected unknown exception\n");
- }
-
- // These weren't passed back because of the exception. We
- // set them here to the 'correct' values so the validity
- // check won't return an error.
- this->inout_ = this->in_ * 2;
- this->out_ = this->in_ * 3;
- this->ret_ = this->in_ * 4;
- return 0;
- }
- ACE_CATCH (Param_Test::BadBoy, ex)
- {
- // We shouldn't end up here. See comment above.
- ACE_PRINT_EXCEPTION (ex,
- "Test_Exception::run_sii_test - "
- "unexpected user exception\n");
-
- return -1;
- }
- ACE_ENDTRY;
-
- // Normal reply - no exception thrown.
- return 0;
-}
-
-CORBA::Boolean
-Test_Exception::check_validity (void)
-{
- if (this->inout_ == this->in_ * 2 &&
- this->out_ == this->in_ * 3 &&
- this->ret_ == this->in_ * 4)
- {
- return 1;
- }
-
- return 0;
-}
-
-CORBA::Boolean
-Test_Exception::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_Exception::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*\n"
- "in = %d, "
- "inout = %d, "
- "out = %d, "
- "ret = %d\n"
- "\n=*=*=*=*=*=*\n",
- this->in_,
- this->inout_,
- this->out_,
- this->ret_));
-}
diff --git a/TAO/tests/Param_Test/except.h b/TAO/tests/Param_Test/except.h
deleted file mode 100644
index acc0f1c2cb0..00000000000
--- a/TAO/tests/Param_Test/except.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// except.h
-//
-// = DESCRIPTION
-// Tests system and user exceptions
-//
-// = AUTHORS
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_EXCEPTION_H
-#define PARAM_TEST_EXCEPTION_H
-
-#include "param_testC.h"
-
-class Test_Exception
-{
-public:
- Test_Exception (void);
- // ctor
-
- ~Test_Exception (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::ULong in_;
- // in parameter
-
- CORBA::ULong inout_;
- // inout parameter
-
- CORBA::ULong out_;
- // out parameter
-
- CORBA::ULong ret_;
- // return value
-
- CORBA::ULong iterations_;
- // Current iterations.
-};
-
-#endif /* PARAM_TEST_EXCEPTION_H */
diff --git a/TAO/tests/Param_Test/fixed_array.cpp b/TAO/tests/Param_Test/fixed_array.cpp
deleted file mode 100644
index a8e5fe0f82a..00000000000
--- a/TAO/tests/Param_Test/fixed_array.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// fixed_array.cpp
-//
-// = DESCRIPTION
-// tests fixed size arrays
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "fixed_array.h"
-
-ACE_RCSID (Param_Test,
- fixed_array,
- "$Id$")
-
-// ************************************************************************
-// Test_Fixed_Array
-// ************************************************************************
-
-Test_Fixed_Array::Test_Fixed_Array (void)
- : opname_ (CORBA::string_dup ("test_fixed_array")),
- ret_ (new Param_Test::Fixed_Array)
-{
-}
-
-Test_Fixed_Array::~Test_Fixed_Array (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Fixed_Array::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Fixed_Array::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= Param_Test::Fixed_Array_forany (this->in_);
- req->add_inout_arg ("s2") <<= Param_Test::Fixed_Array_forany (this->inout_);
- req->add_out_arg ("s3") <<= Param_Test::Fixed_Array_forany (this->out_);
- req->set_return_type (Param_Test::_tc_Fixed_Array);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Fixed_Array_forany forany;
- req->return_value () >>= forany;
- Param_Test::Fixed_Array_copy (this->ret_, forany.in ());
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= forany;
- Param_Test::Fixed_Array_copy (this->inout_, forany.in ());
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- Param_Test::Fixed_Array_forany out_any (this->out_);
- *arg3->value () >>= forany;
- Param_Test::Fixed_Array_copy (this->out_, forany.in ());
-}
-
-int
-Test_Fixed_Array::init_parameters (Param_Test_ptr /*objref*/
- ACE_ENV_ARG_DECL_NOT_USED/*env*/)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- //ACE_UNUSED_ARG (objref);
-
- for (CORBA::ULong i=0; i < Param_Test::DIM1; i++)
- {
- this->in_ [i] = gen->gen_long ();
- }
-
- return 0;
-}
-
-int
-Test_Fixed_Array::reset_parameters (void)
-{
-
- for (CORBA::ULong i=0; i < Param_Test::DIM1; i++)
- {
- this->inout_ [i] = 0;
- this->out_ [i] = 0;
- }
- // free the return value array
- Param_Test::Fixed_Array_free (this->ret_._retn ());
- // needed for repeated DII calls
- this->ret_ = new Param_Test::Fixed_Array;
- return 0;
-}
-
-int
-Test_Fixed_Array::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_fixed_array (this->in_,
- this->inout_,
- this->out_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Fixed_Array::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Fixed_Array::check_validity (void)
-{
- if (this->compare (this->in_, this->inout_) &&
- this->compare (this->in_, this->out_) &&
- this->compare (this->in_, this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Fixed_Array::check_validity (CORBA::Request_ptr /*req*/)
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-CORBA::Boolean
-Test_Fixed_Array::compare (const Param_Test::Fixed_Array_slice *a1,
- const Param_Test::Fixed_Array_slice *a2)
-{
- for (CORBA::ULong i=0; i < Param_Test::DIM1; i++)
- {
- if (a1[i] != a2[i])
- return 0;
- }
- return 1; // success
-}
-
-void
-Test_Fixed_Array::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG, "IN array\n"));
- this->print (this->in_);
- ACE_DEBUG ((LM_DEBUG, "INOUT array\n"));
- this->print (this->inout_);
- ACE_DEBUG ((LM_DEBUG, "OUT array\n"));
- this->print (this->out_);
- ACE_DEBUG ((LM_DEBUG, "RET array\n"));
- this->print (this->ret_.in ());
-}
-
-void
-Test_Fixed_Array::print (const Param_Test::Fixed_Array_slice *a)
-{
- for (CORBA::ULong i = 0; i < Param_Test::DIM1; i++)
- {
- ACE_DEBUG ((LM_DEBUG, "\t\tElement #%d = %d\n",i, a[i]));
- }
-}
diff --git a/TAO/tests/Param_Test/fixed_array.h b/TAO/tests/Param_Test/fixed_array.h
deleted file mode 100644
index c064b8106fb..00000000000
--- a/TAO/tests/Param_Test/fixed_array.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// fixed_array.h
-//
-// = DESCRIPTION
-// Tests fixed size array
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_FIXED_ARRAY_H
-#define PARAM_TEST_FIXED_ARRAY_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test fixed arrays
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Fixed_Array
-{
-public:
- Test_Fixed_Array (void);
- // ctor
-
- ~Test_Fixed_Array (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- CORBA::Boolean compare (const Param_Test::Fixed_Array_slice *a1,
- const Param_Test::Fixed_Array_slice *a2);
- // compare arrays
-
- void print (const Param_Test::Fixed_Array_slice *a);
- // print an array
-
- char *opname_;
- // operation name
-
- Param_Test::Fixed_Array in_;
- // in parameter
-
- Param_Test::Fixed_Array inout_;
- // inout parameter
-
- Param_Test::Fixed_Array out_;
- // out parameter
-
- Param_Test::Fixed_Array_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_FIXED_ARRAY_H */
diff --git a/TAO/tests/Param_Test/fixed_struct.cpp b/TAO/tests/Param_Test/fixed_struct.cpp
deleted file mode 100644
index 9447fbf88a1..00000000000
--- a/TAO/tests/Param_Test/fixed_struct.cpp
+++ /dev/null
@@ -1,239 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// fixed_struct.cpp
-//
-// = DESCRIPTION
-// tests fixed sized structs
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "fixed_struct.h"
-
-ACE_RCSID (Param_Test,
- fixed_struct,
- "$Id$")
-
-// ************************************************************************
-// Test_Fixed_Struct
-// ************************************************************************
-
-Test_Fixed_Struct::Test_Fixed_Struct (void)
- : opname_ (CORBA::string_dup ("test_fixed_struct"))
-{
-}
-
-Test_Fixed_Struct::~Test_Fixed_Struct (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Fixed_Struct::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Fixed_Struct::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_;
- req->set_return_type (Param_Test::_tc_Fixed_Struct);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Fixed_Struct *tmp;
- req->return_value () >>= tmp;
- this->ret_ = *tmp;
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = *tmp;
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = *tmp;
-}
-
-int
-Test_Fixed_Struct::init_parameters (Param_Test_ptr /*objref*/
- ACE_ENV_ARG_DECL_NOT_USED/*env*/)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- //ACE_UNUSED_ARG (objref);
-
- this->in_ = gen->gen_fixed_struct ();
- ACE_OS::memset (&this->inout_,
- 0,
- sizeof (Param_Test::Fixed_Struct));
- return 0;
-}
-
-int
-Test_Fixed_Struct::reset_parameters (void)
-{
- ACE_OS::memset (&this->inout_,
- 0,
- sizeof (Param_Test::Fixed_Struct));
-
- ACE_OS::memset (&this->out_,
- 0,
- sizeof (Param_Test::Fixed_Struct));
-
- ACE_OS::memset (&this->ret_,
- 0,
- sizeof (Param_Test::Fixed_Struct));
-
- return 0;
-}
-
-int
-Test_Fixed_Struct::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_fixed_struct (this->in_,
- this->inout_,
- this->out_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Fixed_Struct::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Fixed_Struct::check_validity (void)
-{
- if (this->in_.l == this->inout_.l &&
- this->in_.c == this->inout_.c &&
- this->in_.s == this->inout_.s &&
- this->in_.o == this->inout_.o &&
- this->in_.f == this->inout_.f &&
- this->in_.b == this->inout_.b &&
- this->in_.d == this->inout_.d &&
- this->in_.l == this->out_.l &&
- this->in_.c == this->out_.c &&
- this->in_.s == this->out_.s &&
- this->in_.o == this->out_.o &&
- this->in_.f == this->out_.f &&
- this->in_.b == this->out_.b &&
- this->in_.d == this->out_.d &&
- this->in_.l == this->ret_.l &&
- this->in_.c == this->ret_.c &&
- this->in_.s == this->ret_.s &&
- this->in_.o == this->ret_.o &&
- this->in_.f == this->ret_.f &&
- this->in_.b == this->ret_.b &&
- this->in_.d == this->ret_.d)
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Fixed_Struct::check_validity (CORBA::Request_ptr /*req*/)
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-void
-Test_Fixed_Struct::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*\n"
- "in = {\n"
- "\tl = %d\n"
- "\tc = %c\n"
- "\ts = %d\n"
- "\to = %x\n"
- "\tf = %f\n"
- "\tb = %d\n"
- "\td = %f\n"
- "}\n"
- "inout = {\n"
- "\tl = %d\n"
- "\tc = %c\n"
- "\ts = %d\n"
- "\to = %x\n"
- "\tf = %f\n"
- "\tb = %d\n"
- "\td = %f\n"
- "}\n"
- "out = {\n"
- "\tl = %d\n"
- "\tc = %c\n"
- "\ts = %d\n"
- "\to = %x\n"
- "\tf = %f\n"
- "\tb = %d\n"
- "\td = %f\n"
- "}\n"
- "ret = {\n"
- "\tl = %d\n"
- "\tc = %c\n"
- "\ts = %d\n"
- "\to = %x\n"
- "\tf = %f\n"
- "\tb = %d\n"
- "\td = %f\n"
- "}\n"
- "=*=*=*=*=*=*\n",
- this->in_.l,
- this->in_.c,
- this->in_.s,
- this->in_.o,
- this->in_.f,
- this->in_.b,
- this->in_.d,
- this->inout_.l,
- this->inout_.c,
- this->inout_.s,
- this->inout_.o,
- this->inout_.f,
- this->inout_.b,
- this->inout_.d,
- this->out_.l,
- this->out_.c,
- this->out_.s,
- this->out_.o,
- this->out_.f,
- this->out_.b,
- this->out_.d,
- this->ret_.l,
- this->ret_.c,
- this->ret_.s,
- this->ret_.o,
- this->ret_.f,
- this->ret_.b,
- this->ret_.d));
-}
diff --git a/TAO/tests/Param_Test/fixed_struct.h b/TAO/tests/Param_Test/fixed_struct.h
deleted file mode 100644
index b791bbe5e3e..00000000000
--- a/TAO/tests/Param_Test/fixed_struct.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// fixed_struct.h
-//
-// = DESCRIPTION
-// Tests fixed size structs
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_FIXED_STRUCT_H
-#define PARAM_TEST_FIXED_STRUCT_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test fixed structs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Fixed_Struct
-{
-public:
- Test_Fixed_Struct (void);
- // ctor
-
- ~Test_Fixed_Struct (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Fixed_Struct in_;
- // in parameter
-
- Param_Test::Fixed_Struct inout_;
- // inout parameter
-
- Param_Test::Fixed_Struct out_;
- // out parameter
-
- Param_Test::Fixed_Struct ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_FIXED_STRUCT_H */
diff --git a/TAO/tests/Param_Test/helper.cpp b/TAO/tests/Param_Test/helper.cpp
deleted file mode 100644
index 3018a60ed1f..00000000000
--- a/TAO/tests/Param_Test/helper.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// helper.cpp
-//
-// = DESCRIPTION
-// Defines a helper class that can generate values for the parameters used
-// for the Param_Test example
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ace/os_include/os_ctype.h"
-
-const CORBA::ULong TEST_BUFSIZE = 128;
-
-ACE_RCSID (Param_Test,
- helper,
- "$Id$")
-
-Generator::Generator (void)
-{
-}
-
-Generator::~Generator (void)
-{
-}
-
-CORBA::Short
-Generator::gen_short (void)
-{
- return (CORBA::Short) (ACE_OS::rand () % TEST_BUFSIZE);
-}
-
-CORBA::Long
-Generator::gen_long (void)
-{
- return ::ACE_OS::rand () % TEST_BUFSIZE;
-}
-
-char *
-Generator::gen_string (void)
-{
- return gen_string (TEST_BUFSIZE);
-}
-
-char *
-Generator::gen_string (int max_length)
-{
- CORBA::ULong len = (CORBA::ULong) (::ACE_OS::rand () % max_length);
- char *buf = CORBA::string_alloc (len);
- CORBA::ULong i = 0;
-
- while (i < len)
- {
- int c = ACE_OS::rand () % 128;
- if (isprint (c) && !isspace (c))
- {
- buf [i] = c;
- i++;
- }
- }
-
- buf[i] = 0;
- return buf;
-}
-
-CORBA::WChar *
-Generator::gen_wstring (void)
-{
- return gen_wstring (TEST_BUFSIZE);
-}
-
-CORBA::WChar *
-Generator::gen_wstring (int max_length)
-{
- CORBA::ULong len = (CORBA::ULong) (::ACE_OS::rand () % max_length);
- CORBA::WChar *buf = CORBA::wstring_alloc (len);
- CORBA::ULong i = 0;
- CORBA::WChar limit =
- ACE_OutputCDR::wchar_maxbytes() == 1 ? ACE_OCTET_MAX : ACE_WCHAR_MAX;
- while (i < len)
- {
- CORBA::WChar wc = ACE_OS::rand () % limit;
- if (wc)
- {
- buf[i] = wc;
- i++;
- }
- }
-
- buf[i] = 0;
- return buf;
-}
-
-const Param_Test::Fixed_Struct
-Generator::gen_fixed_struct (void)
-{
- this->fixed_struct_.l = ACE_OS::rand ();
- this->fixed_struct_.c = ACE_OS::rand () % 128;
- this->fixed_struct_.s = (CORBA::Short) ACE_OS::rand ();
- this->fixed_struct_.o = ACE_OS::rand () % 128;
- this->fixed_struct_.f = (CORBA::Float) (ACE_OS::rand () * 1.0);
- this->fixed_struct_.b = (CORBA::Boolean) (ACE_OS::rand () % 2);
- this->fixed_struct_.d = (ACE_OS::rand () * 1.0);
- return this->fixed_struct_;
-}
-
-const Param_Test::Step
-Generator::gen_step (void)
-{
- this->step_.name.id = this->gen_string ();
- this->step_.name.kind = this->gen_string ();
- this->step_.process = (CORBA::Boolean) (ACE_OS::rand () % 2);
- return this->step_;
-}
-
-#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION)
-template ACE_Singleton<Generator, ACE_Recursive_Thread_Mutex> *ACE_Singleton<Generator, ACE_Recursive_Thread_Mutex>::singleton_;
-#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */
diff --git a/TAO/tests/Param_Test/helper.h b/TAO/tests/Param_Test/helper.h
deleted file mode 100644
index b8c9c8b14d0..00000000000
--- a/TAO/tests/Param_Test/helper.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// helper.h
-//
-// = DESCRIPTION
-// Defines a helper class that can generate values for the parameters used
-// for the Param_Test example
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef HELPER_H
-#define HELPER_H
-
-#include "param_testC.h"
-#include "tao/DynamicInterface/Request.h"
-#include "ace/Singleton.h"
-
-class Generator
-{
-public:
- Generator (void);
- // constructor
-
- ~Generator (void);
- // destructor
-
- CORBA::Short gen_short (void);
- CORBA::Long gen_long (void);
- char* gen_string (void);
- char* gen_string (int maxlength);
- CORBA::WChar* gen_wstring (void);
- CORBA::WChar* gen_wstring (int maxlength);
- const Param_Test::Fixed_Struct gen_fixed_struct (void);
- const Param_Test::Step gen_step (void);
- private:
- Param_Test::Fixed_Struct fixed_struct_;
- Param_Test::Step step_;
-};
-
-typedef ACE_Singleton<Generator, TAO_SYNCH_RECURSIVE_MUTEX> GENERATOR;
-
-#endif /* HELPER_H */
diff --git a/TAO/tests/Param_Test/multdim_array.cpp b/TAO/tests/Param_Test/multdim_array.cpp
deleted file mode 100644
index 69b3f3e8f3a..00000000000
--- a/TAO/tests/Param_Test/multdim_array.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// multidim_array.cpp
-//
-// = DESCRIPTION
-// tests multidimensional fixed size arrays
-//
-// = AUTHORS
-// Bala
-//
-// ============================================================================
-
-#include "helper.h"
-#include "multdim_array.h"
-
-
-ACE_RCSID (Param_Test,
- multdim_array,
- "$Id$")
-
-// ************************************************************************
-// Test_Multdim_Array
-// ************************************************************************
-
-Test_Multdim_Array::Test_Multdim_Array (void)
- : opname_ (CORBA::string_dup ("test_multdim_array")),
- in_ (new Param_Test::Multdim_Array),
- inout_ (new Param_Test::Multdim_Array),
- out_ (new Param_Test::Multdim_Array),
- ret_ (new Param_Test::Multdim_Array)
-{
-}
-
-Test_Multdim_Array::~Test_Multdim_Array (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Multdim_Array::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Multdim_Array::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= Param_Test::Multdim_Array_forany (this->in_.inout ());
- req->add_inout_arg ("s2") <<= Param_Test::Multdim_Array_forany (this->inout_.inout ());
- req->add_out_arg ("s3") <<= Param_Test::Multdim_Array_forany (this->out_.inout ());
-
- req->set_return_type (Param_Test::_tc_Multdim_Array);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
-
- Param_Test::Multdim_Array_forany forany;
- req->return_value () >>= forany;
- Param_Test::Multdim_Array_copy (this->ret_, forany.in ());
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= forany;
- Param_Test::Multdim_Array_copy (this->inout_, forany.in ());
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= forany;
- Param_Test::Multdim_Array_copy (this->out_, forany.in ());
-}
-
-int
-Test_Multdim_Array::init_parameters (Param_Test_ptr /*objref*/
- ACE_ENV_ARG_DECL_NOT_USED/*env*/)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- for (CORBA::ULong i=0; i < Param_Test::DIM2; i++)
- {
- for (CORBA::ULong j=0; j < Param_Test::DIM3; j++)
- {
- for (CORBA::ULong k=0; k < Param_Test::DIM1; k++)
- {
- this->in_ [i][j][k] = gen->gen_long ();
- this->inout_ [i][j][k] = 0;
- }
- }
- }
- return 0;
-}
-
-int
-Test_Multdim_Array::reset_parameters (void)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // free the in value array
- Param_Test::Multdim_Array_free (this->in_._retn ());
- // needed for repeated DII calls
- this->in_ = new Param_Test::Multdim_Array;
- // free the inout value array
- Param_Test::Multdim_Array_free (this->inout_._retn ());
- // needed for repeated DII calls
- this->inout_ = new Param_Test::Multdim_Array;
-
- for (CORBA::ULong i=0; i < Param_Test::DIM2; i++)
- {
- for (CORBA::ULong j=0; j < Param_Test::DIM3; j++)
- {
- for (CORBA::ULong k=0; k < Param_Test::DIM1; k++)
- {
- this->inout_ [i][j][k] = 0;
- this->in_ [i][j][k] = gen->gen_long ();
- }
- }
- }
- // free the out value array
- Param_Test::Multdim_Array_free (this->out_._retn ());
- // needed for repeated DII calls
- this->out_ = new Param_Test::Multdim_Array;
- // free the return value array
- Param_Test::Multdim_Array_free (this->ret_._retn ());
- // needed for repeated DII calls
- this->ret_ = new Param_Test::Multdim_Array;
- return 0;
-}
-
-int
-Test_Multdim_Array::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_multdim_array (this->in_.in (),
- this->inout_.inout (),
- this->out_.inout ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Multdim_Array::run_sii_test\n");
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Multdim_Array::check_validity (void)
-{
- if (this->compare (this->in_.in (),
- this->inout_.in ()) &&
- this->compare (this->in_.in (),
- this->out_.in ()) &&
- this->compare (this->in_.in (),
- this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Multdim_Array::check_validity (CORBA::Request_ptr /*req*/)
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-CORBA::Boolean
-Test_Multdim_Array::compare (const Param_Test::Multdim_Array_slice *a1,
- const Param_Test::Multdim_Array_slice *a2)
-{
- for (CORBA::ULong i=0; i < Param_Test::DIM2; i++)
- {
- for (CORBA::ULong j=0; j < Param_Test::DIM3; j++)
- {
- for (CORBA::ULong k=0; k < Param_Test::DIM1; k++)
- {
- if (a1[i][j][k] != a2[i][j][k])
- return 0;
- }
- }
- }
- return 1; // success
-}
-
-void
-Test_Multdim_Array::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG, "IN array\n"));
- this->print (this->in_.in ());
- ACE_DEBUG ((LM_DEBUG, "INOUT array\n"));
- this->print (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG, "OUT array\n"));
- this->print (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG, "RET array\n"));
- this->print (this->ret_.in ());
-}
-
-void
-Test_Multdim_Array::print (const Param_Test::Multdim_Array_slice *a)
-{
- for (CORBA::ULong i = 0; i < Param_Test::DIM2; i++)
- {
- for (CORBA::ULong j=0; j < Param_Test::DIM3; j++)
- {
- for (CORBA::ULong k=0; k < Param_Test::DIM1; k++)
- {
- ACE_DEBUG ((LM_DEBUG, "\t\tElement #%d #%d #%d = %d \n",i,j,k, a[i][j][k]));
- }
- }
- }
-}
diff --git a/TAO/tests/Param_Test/multdim_array.h b/TAO/tests/Param_Test/multdim_array.h
deleted file mode 100644
index a6ab0243884..00000000000
--- a/TAO/tests/Param_Test/multdim_array.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// multdim_array.h
-//
-// = DESCRIPTION
-// Tests multi dimensional array
-//
-// = AUTHORS
-// Bala
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_MULTDIM_ARRAY_H
-#define PARAM_TEST_MULTDIM_ARRAY_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test fixed size multidimensional arrays
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Multdim_Array
-{
-public:
- Test_Multdim_Array (void);
- // ctor
-
- ~Test_Multdim_Array (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- CORBA::Boolean compare (const Param_Test::Multdim_Array_slice *a1,
- const Param_Test::Multdim_Array_slice *a2);
- // compare arrays
-
- void print (const Param_Test::Multdim_Array_slice *a);
- // print an array
-
- char *opname_;
- // operation name
-
- Param_Test::Multdim_Array_var in_;
- // in parameter
-
- Param_Test::Multdim_Array_var inout_;
- // inout parameter
-
- Param_Test::Multdim_Array_var out_;
- // out parameter
-
- Param_Test::Multdim_Array_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_MULTDIM_ARRAY_H */
diff --git a/TAO/tests/Param_Test/nested_struct.cpp b/TAO/tests/Param_Test/nested_struct.cpp
deleted file mode 100644
index b48b8ef65ed..00000000000
--- a/TAO/tests/Param_Test/nested_struct.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// nested_struct.cpp
-//
-// = DESCRIPTION
-// tests nested structs
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "nested_struct.h"
-
-ACE_RCSID (Param_Test,
- nested_struct,
- "$Id$")
-
-// ************************************************************************
-// Test_Nested_Struct
-// ************************************************************************
-
-Test_Nested_Struct::Test_Nested_Struct (void)
- : opname_ (CORBA::string_dup ("test_nested_struct")),
- inout_ (new Param_Test::Nested_Struct),
- out_ (new Param_Test::Nested_Struct),
- ret_ (new Param_Test::Nested_Struct)
-{
-}
-
-Test_Nested_Struct::~Test_Nested_Struct (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Nested_Struct::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Nested_Struct::dii_req_invoke (CORBA::Request *req ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
- req->set_return_type (Param_Test::_tc_Nested_Struct);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Nested_Struct *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Nested_Struct (*tmp);
-
- CORBA::NamedValue_ptr arg2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg2->value () >>= tmp;
- this->inout_ = new Param_Test::Nested_Struct (*tmp);
-
- CORBA::NamedValue_ptr arg3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *arg3->value () >>= tmp;
- this->out_ = new Param_Test::Nested_Struct (*tmp);
-}
-
-int
-Test_Nested_Struct::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
-
- this->in_.vs.dbl = 0.0;
- this->in_.vs.dummy1 = CORBA::string_dup ("");
- this->in_.vs.boole = 0;
- this->in_.vs.dummy2 = CORBA::string_dup ("");
- this->in_.vs.shrt = 0;
- // set the length of the sequence
- this->in_.vs.seq.length (len);
- // now set each individual element
- for (CORBA::ULong i = 0; i < len; ++i)
- {
- // generate some arbitrary string to be filled into the ith location in
- // the sequence
- char *str = gen->gen_string ();
- this->in_.vs.seq[i] = str;
- }
-
- this->inout_->vs.dbl = 0.0;
- this->inout_->vs.dummy1 = CORBA::string_dup ("");
- this->inout_->vs.boole = 0;
- this->inout_->vs.dummy2 = CORBA::string_dup ("");
- this->inout_->vs.shrt = 0;
- // set the length of the sequence
- this->inout_->vs.seq.length (0);
-
- return 0;
-}
-
-int
-Test_Nested_Struct::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Nested_Struct; // delete the previous ones
- this->out_ = new Param_Test::Nested_Struct;
- this->ret_ = new Param_Test::Nested_Struct;
-
- this->inout_->vs.dbl = 0.0;
- this->inout_->vs.dummy1 = CORBA::string_dup ("");
- this->inout_->vs.boole = 0;
- this->inout_->vs.dummy2 = CORBA::string_dup ("");
- this->inout_->vs.shrt = 0;
- // set the length of the sequence
- this->inout_->vs.seq.length (0);
-
- return 0;
-}
-
-int
-Test_Nested_Struct::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Nested_Struct_out out (this->out_.out ());
- this->ret_ = objref->test_nested_struct (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Nested_Struct::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Nested_Struct::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_.vs.seq.length () == this->inout_->vs.seq.length ()) &&
- (this->in_.vs.seq.length () == this->out_->vs.seq.length ()) &&
- (this->in_.vs.seq.length () == this->ret_->vs.seq.length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_.vs.seq.length () && flag; i++)
- {
- if (ACE_OS::strcmp (this->in_.vs.seq[i], this->inout_->vs.seq[i]) ||
- ACE_OS::strcmp (this->in_.vs.seq[i], this->out_->vs.seq[i]) ||
- ACE_OS::strcmp (this->in_.vs.seq[i], this->ret_->vs.seq[i]))
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Nested_Struct::check_validity (CORBA::Request_ptr /*req*/)
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-void
-Test_Nested_Struct::print_values (void)
-{
- for (CORBA::ULong i=0; i < this->in_.vs.seq.length (); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "\n*=*=*=*=*=*=*=*=*=*=\n"
- "Element # %d\n"
- "in (len = %d): %s\n"
- "inout (len = %d): %s\n"
- "out (len = %d): %s\n"
- "ret (len = %d): %s\n",
- i,
- this->in_.vs.seq.length (),
- (this->in_.vs.seq.length ()? (const char *)this->in_.vs.seq[i]:"<nul>"),
- this->inout_->vs.seq.length (),
- (this->inout_->vs.seq.length ()? (const char *)this->inout_->vs.seq[i]:"<nul>"),
- this->out_->vs.seq.length (),
- (this->out_->vs.seq.length ()? (const char *)this->out_->vs.seq[i]:"<nul>"),
- this->ret_->vs.seq.length (),
- (this->ret_->vs.seq.length ()? (const char *)this->ret_->vs.seq[i]:"<nul>")));
- }
-}
diff --git a/TAO/tests/Param_Test/nested_struct.h b/TAO/tests/Param_Test/nested_struct.h
deleted file mode 100644
index 50a456bd479..00000000000
--- a/TAO/tests/Param_Test/nested_struct.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// nested_struct.h
-//
-// = DESCRIPTION
-// Tests nested structures
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_NESTED_STRUCT_H
-#define PARAM_TEST_NESTED_STRUCT_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test nested structs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Nested_Struct
-{
-public:
- Test_Nested_Struct (void);
- // ctor
-
- ~Test_Nested_Struct (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Nested_Struct in_;
- // in parameter
-
- // these need memory management
- Param_Test::Nested_Struct_var inout_;
- // inout parameter
-
- Param_Test::Nested_Struct_var out_;
- // out parameter
-
- Param_Test::Nested_Struct_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_NESTED_STRUCT_H */
diff --git a/TAO/tests/Param_Test/objref.cpp b/TAO/tests/Param_Test/objref.cpp
deleted file mode 100644
index 4b0986404b4..00000000000
--- a/TAO/tests/Param_Test/objref.cpp
+++ /dev/null
@@ -1,313 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// objref.cpp
-//
-// = DESCRIPTION
-// tests object references
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "objref.h"
-
-ACE_RCSID (Param_Test,
- objref,
- "$Id$")
-
-// ************************************************************************
-// Test_ObjRef
-// ************************************************************************
-
-Test_ObjRef::Test_ObjRef (void)
- : opname_ (CORBA::string_dup ("test_objref"))
-{
-}
-
-Test_ObjRef::~Test_ObjRef (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_ObjRef::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_ObjRef::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (_tc_Coffee);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Coffee_ptr tmp;
- req->return_value () >>= tmp;
- this->ret_ = Coffee::_duplicate (tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = Coffee::_duplicate (tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = Coffee::_duplicate (tmp);
-}
-
-static const char *Coffee_Flavor [] = {
- "Italian Roast",
- "Irish Creme",
- "Costa Rican",
- "Colombian Supremo",
- "Macademia Nut",
- "Swiss Chocolate Mocha"
-};
-
-int
-Test_ObjRef::init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- Coffee::Desc desc;
- Generator *gen = GENERATOR::instance (); // value generator
-
- char msg_str[256] = "";
-
- ACE_TRY
- {
- ACE_OS::strcpy (msg_str, "make_cofee");
-
- // first get a Coffee object
- this->in_ = objref->make_coffee (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get some index into Coffee_Flavor [].
- CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
- desc.name = Coffee_Flavor [index];
-
- // set the attribute of the object
- ACE_OS::strcpy (msg_str, "set coffee attribute");
- this->in_->description (desc ACE_ENV_ARG_PARAMETER); // set the attribute for the in object
- ACE_TRY_CHECK;
-
- this->inout_ = Coffee::_nil ();
- this->out_ = Coffee::_nil ();
- this->ret_ = Coffee::_nil ();
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, msg_str);
- }
- ACE_ENDTRY;
- return -1;
-}
-
-int
-Test_ObjRef::reset_parameters (void)
-{
- // Environemnt variable
- ACE_DECLARE_NEW_CORBA_ENV;
- Coffee::Desc desc;
- Generator *gen = GENERATOR::instance (); // value generator
-
- // Get some index into Coffee_Flavor [].
- CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
- desc.name = Coffee_Flavor [index];
-
- ACE_TRY
- {
- // set the attribute of the object
- this->in_->description (desc ACE_ENV_ARG_PARAMETER); // set the attribute for the in object
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "set coffee attribute");
- return -1;
- }
- ACE_ENDTRY;
-
- this->inout_ = Coffee::_nil ();
- this->out_ = Coffee::_nil ();
- this->ret_ = Coffee::_nil ();
-
- return 0;
-}
-
-int
-Test_ObjRef::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ =
- objref->test_objref (this->in_.in (),
- this->inout_.inout (),
- this->out_.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_ObjRef::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_ObjRef::check_validity (void)
-{
- // Environemnt variable
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- if (CORBA::is_nil (this->in_.in ())
- || CORBA::is_nil (this->inout_.in ())
- || CORBA::is_nil (this->out_.in ())
- || CORBA::is_nil (this->ret_.in ()))
- {
- ACE_ERROR ((LM_ERROR, "Nil object references returned\n"));
- return 0;
- }
- Coffee::Desc_var in_desc =
- this->in_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *in = in_desc->name.in ();
-
- Coffee::Desc_var inout_desc =
- this->inout_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *inout = inout_desc->name.in ();
-
- Coffee::Desc_var out_desc =
- this->out_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *out = out_desc->name.in ();
-
- Coffee::Desc_var ret_desc = this->out_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char* ret = ret_desc->name.in ();
-
- // now compare them
- if (!ACE_OS::strcmp (in, inout) &&
- !ACE_OS::strcmp (in, out) &&
- !ACE_OS::strcmp (in, ret))
- return 1; // success
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Retrieving description");
- return 0;
- }
- ACE_ENDTRY;
-
- return 1;
-}
-
-CORBA::Boolean
-Test_ObjRef::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_ObjRef::print_values (void)
-{
- // Env. variable
- ACE_DECLARE_NEW_CORBA_ENV;
-
- Coffee::Desc_var in_desc;
- Coffee::Desc_var inout_desc;
- Coffee::Desc_var out_desc;
- Coffee::Desc_var ret_desc;
- const char *in = 0;
- const char *out = 0;
- const char *inout = 0;
- const char *ret = 0;
- ACE_TRY
- {
- if (!CORBA::is_nil (this->in_.in ()))
- {
- in_desc =
- this->in_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- in = in_desc->name.in ();
- }
-
- if (!CORBA::is_nil (this->inout_.in ()))
- {
- inout_desc =
- this->inout_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- inout = inout_desc->name.in ();
- }
-
- if (!CORBA::is_nil (this->out_.in ()))
- {
- out_desc =
- this->out_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- out = out_desc->name.in ();
- }
-
- if (!CORBA::is_nil (this->ret_.in ()))
- {
- ret_desc =
- this->ret_->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ret = ret_desc->name.in ();
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Retrieving Description");
- return;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
-
-
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*"
- "in = %s, "
- "inout = %s, "
- "out = %s, "
- "ret = %s*=*=*=*=*=\n",
- in?in:"ERROR(null string)",
- inout?inout:"ERROR(null string)",
- out?out:"ERROR(null string)",
- ret?ret:"ERROR(null string)"
- ));
-}
diff --git a/TAO/tests/Param_Test/objref.h b/TAO/tests/Param_Test/objref.h
deleted file mode 100644
index 023829729fc..00000000000
--- a/TAO/tests/Param_Test/objref.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// objref.h
-//
-// = DESCRIPTION
-// Tests object references
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_OBJREF_H
-#define PARAM_TEST_OBJREF_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test objrefs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_ObjRef
-{
-public:
- Test_ObjRef (void);
- // ctor
-
- ~Test_ObjRef (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Coffee_var in_;
- // in parameter
-
- Coffee_var inout_;
- // inout parameter
-
- Coffee_var out_;
- // out parameter
-
- Coffee_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_OBJREF_H */
diff --git a/TAO/tests/Param_Test/objref_struct.cpp b/TAO/tests/Param_Test/objref_struct.cpp
deleted file mode 100644
index c299f461a8a..00000000000
--- a/TAO/tests/Param_Test/objref_struct.cpp
+++ /dev/null
@@ -1,287 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// objref_struct.cpp
-//
-// = DESCRIPTION
-// test structures containing object references.
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "objref_struct.h"
-
-ACE_RCSID (Param_Test,
- objref_struct,
- "$Id$")
-
-// ************************************************************************
-// Test_Objref_Struct
-// ************************************************************************
-
-Test_Objref_Struct::Test_Objref_Struct (void)
- : opname_ (CORBA::string_dup ("test_objref_struct")),
- inout_ (new Param_Test::Objref_Struct),
- out_ (new Param_Test::Objref_Struct),
- ret_ (new Param_Test::Objref_Struct)
-{
-}
-
-Test_Objref_Struct::~Test_Objref_Struct (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Objref_Struct::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Objref_Struct::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Objref_Struct);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Objref_Struct *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Objref_Struct (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::Objref_Struct (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::Objref_Struct (*tmp);
-}
-
-int
-Test_Objref_Struct::init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Generator *gen = GENERATOR::instance (); // value generator
-
- // Set the long member.
- this->in_.x = gen->gen_long ();
-
- this->in_.y = objref->make_coffee (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Coffee::Desc d;
- d.name = gen->gen_string ();
-
- this->in_.y->description (d
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->inout_->x = 0;
-
- this->inout_->y = Coffee::_nil ();
-
- Coffee::Desc dd;
- dd.name = CORBA::string_dup ("");
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Objref_Struct::init_parameters\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-int
-Test_Objref_Struct::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Objref_Struct; // delete the previous ones
- this->out_ = new Param_Test::Objref_Struct;
- this->ret_ = new Param_Test::Objref_Struct;
-
- this->inout_->x = 0;
-
- this->inout_->y = Coffee::_nil ();
-
- Coffee::Desc dd;
- dd.name = CORBA::string_dup ("");
-
- return 0;
-}
-
-int
-Test_Objref_Struct::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Objref_Struct_out out (this->out_.out ());
-
- this->ret_ = objref->test_objref_struct (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Objref_Struct::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Objref_Struct::check_validity (void)
-{
- if (this->in_.x != this->inout_->x
- || this->in_.x != this->out_->x
- || this->in_.x != this->ret_->x)
- return 0;
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- if (CORBA::is_nil (this->in_.y.in ())
- || CORBA::is_nil (this->out_->y.in ())
- || CORBA::is_nil (this->ret_->y.in ())
- || CORBA::is_nil (this->inout_->y.in ()))
- {
- return 0;
- }
-
- Coffee::Desc_var s_in = this->in_.y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Coffee::Desc_var s_out = this->out_->y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Coffee::Desc_var s_inout = this->inout_->y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Coffee::Desc_var s_ret = this->ret_->y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (s_in->name, s_out->name) != 0
- || ACE_OS::strcmp (s_in->name, s_inout->name) != 0
- || ACE_OS::strcmp (s_in->name, s_ret->name) != 0 )
- {
- return 0;
- }
-
- return 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Objref_Struct::check_validity\n");
-
- }
- ACE_ENDTRY;
- return 0;
-}
-
-CORBA::Boolean
-Test_Objref_Struct::check_validity (CORBA::Request_ptr /*req*/)
-{
- return this->check_validity ();
-}
-
-void
-Test_Objref_Struct::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n*=*=*=*=*=*=*=*=*=*=\n"
- "in_.x = %d\n"
- "inout_.x = %d\n"
- "out_.x = %d\n"
- "ret_.x = %d\n",
- this->in_.x,
- this->inout_->x,
- this->out_->x,
- this->ret_->x ));
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- Coffee::Desc_var s_in =
- this->in_.y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Coffee::Desc_var s_inout = new Coffee::Desc;
- Coffee::Desc_var s_out = new Coffee::Desc;
- Coffee::Desc_var s_ret = new Coffee::Desc;
- s_inout->name = CORBA::string_dup ("");
- s_out->name = CORBA::string_dup ("");
- s_ret->name = CORBA::string_dup ("");
-
- if (!CORBA::is_nil (this->out_->y.in ()))
- {
- s_out = this->out_->y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (!CORBA::is_nil (this->inout_->y.in ()))
- {
- s_inout = this->inout_->y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (!CORBA::is_nil (this->ret_->y.in ()))
- {
- s_ret = this->ret_->y->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\n*=*=*=*=*=*=*=*=*=*=\n"
- "in_ name = %s\n"
- "inout_ name = %s\n"
- "out_ name = %s\n"
- "ret_ name = %s\n",
- s_in->name.in (),
- s_inout->name.in (),
- s_out->name.in (),
- s_ret->name.in () ));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Objref_Struct::print_values\n");
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Param_Test/objref_struct.h b/TAO/tests/Param_Test/objref_struct.h
deleted file mode 100644
index 8a2aaf06665..00000000000
--- a/TAO/tests/Param_Test/objref_struct.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// objref_struct.h
-//
-// = DESCRIPTION
-// Tests variable sized structures
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_OBJREF_STRUCT_H
-#define PARAM_TEST_OBJREF_STRUCT_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test variable sized structs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Objref_Struct
-{
-public:
- Test_Objref_Struct (void);
- // ctor
-
- ~Test_Objref_Struct (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Objref_Struct in_;
- // in parameter
-
- // these need memory management
- Param_Test::Objref_Struct_var inout_;
- // inout parameter
-
- Param_Test::Objref_Struct_var out_;
- // out parameter
-
- Param_Test::Objref_Struct_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_OBJREF_STRUCT_H */
diff --git a/TAO/tests/Param_Test/options.cpp b/TAO/tests/Param_Test/options.cpp
deleted file mode 100644
index e295371820b..00000000000
--- a/TAO/tests/Param_Test/options.cpp
+++ /dev/null
@@ -1,243 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// options.cpp
-//
-// = DESCRIPTION
-// Options for the Param_Test application
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "options.h"
-#include "tao/debug.h"
-#include "ace/Read_Buffer.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-#include "ace/OS_NS_fcntl.h"
-
-ACE_RCSID (Param_Test,
- options,
- "$Id$")
-
-// Constructor.p
-Options::Options (void)
- : ior_ (CORBA::string_dup ("file://test.ior")),
- test_type_ (Options::NO_TEST),
- invoke_type_ (Options::SII),
- loop_count_ (1),
- debug_ (0),
- shutdown_ (0)
-{
-}
-
-Options::~Options (void)
-{
-}
-
-// Parses the command line arguments and returns an error status.
-
-int
-Options::parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "xdn:f:i:t:k:");
- int c;
- int result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag
- TAO_debug_level++;
- this->debug_ = 1;
- break;
-
- case 'x':
- this->shutdown_ = 1;
- break;
-
- case 'n': // loop count
- this->loop_count_ = (CORBA::ULong) ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'f':
- result = this->read_ior (get_opts.opt_arg ());
-
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.opt_arg ()),
- -1);
-
- break;
-
- case 'k':
- this->ior_ = CORBA::string_dup (get_opts.opt_arg ());
- break;
-
- case 'i': // invocation
- if (!ACE_OS::strcmp (get_opts.opt_arg (), "dii"))
- this->invoke_type_ = Options::DII;
- break;
-
- case 't': // data type
- if (!ACE_OS::strcmp (get_opts.opt_arg (), "short"))
- this->test_type_ = Options::TEST_SHORT;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ulonglong"))
- this->test_type_ = Options::TEST_ULONGLONG;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ubstring"))
- this->test_type_ = Options::TEST_UB_STRING;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ubwstring"))
- this->test_type_ = Options::TEST_UB_WSTRING;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bdstring"))
- this->test_type_ = Options::TEST_BD_STRING;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bdwstring"))
- this->test_type_ = Options::TEST_BD_WSTRING;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "fixed_struct"))
- this->test_type_ = Options::TEST_FIXED_STRUCT;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ub_strseq"))
- this->test_type_ = Options::TEST_UB_STRING_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bd_strseq"))
- this->test_type_ = Options::TEST_BD_STRING_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ub_wstrseq"))
- this->test_type_ = Options::TEST_UB_WSTRING_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bd_wstrseq"))
- this->test_type_ = Options::TEST_BD_WSTRING_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "var_struct"))
- this->test_type_ = Options::TEST_VAR_STRUCT;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "nested_struct"))
- this->test_type_ = Options::TEST_NESTED_STRUCT;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "recursive_struct"))
- this->test_type_ = Options::TEST_RECURSIVE_STRUCT;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "objref_struct"))
- this->test_type_ = Options::TEST_OBJREF_STRUCT;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ub_struct_seq"))
- this->test_type_ = Options::TEST_UB_STRUCT_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bd_struct_seq"))
- this->test_type_ = Options::TEST_BD_STRUCT_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ub_array_seq"))
- this->test_type_ = Options::TEST_UB_ARRAY_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bd_array_seq"))
- this->test_type_ = Options::TEST_BD_ARRAY_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "objref"))
- this->test_type_ = Options::TEST_OBJREF;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "typecode"))
- this->test_type_ = Options::TEST_TYPECODE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "any"))
- this->test_type_ = Options::TEST_ANY;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "objref_sequence"))
- this->test_type_ = Options::TEST_OBJREF_SEQUENCE;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "any_sequence"))
- this->test_type_ = Options::TEST_ANYSEQ;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ub_short_sequence"))
- this->test_type_ = Options::TEST_UB_SHORTSEQ;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bd_short_sequence"))
- this->test_type_ = Options::TEST_BD_SHORTSEQ;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "ub_long_sequence"))
- this->test_type_ = Options::TEST_UB_LONGSEQ;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "bd_long_sequence"))
- this->test_type_ = Options::TEST_BD_LONGSEQ;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "fixed_array"))
- this->test_type_ = Options::TEST_FIXED_ARRAY;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "var_array"))
- this->test_type_ = Options::TEST_VAR_ARRAY;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "multdim_array"))
- this->test_type_ = Options::TEST_MULTDIM_ARRAY;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "exception"))
- this->test_type_ = Options::TEST_EXCEPTION;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "big_union"))
- this->test_type_ = Options::TEST_BIG_UNION;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "small_union"))
- this->test_type_ = Options::TEST_SMALL_UNION;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "recursive_union"))
- this->test_type_ = Options::TEST_RECURSIVE_UNION;
- else if (!ACE_OS::strcmp (get_opts.opt_arg (), "complex_any"))
- this->test_type_ = Options::TEST_COMPLEX_ANY;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-n loopcount]"
- " [-f servant-IOR-file]"
- " [-i invocation (sii/dii)]"
- " [-t data type]"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-// Get the factory IOR from the file created by the server.
-int
-Options::read_ior (char *filename)
-{
- // Open the file for reading.
- ACE_HANDLE f_handle = ACE_OS::open (filename, 0);
-
- if (f_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- filename),
- -1);
- ACE_Read_Buffer ior_buffer (f_handle);
- this->ior_ = ior_buffer.read ();
-
- if (this->ior_.in () == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to allocate memory to read ior: %p\n"),
- -1);
- return 0;
-}
-
-char const *
-Options::param_test_ior (void) const
-{
- return this->ior_.in ();
-}
-
-Options::TEST_TYPE
-Options::test_type (void)
-{
- return this->test_type_;
-}
-
-Options::INVOKE_TYPE
-Options::invoke_type (void)
-{
- return this->invoke_type_;
-}
-
-CORBA::ULong
-Options::loop_count (void)
-{
- return this->loop_count_;
-}
-
-CORBA::Boolean
-Options::debug (void) const
-{
- return this->debug_;
-}
-
-CORBA::Boolean
-Options::shutdown (void) const
-{
- return this->shutdown_;
-}
-
-#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION)
-template ACE_Singleton<Options, ACE_Recursive_Thread_Mutex> *ACE_Singleton<Options, ACE_Recursive_Thread_Mutex>::singleton_;
-#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */
diff --git a/TAO/tests/Param_Test/options.h b/TAO/tests/Param_Test/options.h
deleted file mode 100644
index 5291afb7a7c..00000000000
--- a/TAO/tests/Param_Test/options.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// -*- c++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// options.h
-//
-// = DESCRIPTION
-// Options for the Param_Test application
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef OPTIONS_H
-#define OPTIONS_H
-
-#include "ace/Singleton.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/Basic_Types.h"
-#include "tao/CORBA_String.h"
-#include "tao/orbconf.h"
-
-class Options
-{
-public:
- enum TEST_TYPE
- {
- NO_TEST,
- TEST_SHORT,
- TEST_ULONGLONG,
- TEST_UB_STRING,
- TEST_UB_WSTRING,
- TEST_BD_STRING,
- TEST_BD_WSTRING,
- TEST_FIXED_STRUCT,
- TEST_UB_STRING_SEQUENCE,
- TEST_BD_STRING_SEQUENCE,
- TEST_UB_WSTRING_SEQUENCE,
- TEST_BD_WSTRING_SEQUENCE,
- TEST_VAR_STRUCT,
- TEST_NESTED_STRUCT,
- TEST_RECURSIVE_STRUCT,
- TEST_OBJREF_STRUCT,
- TEST_UB_STRUCT_SEQUENCE,
- TEST_BD_STRUCT_SEQUENCE,
- TEST_UB_ARRAY_SEQUENCE,
- TEST_BD_ARRAY_SEQUENCE,
- TEST_OBJREF,
- TEST_TYPECODE,
- TEST_ANY,
- TEST_OBJREF_SEQUENCE,
- TEST_ANYSEQ,
- TEST_UB_SHORTSEQ,
- TEST_BD_SHORTSEQ,
- TEST_UB_LONGSEQ,
- TEST_BD_LONGSEQ,
- TEST_FIXED_ARRAY,
- TEST_VAR_ARRAY,
- TEST_MULTDIM_ARRAY,
- TEST_EXCEPTION,
- TEST_BIG_UNION,
- TEST_SMALL_UNION,
- TEST_RECURSIVE_UNION,
- TEST_COMPLEX_ANY
- };
-
- enum INVOKE_TYPE
- {
- SII,
- DII
- };
-
- Options (void);
- // constructor
-
- ~Options (void);
- // destructor
-
- int parse_args (int argc, char **argv);
- // Parses the arguments passed on the command line.
-
- char const * param_test_ior (void) const;
- // return the IOR for the servant
-
- TEST_TYPE test_type (void);
- // what test to run
-
- INVOKE_TYPE invoke_type (void);
- // whether to use SII or DII
-
- CORBA::ULong loop_count (void);
- // number of times to run the test
-
- CORBA::Boolean debug (void) const;
- // whether debug option is on or not
-
- CORBA::Boolean shutdown (void) const;
- // If we should request the server to shutdown.
-
-private:
- int read_ior (char *filename);
- // Function to read the servant IOR from a file.
-
- CORBA::String_var ior_;
- // IOR for the servant
-
- TEST_TYPE test_type_;
- // what test to run
-
- INVOKE_TYPE invoke_type_;
- // whether SII or DII
-
- CORBA::ULong loop_count_;
- // Number of times to do the "test_*" operations.
-
- CORBA::Boolean debug_;
- // debugging output values
-
- CORBA::Boolean shutdown_;
- // server shutdown flag.
-};
-
-typedef ACE_Singleton<Options, TAO_SYNCH_RECURSIVE_MUTEX> OPTIONS;
-
-#endif /* OPTIONS_H */
diff --git a/TAO/tests/Param_Test/param_test.idl b/TAO/tests/Param_Test/param_test.idl
deleted file mode 100644
index cf28c1273cc..00000000000
--- a/TAO/tests/Param_Test/param_test.idl
+++ /dev/null
@@ -1,391 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// params.idl
-//
-// = DESCRIPTION
-// This IDL description is used to test all the parameter passing modes (in,
-// inout, out, and return) for a number of IDL data types. The goal is to
-// verify the correctness of the generated stubs and skeletons, and the
-// the marshaling engine of TAO.
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include <orb.idl>
-#include "tao/AnyTypeCode/AnySeq.pidl"
-
-interface Coffee
-{
- struct Desc
- {
- string name;
- };
-
- attribute Desc description; // provides us the coffee object type
-};
-
-//typedef sequence<Coffee> ObjSeq;
-
-interface Param_Test
-{
- // Add exceptions to each
-
- // primitive types
- short test_short (in short s1,
- inout short s2,
- out short s3);
-
- // NOTE: use unsigned long long instead of long long, because
- // unsigned long long has much better support on platforms that
- // do not have a native 64 bit int type.
- unsigned long long test_ulonglong (in unsigned long long s1,
- inout unsigned long long s2,
- out unsigned long long s3);
-
- // strings unbounded
- string test_unbounded_string (in string s1,
- inout string s2,
- out string s3);
-
- // strings bounded
- typedef string<128> short_string;
- short_string test_bounded_string (in short_string s1,
- inout short_string s2,
- out short_string s3);
-
- // wstrings unbounded
- wstring test_unbounded_wstring (in wstring ws1,
- inout wstring ws2,
- out wstring ws3);
-
- // wstrings bounded
- typedef wstring<128> short_wstring;
- short_wstring test_bounded_wstring (in short_wstring ws1,
- inout short_wstring ws2,
- out short_wstring ws3);
-
- // structures (fixed size)
- struct Fixed_Struct
- {
- long l;
- char c;
- short s;
- octet o;
- float f;
- boolean b;
- double d;
- };
-
- Fixed_Struct test_fixed_struct (in Fixed_Struct s1,
- inout Fixed_Struct s2,
- out Fixed_Struct s3);
-
- // = Sequences of long, strings, Var_Struct and Object
- // references...
-
-
- struct NameComponent
- {
- string id;
- string kind;
- };
-
- struct Step
- {
- NameComponent name;
- boolean process;
- };
-
- typedef sequence<Step> PathSpec;
-
- PathSpec test_unbounded_struct_sequence (in PathSpec s1,
- inout PathSpec s2,
- out PathSpec s3);
- CORBA::ShortSeq test_short_sequence (in CORBA::ShortSeq s1,
- inout CORBA::ShortSeq s2,
- out CORBA::ShortSeq s3);
-
- typedef sequence<short,32> Bounded_Short_Seq;
- Bounded_Short_Seq test_bounded_short_sequence (in Bounded_Short_Seq s1,
- inout Bounded_Short_Seq s2,
- out Bounded_Short_Seq s3);
-
- CORBA::LongSeq test_long_sequence (in CORBA::LongSeq s1,
- inout CORBA::LongSeq s2,
- out CORBA::LongSeq s3);
-
- typedef sequence<long,32> Bounded_Long_Seq;
- Bounded_Long_Seq test_bounded_long_sequence (in Bounded_Long_Seq s1,
- inout Bounded_Long_Seq s2,
- out Bounded_Long_Seq s3);
-
- CORBA::StringSeq test_strseq (in CORBA::StringSeq s1,
- inout CORBA::StringSeq s2,
- out CORBA::StringSeq s3);
-
- typedef sequence<string,32> Bounded_StrSeq;
- Bounded_StrSeq test_bounded_strseq (in Bounded_StrSeq s1,
- inout Bounded_StrSeq s2,
- out Bounded_StrSeq s3);
-
- CORBA::WStringSeq test_wstrseq (in CORBA::WStringSeq ws1,
- inout CORBA::WStringSeq ws2,
- out CORBA::WStringSeq ws3);
-
- typedef sequence<wstring,32> Bounded_WStrSeq;
- Bounded_WStrSeq test_bounded_wstrseq (in Bounded_WStrSeq ws1,
- inout Bounded_WStrSeq ws2,
- out Bounded_WStrSeq ws3);
-
- typedef sequence<Fixed_Struct> StructSeq;
- StructSeq test_struct_sequence (in StructSeq s1,
- inout StructSeq s2,
- out StructSeq s3);
-
- typedef sequence<Fixed_Struct,32> Bounded_StructSeq;
- Bounded_StructSeq test_bounded_struct_sequence (in Bounded_StructSeq s1,
- inout Bounded_StructSeq s2,
- out Bounded_StructSeq s3);
-
- typedef sequence<Coffee> Coffee_Mix;
- Coffee_Mix test_coffe_mix (in Coffee_Mix s1,
- inout Coffee_Mix s2,
- out Coffee_Mix s3);
-
- typedef sequence<Coffee,32> Bounded_Coffee_Mix;
- Bounded_Coffee_Mix test_bounded_coffe_mix (in Bounded_Coffee_Mix s1,
- inout Bounded_Coffee_Mix s2,
- out Bounded_Coffee_Mix s3);
-
- CORBA::AnySeq test_anyseq (in CORBA::AnySeq s1,
- inout CORBA::AnySeq s2,
- out CORBA::AnySeq s3);
-
-/* typedef sequence<any, 32> Bounded_AnySeq;
- Bounded_AnySeq test_bounded_anyseq (in Bounded_AnySeq s1,
- inout Bounded_AnySeq s2,
- out Bounded_AnySeq s3);
-*/
-
- typedef string DUMMY;
- // variable structures
- struct Var_Struct
- {
- double dbl;
- DUMMY dummy1;
- boolean boole;
- DUMMY dummy2;
- short shrt;
- CORBA::StringSeq seq;
- };
-
- Var_Struct test_var_struct (in Var_Struct s1,
- inout Var_Struct s2,
- out Var_Struct s3);
-
- // nested structs (We reuse the var_struct defn above to make a very
- // complicated nested structure)
- struct Nested_Struct
- {
- Var_Struct vs;
- };
-
- Nested_Struct test_nested_struct (in Nested_Struct s1,
- inout Nested_Struct s2,
- out Nested_Struct s3);
-
- // object references
- Coffee make_coffee (); // make a Coffee object
-
- // test the parameter passing conventions for ObjRefs
- Coffee test_objref (in Coffee o1, inout Coffee o2, out Coffee o3);
-
- // test typecodes
- CORBA::TypeCode test_typecode (in CORBA::TypeCode t1,
- inout CORBA::TypeCode t2,
- out CORBA::TypeCode t3);
-
- // Anys. We try to pump in all kinds of data types thru these Anys
- any test_any (in any a1, inout any a2, out any a3);
-
- struct Objref_Struct
- {
- long x;
- Coffee y;
- };
- Objref_Struct test_objref_struct (in Objref_Struct t1,
- inout Objref_Struct t2,
- out Objref_Struct t3);
- // test structures that contain object references.
-
- // arrays (fixed)
- const unsigned long DIM1 = 10;
- typedef long Fixed_Array [DIM1];
-
- Fixed_Array test_fixed_array (in Fixed_Array l1,
- inout Fixed_Array l2,
- out Fixed_Array l3);
-
- // arrays (variable)
- const unsigned long DIM2 = 5;
- typedef string Var_Array [DIM2];
-
- Var_Array test_var_array (in Var_Array v1,
- inout Var_Array v2,
- out Var_Array v3);
-
- // Bounded and unbounced sequences of arrays.
- typedef sequence<Fixed_Array> ArraySeq;
- ArraySeq test_array_sequence (in ArraySeq s1,
- inout ArraySeq s2,
- out ArraySeq s3);
-
- typedef sequence<Fixed_Array, 32> Bounded_ArraySeq;
- Bounded_ArraySeq test_bounded_array_sequence (in Bounded_ArraySeq s1,
- inout Bounded_ArraySeq s2,
- out Bounded_ArraySeq s3);
-
- // Just to test report a problem
- exception Ooops {
- string reason;
- unsigned long input;
- };
- // To test what happens when an unexpected exception is thrown.
- exception BadBoy {
- };
- unsigned long test_exception (in unsigned long s1,
- inout unsigned long s2,
- out unsigned long s3)
- raises (Ooops);
-
- union Big_Union switch (short)
- {
- case 0:
- Fixed_Array the_array;
- case 1:
- Coffee the_interface;
- case 2:
- long the_long;
- case 3:
- short another_array[32];
- case 4:
- string the_string;
- case 5:
- CORBA::ShortSeq the_sequence;
- case 6:
- any the_any;
- case 7:
- octet the_octet;
- case 8:
- char the_char;
- case 9:
- boolean the_boolean;
- case 10:
- Var_Struct the_var_struct;
- case 11:
- Fixed_Struct the_fixed_struct;
- // case 12:
- // Other_Union the_union;
- };
-
- Big_Union test_big_union (in Big_Union u1,
- inout Big_Union u2,
- out Big_Union u3);
-
- enum Small_Union_Switch { A_LONG, A_SHORT };
- union Small_Union switch (Small_Union_Switch)
- {
- case A_LONG:
- long the_long;
- case A_SHORT:
- short the_short;
- };
- Small_Union test_small_union (in Small_Union u1,
- inout Small_Union u2,
- out Small_Union u3);
-
- // The following two structs are used to help compose
- // a complex Any for the test function below.
- struct level4
- {
- string level5_string;
-
- any level5_any;
- };
-
- struct level8
- {
- string level9_string;
-
- boolean level9_boolean;
-
- short level9_short;
- };
-
- any test_complex_any (in any ca1,
- inout any ca2,
- out any ca3);
-
- // Recursive structs. Contains a sequence of itself.
- struct Recursive_Struct
- {
- long x;
-
- sequence<Recursive_Struct> children;
- };
-
- Recursive_Struct test_recursive_struct (in Recursive_Struct rs1,
- inout Recursive_Struct rs2,
- out Recursive_Struct rs3);
-
- // Recursive unions. We have one recursive union nested in a different
- // recursive union.
-
- union nested_rec_union switch (short)
- {
- case 0: long value;
- case 1: sequence<nested_rec_union> nested_rec_member;
- };
-
- union Recursive_Union switch (short)
- {
- case 0: sequence<Recursive_Union> rec_member;
- case 1: nested_rec_union nested_member;
- };
-
- Recursive_Union test_recursive_union (in Recursive_Union ru1,
- inout Recursive_Union ru2,
- out Recursive_Union ru3);
-
- // multidimensional arrays (fixed). The following will give rise to a 3
- // dimensional array. The following will define a 3-dimensional array of size
- // DIM1 X DIM2 X DIM3
- const unsigned long DIM3 = 3;
-
- typedef Fixed_Array Multdim_Array [DIM2][DIM3];
-
- Multdim_Array test_multdim_array (in Multdim_Array m1,
- inout Multdim_Array m2,
- out Multdim_Array m3);
-
- // sequence of typecodes
- // typedef sequence<TypeCode> TypeCodeSeq;
- // TypeCodeSeq test_tcseq (in TypeCodeSeq t1, inout TypeCodeSeq t2, out TypeCodeSeq t3);
-
- void shutdown ();
- // Shutdown the server: this is useful to check for memory leaks,
- // performance results and in general to verify that orderly
- // shutdown is possible.
-
- // test simple objects
- // Object test_object (in Object o1, inout Object o2, out Object o3);
-
-};
diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp
deleted file mode 100644
index a1710fd8122..00000000000
--- a/TAO/tests/Param_Test/param_test_i.cpp
+++ /dev/null
@@ -1,1080 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// param_test_i.cpp
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "param_test_i.h"
-
-#include "tao/debug.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_wchar.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Param_Test,
- param_test_i,
- "$Id$")
-
-// ********* class Coffee_i ****************
-// Constructor
-
-Coffee_i::Coffee_i (const char *name)
- : name_ (name)
-{
-}
-
-// Destructor
-
-Coffee_i::~Coffee_i (void)
-{
-}
-
-// get attribute
-Coffee::Desc *
-Coffee_i::description (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*env*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Coffee::Desc *desc = new Coffee::Desc;
- desc->name = CORBA::string_dup (this->name_.in ());
- return desc;
-}
-
-// set attribute
-void
-Coffee_i::description (const Coffee::Desc &description
- ACE_ENV_ARG_DECL_NOT_USED /*env*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->name_ = CORBA::string_dup (description.name);
-}
-
-
-// ********* class Param_Test_i ****************
-
-// Constructor
-
-Param_Test_i::Param_Test_i (const char *coffee_name,
- CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- obj_ (coffee_name)
-{
-}
-
-// Destructor
-
-Param_Test_i::~Param_Test_i (void)
-{
-}
-
-// test shorts
-CORBA::Short
-Param_Test_i::test_short (CORBA::Short s1,
- CORBA::Short &s2,
- CORBA::Short_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- s2 = (CORBA::Short) (s1 * 2);
- s3 = (CORBA::Short) (s1 * 3);
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*SERVER SIDE=*=*=*=*=*=*=\n"));
- ACE_DEBUG ((LM_DEBUG, " in = %d, inout = %d, out = %d\n",
- s1, s2, s3));
- }
- return (CORBA::Short) (s1 * 4);
-}
-
-// test long long
-CORBA::ULongLong
-Param_Test_i::test_ulonglong (CORBA::ULongLong s1,
- CORBA::ULongLong &s2,
- CORBA::ULongLong_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- s2 = s1 * 2;
- s3 = s1 * 3;
- return s1 * 4;
-}
-
-// test unbounded strings. For return and out types, we return duplicates of
-// the in string. For the inout, we append the same string to itself and send
-// it back
-char *
-Param_Test_i::test_unbounded_string (const char *s1,
- char *&s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- char *retstr = CORBA::string_dup (s1);
- s3 = CORBA::string_dup (s1);
- char *tmp = CORBA::string_alloc (2*ACE_OS::strlen (s2));
- ACE_OS::sprintf (tmp, "%s%s", s2, s2);
- CORBA::string_free (s2);
- s2 = tmp;
- return retstr;
-}
-
-// test bounded strings. For return and out types, we return duplicates of
-// the in string. For the inout, we append the same string to itself and send
-// it back
-char *
-Param_Test_i::test_bounded_string (const char *s1,
- char *&s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- char *retstr = CORBA::string_dup (s1);
- s3 = CORBA::string_dup (s1);
- char *tmp = CORBA::string_alloc (2*ACE_OS::strlen (s2));
- ACE_OS::sprintf (tmp, "%s%s", s2, s2);
- CORBA::string_free (s2);
- s2 = tmp;
- return retstr;
-}
-
-// test unbounded strings. For return and out types, we return duplicates of
-// the in string. For the inout, we append the same string to itself and send
-// it back
-CORBA::WChar *
-Param_Test_i::test_unbounded_wstring (const CORBA::WChar *ws1,
- CORBA::WChar *&ws2,
- CORBA::WString_out ws3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::WChar *retwstr = CORBA::wstring_dup (ws1);
- ws3 = CORBA::wstring_dup (ws1);
- CORBA::ULong len = ACE_OS::wslen (ws2);
- CORBA::WChar *tmp = CORBA::wstring_alloc (2*len);
- for (CORBA::ULong i = 0; i < 2; i++)
- for (CORBA::ULong j = 0; j < len; j++)
- tmp[j + i*len] = ws2[j];
- tmp[2*len] = 0;
- CORBA::wstring_free (ws2);
- ws2 = tmp;
- return retwstr;
-}
-
-// test bounded strings. For return and out types, we return duplicates of
-// the in string. For the inout, we append the same string to itself and send
-// it back
-CORBA::WChar *
-Param_Test_i::test_bounded_wstring (const CORBA::WChar *ws1,
- CORBA::WChar *&ws2,
- CORBA::WString_out ws3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::WChar *retwstr = CORBA::wstring_dup (ws1);
- ws3 = CORBA::wstring_dup (ws1);
- CORBA::ULong len = ACE_OS::wslen (ws2);
- CORBA::WChar *tmp = CORBA::wstring_alloc (2*len);
- for (CORBA::ULong i = 0; i < 2; i++)
- for (CORBA::ULong j = 0; j < len; j++)
- tmp[j + i*len] = ws2[j];
- tmp[2*len] = 0;
- CORBA::wstring_free (ws2);
- ws2 = tmp;
- return retwstr;
-}
-
-// test for fixed structures. Just copy the in parameter into all the others
-Param_Test::Fixed_Struct
-Param_Test_i::test_fixed_struct (const Param_Test::Fixed_Struct &s1,
- Param_Test::Fixed_Struct &s2,
- Param_Test::Fixed_Struct_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- s2 = s1;
- s3 = s1;
- return s1;
-}
-
-// = Sequences
-
-CORBA::LongSeq *
-Param_Test_i::test_long_sequence (const CORBA::LongSeq & s1,
- CORBA::LongSeq & s2,
- CORBA::LongSeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::LongSeq
- *ret = new CORBA::LongSeq,
- *out = new CORBA::LongSeq;
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-CORBA::ShortSeq *
-Param_Test_i::test_short_sequence (const CORBA::ShortSeq & s1,
- CORBA::ShortSeq & s2,
- CORBA::ShortSeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ShortSeq
- *ret = new CORBA::ShortSeq,
- *out = new CORBA::ShortSeq;
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-Param_Test::Bounded_Short_Seq *
-Param_Test_i::test_bounded_short_sequence (const Param_Test::Bounded_Short_Seq & s1,
- Param_Test::Bounded_Short_Seq & s2,
- Param_Test::Bounded_Short_Seq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Bounded_Short_Seq
- *ret = new Param_Test::Bounded_Short_Seq,
- *out = new Param_Test::Bounded_Short_Seq;
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-Param_Test::Bounded_Long_Seq *
-Param_Test_i::test_bounded_long_sequence (const Param_Test::Bounded_Long_Seq & s1,
- Param_Test::Bounded_Long_Seq & s2,
- Param_Test::Bounded_Long_Seq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Bounded_Long_Seq
- *ret = new Param_Test::Bounded_Long_Seq,
- *out = new Param_Test::Bounded_Long_Seq;
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-CORBA::StringSeq *
-Param_Test_i::test_strseq (const CORBA::StringSeq &s1,
- CORBA::StringSeq &s2,
- CORBA::StringSeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- CORBA::StringSeq
- *ret = new CORBA::StringSeq,
- *out = new CORBA::StringSeq;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*SERVER SIDE=*=*=*=*=*=*=\n"));
- for (CORBA::ULong i=0; (i < s2.length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (s2[i]? (const char *)s2[i]:"<nul>")));
- }
- if (s2.length () == 0)
- ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
- }
-
- // now copy all elements of s1 into the others using the assignment operator
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-Param_Test::Bounded_StrSeq *
-Param_Test_i::test_bounded_strseq (const Param_Test::Bounded_StrSeq & s1,
- Param_Test::Bounded_StrSeq & s2,
- Param_Test::Bounded_StrSeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- Param_Test::Bounded_StrSeq
- *ret = new Param_Test::Bounded_StrSeq,
- *out = new Param_Test::Bounded_StrSeq;
-
- // now copy all elements of s1 into the others using the assignment operator
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-CORBA::WStringSeq *
-Param_Test_i::test_wstrseq (const CORBA::WStringSeq &ws1,
- CORBA::WStringSeq &ws2,
- CORBA::WStringSeq_out ws3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- CORBA::WStringSeq
- *ret = new CORBA::WStringSeq,
- *out = new CORBA::WStringSeq;
-
- // now copy all elements of s1 into the others using the assignment operator
- ws2 = ws1;
- *out = ws1;
- *ret = ws1;
- ws3 = out;
- return ret;
-}
-
-Param_Test::Bounded_WStrSeq *
-Param_Test_i::test_bounded_wstrseq (const Param_Test::Bounded_WStrSeq & ws1,
- Param_Test::Bounded_WStrSeq & ws2,
- Param_Test::Bounded_WStrSeq_out ws3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- Param_Test::Bounded_WStrSeq
- *ret = new Param_Test::Bounded_WStrSeq,
- *out = new Param_Test::Bounded_WStrSeq;
-
- // now copy all elements of s1 into the others using the assignment operator
- ws2 = ws1;
- *out = ws1;
- *ret = ws1;
- ws3 = out;
- return ret;
-}
-
-// test for struct sequences
-Param_Test::StructSeq *
-Param_Test_i::test_struct_sequence (const Param_Test::StructSeq &s1,
- Param_Test::StructSeq &s2,
- Param_Test::StructSeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- Param_Test::StructSeq
- *ret = new Param_Test::StructSeq,
-
- *out = new Param_Test::StructSeq;
-
- // now copy all elements of s1 into the others using the assignment operator
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-// test for bounded struct sequences
-Param_Test::Bounded_StructSeq *
-Param_Test_i::test_bounded_struct_sequence (const Param_Test::Bounded_StructSeq & s1,
- Param_Test::Bounded_StructSeq & s2,
- Param_Test::Bounded_StructSeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Bounded_StructSeq
- *ret = new Param_Test::Bounded_StructSeq,
- *out = new Param_Test::Bounded_StructSeq;
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-
-Param_Test::PathSpec *
-Param_Test_i::test_unbounded_struct_sequence (const Param_Test::PathSpec & s1,
- Param_Test::PathSpec & s2,
- Param_Test::PathSpec_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::PathSpec
- *ret = new Param_Test::PathSpec,
- *out = new Param_Test::PathSpec;
-
-
- Param_Test::PathSpec_var rPathSpec = new Param_Test::PathSpec;
- rPathSpec->length(2);
-
- rPathSpec[0u].name.id = CORBA::string_dup("staff");
- rPathSpec[0u].name.kind = CORBA::string_dup("staff");
- rPathSpec[0u].process = 1;
-
- rPathSpec[1u].name.id = CORBA::string_dup("john");
- rPathSpec[1u].name.kind = CORBA::string_dup("john");
- rPathSpec[1u].process = 1;
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
-
- return ret;
-}
-
-
-// test for array sequences
-Param_Test::ArraySeq *
-Param_Test_i::test_array_sequence (const Param_Test::ArraySeq &s1,
- Param_Test::ArraySeq &s2,
- Param_Test::ArraySeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- Param_Test::ArraySeq
- *ret = new Param_Test::ArraySeq,
-
- *out = new Param_Test::ArraySeq;
-
- // now copy all elements of s1 into the others using the assignment operator
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-// test for bounded array sequences
-Param_Test::Bounded_ArraySeq *
-Param_Test_i::test_bounded_array_sequence (const Param_Test::Bounded_ArraySeq & s1,
- Param_Test::Bounded_ArraySeq & s2,
- Param_Test::Bounded_ArraySeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Bounded_ArraySeq
- *ret = new Param_Test::Bounded_ArraySeq,
- *out = new Param_Test::Bounded_ArraySeq;
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-Param_Test::Coffee_Mix *
-Param_Test_i::test_coffe_mix (const Param_Test::Coffee_Mix & s1,
- Param_Test::Coffee_Mix & s2,
- Param_Test::Coffee_Mix_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Coffee_Mix
- *ret = new Param_Test::Coffee_Mix,
- *out = new Param_Test::Coffee_Mix;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s1.maximum (),
- s1.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
- for (CORBA::ULong i = 0; i < s1.length (); ++i)
- {
- Coffee_ptr c = s1[i];
- if (CORBA::is_nil (c))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d is nil\n", i));
- continue;
- }
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "\ttype = <%s>\n",
- i,
- c->_interface_repository_id ()));
- }
-#endif /* 0 */
-
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-Param_Test::Bounded_Coffee_Mix *
-Param_Test_i::test_bounded_coffe_mix (const Param_Test::Bounded_Coffee_Mix & s1,
- Param_Test::Bounded_Coffee_Mix & s2,
- Param_Test::Bounded_Coffee_Mix_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Bounded_Coffee_Mix
- *ret = new Param_Test::Bounded_Coffee_Mix,
- *out = new Param_Test::Bounded_Coffee_Mix;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s1.maximum (),
- s1.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
- for (CORBA::ULong i = 0; i < s1.length (); ++i)
- {
- Coffee_ptr c = s1[i];
- if (CORBA::is_nil (c))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d is nil\n", i));
- continue;
- }
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "\ttype = <%s>\n",
- i,
- c->_interface_repository_id ()));
- }
-#endif /* 0 */
-
-
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-CORBA::AnySeq *
-Param_Test_i::test_anyseq (const CORBA::AnySeq &s1,
- CORBA::AnySeq &s2,
- CORBA::AnySeq_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- CORBA::AnySeq
- *ret = new CORBA::AnySeq,
- *out = new CORBA::AnySeq;
-
- // now copy all elements of s1 into the others using the assignment operator
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-// = end of sequences...
-
-// test for variable structs
-Param_Test::Var_Struct *
-Param_Test_i::test_var_struct (const Param_Test::Var_Struct &s1,
- Param_Test::Var_Struct &s2,
- Param_Test::Var_Struct_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- Param_Test::Var_Struct
- *ret = new Param_Test::Var_Struct,
- *out = new Param_Test::Var_Struct;
-
- // now copy all elements of s1 into the others
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-// test for nested structs
-Param_Test::Nested_Struct *
-Param_Test_i::test_nested_struct (const Param_Test::Nested_Struct &s1,
- Param_Test::Nested_Struct &s2,
- Param_Test::Nested_Struct_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- Param_Test::Nested_Struct
- *ret = new Param_Test::Nested_Struct,
- *out = new Param_Test::Nested_Struct;
-
- // now copy all elements of s1 into the others
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-// test for recursive structs
-Param_Test::Recursive_Struct *
-Param_Test_i::test_recursive_struct (const Param_Test::Recursive_Struct &s1,
- Param_Test::Recursive_Struct &s2,
- Param_Test::Recursive_Struct_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" structs into all the inout, out and return sequences.
-
- Param_Test::Recursive_Struct
- *ret = new Param_Test::Recursive_Struct,
- *out = new Param_Test::Recursive_Struct;
-
- // now copy all elements of s1 into the others
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-Param_Test::Objref_Struct *
-Param_Test_i::test_objref_struct (const Param_Test::Objref_Struct &s1,
- Param_Test::Objref_Struct &s2,
- Param_Test::Objref_Struct_out s3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we copy the "in" sequences into all the inout, out and return sequences.
-
- Param_Test::Objref_Struct
- *ret = new Param_Test::Objref_Struct,
- *out = new Param_Test::Objref_Struct;
-
- // now copy all elements of s1 into the others
- s2 = s1;
- *out = s1;
- *ret = s1;
- s3 = out;
- return ret;
-}
-
-// make a Coffee object
-Coffee_ptr
-Param_Test_i::make_coffee (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->obj_._this (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-// test for object references
-Coffee_ptr
-Param_Test_i::test_objref (Coffee_ptr o1,
- Coffee_ptr &o2,
- Coffee_out o3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Coffee_ptr ret = Coffee::_nil ();
-
- ACE_TRY
- {
- Coffee_var myobj = obj_._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!CORBA::is_nil (o2))
- CORBA::release (o2);
-
- CORBA::Boolean equiv = myobj->_is_equivalent (o1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (equiv)
- {
- o2 = Coffee::_duplicate (myobj.in ());
- o3 = Coffee::_duplicate (myobj.in ());
- ret = Coffee::_duplicate (myobj.in ());
- }
- else
- {
- o2 = Coffee::_nil ();
- o3 = Coffee::_nil ();
- }
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- // env.exception (TAO_TRY_ENV.exception ());
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- // env.exception (TAO_TRY_ENV.exception ());
- }
- ACE_ENDTRY;
-
- return ret;
-}
-
-// test for typecodes
-CORBA::TypeCode_ptr
-Param_Test_i::test_typecode (CORBA::TypeCode_ptr t1,
- CORBA::TypeCode_ptr &t2,
- CORBA::TypeCode_out t3
- ACE_ENV_ARG_DECL_NOT_USED/*env*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // we simply assign t1 to the others
- CORBA::TypeCode_ptr retval = CORBA::TypeCode::_duplicate (t1);
- t2 = CORBA::TypeCode::_duplicate (t1);
- t3 = CORBA::TypeCode::_duplicate (t1);
- return retval;
-}
-
-// test for Anys
-CORBA::Any *
-Param_Test_i::test_any (const CORBA::Any &a1,
- CORBA::Any &a2,
- CORBA::Any_out a3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any *ret;
- CORBA::Short short_in;
- const char *str_in;
- Coffee_ptr coffee;
- Param_Test::Fixed_Array_forany array;
- CORBA::ShortSeq *ub_short_sequence;
- Param_Test::Bounded_Short_Seq *bd_short_sequence;
- Param_Test::Fixed_Struct *fixed_structure;
- Param_Test::Big_Union *big_union;
- Param_Test::Small_Union *small_union;
-
- a2 = a1;
- a3 = new CORBA::Any (a1);
- ret = new CORBA::Any (a1);
-
-
- if (TAO_debug_level > 0)
- {
- CORBA::TypeCode_var tc = a1.type ();
- int kind = tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- ACE_DEBUG ((LM_DEBUG,
- "Received any contents are <%d>\n",
- kind));
- }
-
- // debug the incoming Any
- if (a1 >>= short_in)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Received short = %d\n", short_in));
- a2 >>= short_in;
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "inout short = %d\n", short_in));
- *a3.ptr () >>= short_in;
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "out short = %d\n", short_in));
- *ret >>= short_in;
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "ret short = %d\n", short_in));
- }
- else if (a1 >>= str_in)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Received unbounded string = %s\n", str_in));
- }
- else if (a1 >>= coffee)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Received Coffee object\n"));
- }
- else if (a1 >>= array)
- {
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Received Fixed_Array:"));
- for (size_t i = 0; i < Param_Test::DIM1; i++)
- ACE_DEBUG ((LM_DEBUG, " %d", array[i]));
- ACE_DEBUG ((LM_DEBUG, "\n"));
- }
- for (size_t i = 0; i < Param_Test::DIM1; i++)
- array[i] = i * i;
- a2 <<= Param_Test::Fixed_Array_forany (array);
- *ret <<= Param_Test::Fixed_Array_forany (array);
- }
- else if (a1 >>= ub_short_sequence)
- {
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Received Unbounded Short_Seq:"));
- for (size_t i = 0; i < ub_short_sequence->length (); i++)
- ACE_DEBUG ((LM_DEBUG, " %d", (*ub_short_sequence)[i]));
- ACE_DEBUG ((LM_DEBUG, "\n"));
- }
- for (size_t i = 0; i < ub_short_sequence->length (); i++)
- (*ub_short_sequence)[i] = (CORBA::Short) (i * i);
- a2 <<= *ub_short_sequence;
- *ret <<= *ub_short_sequence;
- }
- else if (a1 >>= bd_short_sequence)
- {
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Received Bounded_Short_Seq:"));
- for (size_t i = 0; i < bd_short_sequence->length (); i++)
- ACE_DEBUG ((LM_DEBUG, " %d", (*bd_short_sequence)[i]));
- ACE_DEBUG ((LM_DEBUG, "\n"));
- }
- for (size_t i = 0; i < bd_short_sequence->length (); i++)
- (*bd_short_sequence)[i] = (CORBA::Short) (i * i);
- a2 <<= *bd_short_sequence;
- *ret <<= *bd_short_sequence;
- }
- else if (a1 >>= fixed_structure)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Received Fixed_Struct\n"));
- }
- else if (a1 >>= big_union)
- {
- Param_Test::Big_Union *bu_in, *bu_inout, *bu_out, *bu_ret;
- a1 >>= bu_in;
-
- // Insert copies....
- a2 <<= *bu_in;
- *a3 <<= *bu_in;
- *ret <<= *bu_in;
-
- // Extract the value to compare...
- a2 >>= bu_inout;
- *a3 >>= bu_out;
- *ret >>= bu_ret;
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Received Big Union\n"
- " in %d\n"
- " inout %d\n"
- " out %d\n"
- " ret %d\n",
- bu_in->the_long (),
- bu_inout->the_long (),
- bu_out->the_long (),
- bu_ret->the_long () ));
- }
- else if (a1 >>= small_union)
- {
- Param_Test::Small_Union *bu_in, *bu_inout, *bu_out, *bu_ret;
- a1 >>= bu_in;
-
- // Insert copies....
- a2 <<= *bu_in;
- *a3 <<= *bu_in;
- *ret <<= *bu_in;
-
- // Extract the value to compare...
- a2 >>= bu_inout;
- *a3 >>= bu_out;
- *ret >>= bu_ret;
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Received Small Union\n"
- " in %d\n"
- " inout %d\n"
- " out %d\n"
- " ret %d\n",
- bu_in->the_long (),
- bu_inout->the_long (),
- bu_out->the_long (),
- bu_ret->the_long () ));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "Received UNKNOWN type\n"));
- }
-
- return ret;
-}
-
-// test for fixed arrays
-Param_Test::Fixed_Array_slice *
-Param_Test_i::test_fixed_array (const Param_Test::Fixed_Array a1,
- Param_Test::Fixed_Array a2,
- Param_Test::Fixed_Array_out a3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Fixed_Array_slice *ret;
-
- Param_Test::Fixed_Array_copy (a2, a1);
- Param_Test::Fixed_Array_copy (a3, a1);
- ret = Param_Test::Fixed_Array_dup (a1);
- return ret;
-}
-
-// test for var arrays
-Param_Test::Var_Array_slice *
-Param_Test_i::test_var_array (const Param_Test::Var_Array a1,
- Param_Test::Var_Array a2,
- Param_Test::Var_Array_out a3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Var_Array_slice *ret;
-
- Param_Test::Var_Array_copy (a2, a1);
- a3 = Param_Test::Var_Array_dup (a1);
- ret = Param_Test::Var_Array_dup (a1);
- return ret;
-}
-
-CORBA::ULong
-Param_Test_i::test_exception (CORBA::ULong s1,
- CORBA::ULong& s2,
- CORBA::ULong_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Param_Test::Ooops))
-{
- CORBA::ULong d = s1 % 4;
-
- // No exceptions to throw.
- if (d == 0)
- {
- s2 = s1 * 2;
- s3 = s1 * 3;
- return s1 * 4;
- }
- // Throw a known user exception type to test the user exception.
- else if (d == 1)
- {
- ACE_THROW_RETURN (Param_Test::Ooops (" % 4 == 1", d), 0);
- }
- // Throw a CORBA::SystemException type CORBA::NO_MEMORY to test
- // the system exception.
- else if (d == 2)
- {
- ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0);
- }
-
- // This will avoid the compiler
- // warning that test_exception is throwing an exception
- // not in its THROW_SPEC, but still test TAO's
- // conversion of such an exception to UNKNOWN.
- this->throw_badboy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return 0;
-}
-
-Param_Test::Big_Union*
-Param_Test_i::test_big_union (const Param_Test::Big_Union& u1,
- Param_Test::Big_Union& u2,
- Param_Test::Big_Union_out u3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Big_Union_var ret (new Param_Test::Big_Union (u1));
- u2 = u1;
- u3 = new Param_Test::Big_Union (u1);
- return ret._retn ();
-}
-
-Param_Test::Small_Union
-Param_Test_i::test_small_union (const Param_Test::Small_Union& u1,
- Param_Test::Small_Union& u2,
- Param_Test::Small_Union_out u3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- u2 = u1;
- u3 = u1;
- return u1;
-}
-
-Param_Test::Recursive_Union*
-Param_Test_i::test_recursive_union (const Param_Test::Recursive_Union& ru1,
- Param_Test::Recursive_Union& ru2,
- Param_Test::Recursive_Union_out ru3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Recursive_Union_var ret (new Param_Test::Recursive_Union (ru1));
- ru2 = ru1;
- ru3 = new Param_Test::Recursive_Union (ru1);
- return ret._retn ();
-}
-
-CORBA::Any*
-Param_Test_i::test_complex_any (const CORBA::Any &a1,
- CORBA::Any &a2,
- CORBA::Any_out a3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any_var ret (new CORBA::Any (a1));
- a2 = a1;
- a3 = new CORBA::Any (a1);
- return ret._retn ();
-}
-
-Param_Test::Multdim_Array_slice *
-Param_Test_i::test_multdim_array (const Param_Test::Multdim_Array a1,
- Param_Test::Multdim_Array a2,
- Param_Test::Multdim_Array_out a3
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Param_Test::Multdim_Array_slice *ret;
-
- Param_Test::Multdim_Array_copy (a2, a1);
- Param_Test::Multdim_Array_copy (a3, a1);
- ret = Param_Test::Multdim_Array_dup (a1);
- return ret;
-}
-
-void
-Param_Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
-
-void
-Param_Test_i::throw_badboy (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_THROW (Param_Test::BadBoy ());
-}
diff --git a/TAO/tests/Param_Test/param_test_i.h b/TAO/tests/Param_Test/param_test_i.h
deleted file mode 100644
index 8f9307c3266..00000000000
--- a/TAO/tests/Param_Test/param_test_i.h
+++ /dev/null
@@ -1,349 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// param_test_i.h
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_I_H
-#define PARAM_TEST_I_H
-
-#include "param_testS.h"
-
-// Implementation of the Coffee interface
-class Coffee_i : public POA_Coffee
-
-{
-public:
- Coffee_i (const char *name);
- // constructor
-
- ~Coffee_i (void);
- // destructor
-
- // =methods for the attribute
-
- virtual Coffee::Desc * description (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // get attribute
-
- virtual void description (const Coffee::Desc &description
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // set attribute
-
-private:
- CORBA::String_var name_;
- // my description
-};
-
-// the implementation of the Param_test interface
-class Param_Test_i : public POA_Param_Test
-{
- // = TITLE
- // Param_Test_i
- // = DESCRIPTION
- // Implementation of the Param_Test test suite.
-public:
- Param_Test_i (const char *coffee_name,
- CORBA::ORB_ptr orb);
- // Constructor
-
- ~Param_Test_i (void);
- // Destructor
-
- virtual CORBA::Short test_short (CORBA::Short s1,
- CORBA::Short &s2,
- CORBA::Short_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for shorts
-
- virtual CORBA::ULongLong test_ulonglong (CORBA::ULongLong s1,
- CORBA::ULongLong &s2,
- CORBA::ULongLong_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for unsigned long long
-
- virtual char *test_unbounded_string (const char *s1,
- char *&s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for unbounded strings
-
- virtual char *test_bounded_string (const char *s1,
- char *&s2,
- CORBA::String_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for bounded strings
-
- virtual CORBA::WChar *test_unbounded_wstring (const CORBA::WChar *ws1,
- CORBA::WChar *&ws2,
- CORBA::WString_out ws3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for unbounded wstrings
-
- virtual CORBA::WChar *test_bounded_wstring (const CORBA::WChar *ws1,
- CORBA::WChar *&ws2,
- CORBA::WString_out ws3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for bounded wstrings
-
- virtual Param_Test::Fixed_Struct
- test_fixed_struct (const Param_Test::Fixed_Struct &s1,
- Param_Test::Fixed_Struct &s2,
- Param_Test::Fixed_Struct_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for fixed structures
-
- // = Start of sequences tests...
- virtual CORBA::LongSeq * test_long_sequence (
- const CORBA::LongSeq & s1,
- CORBA::LongSeq & s2,
- CORBA::LongSeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Bounded_Long_Seq * test_bounded_long_sequence (
- const Param_Test::Bounded_Long_Seq & s1,
- Param_Test::Bounded_Long_Seq & s2,
- Param_Test::Bounded_Long_Seq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::ShortSeq * test_short_sequence (
- const CORBA::ShortSeq & s1,
- CORBA::ShortSeq & s2,
- CORBA::ShortSeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Bounded_Short_Seq * test_bounded_short_sequence (
- const Param_Test::Bounded_Short_Seq & s1,
- Param_Test::Bounded_Short_Seq & s2,
- Param_Test::Bounded_Short_Seq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::StringSeq * test_strseq (
- const CORBA::StringSeq & s1,
- CORBA::StringSeq & s2,
- CORBA::StringSeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Bounded_StrSeq * test_bounded_strseq (
- const Param_Test::Bounded_StrSeq & s1,
- Param_Test::Bounded_StrSeq & s2,
- Param_Test::Bounded_StrSeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::WStringSeq * test_wstrseq (
- const CORBA::WStringSeq & ws1,
- CORBA::WStringSeq & ws2,
- CORBA::WStringSeq_out ws3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Bounded_WStrSeq * test_bounded_wstrseq (
- const Param_Test::Bounded_WStrSeq & ws1,
- Param_Test::Bounded_WStrSeq & ws2,
- Param_Test::Bounded_WStrSeq_out ws3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::StructSeq * test_struct_sequence (
- const Param_Test::StructSeq & s1,
- Param_Test::StructSeq & s2,
- Param_Test::StructSeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::PathSpec * test_unbounded_struct_sequence (
- const Param_Test::PathSpec & s1,
- Param_Test::PathSpec & s2,
- Param_Test::PathSpec_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Bounded_StructSeq * test_bounded_struct_sequence (
- const Param_Test::Bounded_StructSeq & s1,
- Param_Test::Bounded_StructSeq & s2,
- Param_Test::Bounded_StructSeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::ArraySeq * test_array_sequence (
- const Param_Test::ArraySeq & s1,
- Param_Test::ArraySeq & s2,
- Param_Test::ArraySeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Bounded_ArraySeq * test_bounded_array_sequence (
- const Param_Test::Bounded_ArraySeq & s1,
- Param_Test::Bounded_ArraySeq & s2,
- Param_Test::Bounded_ArraySeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Coffee_Mix * test_coffe_mix (
- const Param_Test::Coffee_Mix & s1,
- Param_Test::Coffee_Mix & s2,
- Param_Test::Coffee_Mix_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual Param_Test::Bounded_Coffee_Mix * test_bounded_coffe_mix (
- const Param_Test::Bounded_Coffee_Mix & s1,
- Param_Test::Bounded_Coffee_Mix & s2,
- Param_Test::Bounded_Coffee_Mix_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::AnySeq * test_anyseq (
- const CORBA::AnySeq & s1,
- CORBA::AnySeq & s2,
- CORBA::AnySeq_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // = End of sequences tests....
-
- virtual Param_Test::Var_Struct *
- test_var_struct (const Param_Test::Var_Struct &s1,
- Param_Test::Var_Struct &s2,
- Param_Test::Var_Struct_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for variable structs
-
- virtual Param_Test::Nested_Struct *
- test_nested_struct (const Param_Test::Nested_Struct &s1,
- Param_Test::Nested_Struct &s2,
- Param_Test::Nested_Struct_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for nested structs
-
- virtual Param_Test::Recursive_Struct *
- test_recursive_struct (const Param_Test::Recursive_Struct &rs1,
- Param_Test::Recursive_Struct &rs2,
- Param_Test::Recursive_Struct_out rs3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for recursive structs
-
- virtual Param_Test::Objref_Struct *
- test_objref_struct (const Param_Test::Objref_Struct &s1,
- Param_Test::Objref_Struct &s2,
- Param_Test::Objref_Struct_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual Coffee_ptr
- make_coffee (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // make a coffee object
-
- virtual Coffee_ptr
- test_objref (Coffee_ptr o1,
- Coffee_ptr &o2,
- Coffee_out o3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for object references
-
- virtual CORBA::TypeCode_ptr
- test_typecode (CORBA::TypeCode_ptr t1,
- CORBA::TypeCode_ptr &o2,
- CORBA::TypeCode_out o3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for typecodes
-
- virtual CORBA::Any *
- test_any (const CORBA::Any &a1,
- CORBA::Any &a2,
- CORBA::Any_out a3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for Anys
-
- virtual Param_Test::Fixed_Array_slice *
- test_fixed_array (const Param_Test::Fixed_Array a1,
- Param_Test::Fixed_Array a2,
- Param_Test::Fixed_Array_out a3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for fixed size arrays
-
- virtual Param_Test::Var_Array_slice *
- test_var_array (const Param_Test::Var_Array a1,
- Param_Test::Var_Array a2,
- Param_Test::Var_Array_out a3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // test for arrays of variable types
-
- virtual CORBA::ULong test_exception (CORBA::ULong s1,
- CORBA::ULong& s2,
- CORBA::ULong_out s3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Param_Test::Ooops));
-
- virtual Param_Test::Big_Union*
- test_big_union (const Param_Test::Big_Union& u1,
- Param_Test::Big_Union& u2,
- Param_Test::Big_Union_out u3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual Param_Test::Small_Union
- test_small_union (const Param_Test::Small_Union& u1,
- Param_Test::Small_Union& u2,
- Param_Test::Small_Union_out u3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual Param_Test::Recursive_Union*
- test_recursive_union (const Param_Test::Recursive_Union& ru1,
- Param_Test::Recursive_Union& ru2,
- Param_Test::Recursive_Union_out ru3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Any*
- test_complex_any (const CORBA::Any &a1,
- CORBA::Any &a2,
- CORBA::Any_out a3
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // Test for multi dimensional arrays
- virtual Param_Test::Multdim_Array_slice *
- test_multdim_array (const Param_Test::Multdim_Array,
- Param_Test::Multdim_Array ,
- Param_Test::Multdim_Array_out
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
-private:
- CORBA::ORB_var orb_;
- // Remember out ORB.
-
- Coffee_i obj_;
- // the coffee object reference we maintain
-
- void throw_badboy (ACE_ENV_SINGLE_ARG_DECL);
- // Called by test_exception. This will avoid the compiler
- // warning that test_exception is throwing an exception
- // not in its THROW_SPEC, but still test TAO's
- // conversion of such an exception to UNKNOWN.
-};
-
-#endif /* PARAM_TEST_I_H */
diff --git a/TAO/tests/Param_Test/recursive_struct.cpp b/TAO/tests/Param_Test/recursive_struct.cpp
deleted file mode 100644
index 18d49fd2779..00000000000
--- a/TAO/tests/Param_Test/recursive_struct.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// recursive_struct.cpp
-//
-// = DESCRIPTION
-// test structure that contains a sequence of itself
-//
-// = AUTHORS
-// Aniruddha Gokhale, Jeff Parsons
-//
-// ============================================================================
-
-#include "recursive_struct.h"
-
-ACE_RCSID (Param_Test,
- recursive_struct,
- "$Id$")
-
-const CORBA::ULong MAX_DEPTH = 5;
-const CORBA::ULong MAX_SEQ_LENGTH = 3;
-
-// ************************************************************************
-// Test_Recursive_Struct
-// ************************************************************************
-
-Test_Recursive_Struct::Test_Recursive_Struct (void)
- : opname_ (CORBA::string_dup ("test_recursive_struct"))
-{
-}
-
-Test_Recursive_Struct::~Test_Recursive_Struct (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Recursive_Struct::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Recursive_Struct::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Recursive_Struct);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Recursive_Struct *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Recursive_Struct (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::Recursive_Struct (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::Recursive_Struct (*tmp);
-}
-
-int
-Test_Recursive_Struct::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- // The client calls init_parameters() before the first
- // call and reset_parameters() after each call. For this
- // test, we want the same thing to happen each time.
- return this->reset_parameters ();
-}
-
-int
-Test_Recursive_Struct::reset_parameters (void)
-{
- // Since these are _vars, we do this the first call and
- // every call thereafter (if any).
- this->inout_ = new Param_Test::Recursive_Struct;
- this->out_ = new Param_Test::Recursive_Struct;
- this->ret_ = new Param_Test::Recursive_Struct;
-
- // value generator
- Generator *gen = GENERATOR::instance ();
-
- // Set the depth of recursion.
- CORBA::ULong depth = (CORBA::ULong) (gen->gen_long () % MAX_DEPTH) + 1;
-
- // No recursion for inout_ until after the call.
- this->inout_->children.length (0);
-
- // Keeps Purify happy.
- this->inout_->x = 0;
-
- // Call the recursive helper function.
- this->deep_init (this->in_,
- gen,
- depth);
-
- return 0;
-}
-
-int
-Test_Recursive_Struct::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Recursive_Struct_out out (this->out_.out ());
-
- this->ret_ = objref->test_recursive_struct (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Recursive_Struct::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Recursive_Struct::check_validity (void)
-{
- // Pair in_ with each of the returned values and call the
- // helper function with that pair.
-
- if (this->deep_check (this->in_, this->inout_.in ()) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of inout arg\n"));
-
- return 0;
- }
-
- if (this->deep_check (this->in_, this->out_.in ()) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of out arg\n"));
-
- return 0;
- }
-
- if (this->deep_check (this->in_, this->ret_.in ()) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of ret value\n"));
-
- return 0;
- }
-
- // If we get this far, all is correct.
- return 1;
-}
-
-CORBA::Boolean
-Test_Recursive_Struct::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_Recursive_Struct::print_values (void)
-{
-}
-
-// Private helper function to recursively initialize the struct.
-void
-Test_Recursive_Struct::deep_init (Param_Test::Recursive_Struct &rs,
- Generator *gen,
- CORBA::ULong level)
-{
- rs.x = gen->gen_long ();
-
- if (level == 1)
- // No more recursion.
- {
- rs.children.length (0);
-
- return;
- }
- else
- {
- // Generate a sequence length.
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % MAX_SEQ_LENGTH) + 1;
-
- rs.children.length (len);
-
- // We recurse for each element of the member sequence.
- for (CORBA::ULong i = 0; i < len; i++)
- {
- this->deep_init (rs.children[i],
- gen,
- level - 1);
- }
- }
-}
-
-// Private helper function for check_validity (so we can recurse).
-CORBA::Boolean
-Test_Recursive_Struct::deep_check (const Param_Test::Recursive_Struct &in_struct,
- const Param_Test::Recursive_Struct &test_struct)
-{
- // Do the CORBA::Long members match?
- if (in_struct.x != test_struct.x)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of CORBA::Long struct members\n"));
-
- return 0;
- }
-
- // Do the sequence lengths match?
- if (in_struct.children.length () != test_struct.children.length ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of member sequence lengths\n"));
-
- return 0;
- }
-
- // At the bottom level, the length is 0 and we skip this part.
- // Otherwise recurse.
- for (CORBA::ULong i = 0; i < in_struct.children.length (); i++)
- {
- if (!this->deep_check (in_struct.children[i],
- test_struct.children[i]))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of contained structs\n"));
-
- return 0;
- }
- }
-
- return 1;
-}
diff --git a/TAO/tests/Param_Test/recursive_struct.h b/TAO/tests/Param_Test/recursive_struct.h
deleted file mode 100644
index 18175cb53bd..00000000000
--- a/TAO/tests/Param_Test/recursive_struct.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// recursive_struct.h
-//
-// = DESCRIPTION
-// Tests a structure that contains a sequence of itself
-//
-// = AUTHORS
-// Aniruddha Gokhale, Jeff Parsons
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_RECURSIVE_STRUCT_H
-#define PARAM_TEST_RECURSIVE_STRUCT_H
-
-#include "param_testC.h"
-#include "helper.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test recursive structs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Recursive_Struct
-{
-public:
- Test_Recursive_Struct (void);
- // ctor
-
- ~Test_Recursive_Struct (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Recursive_Struct in_;
- // in parameter
-
- // these need memory management
- Param_Test::Recursive_Struct_var inout_;
- // inout parameter
-
- Param_Test::Recursive_Struct_var out_;
- // out parameter
-
- Param_Test::Recursive_Struct_var ret_;
- // return value
-
- void deep_init (Param_Test::Recursive_Struct &rs,
- Generator *gen,
- CORBA::ULong level);
- // helper function for init_parameters
-
- CORBA::Boolean deep_check (const Param_Test::Recursive_Struct &in_struct,
- const Param_Test::Recursive_Struct &test_struct);
- // helper function for check_validity
-};
-
-#endif /* PARAM_TEST_RECURSIVE_STRUCT_H */
diff --git a/TAO/tests/Param_Test/recursive_union.cpp b/TAO/tests/Param_Test/recursive_union.cpp
deleted file mode 100644
index 5fc3c86506f..00000000000
--- a/TAO/tests/Param_Test/recursive_union.cpp
+++ /dev/null
@@ -1,396 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// recursive_union.cpp
-//
-// = DESCRIPTION
-// test union that contains a sequence of itself
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "recursive_union.h"
-
-ACE_RCSID (Param_Test,
- recursive_union,
- "$Id$")
-
-const CORBA::ULong MAX_DEPTH = 3;
-const CORBA::ULong MAX_SEQ_LENGTH = 2;
-
-// ************************************************************************
-// Test_Recursive_Union
-// ************************************************************************
-
-Test_Recursive_Union::Test_Recursive_Union (void)
- : opname_ (CORBA::string_dup ("test_recursive_union"))
-{
-}
-
-Test_Recursive_Union::~Test_Recursive_Union (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Recursive_Union::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Recursive_Union::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Recursive_Union);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Recursive_Union *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Recursive_Union (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::Recursive_Union (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::Recursive_Union (*tmp);
-}
-
-int
-Test_Recursive_Union::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- // The client calls init_parameters() before the first
- // call and reset_parameters() after each call. For this
- // test, we want the same thing to happen each time.
- return this->reset_parameters ();
-}
-
-int
-Test_Recursive_Union::reset_parameters (void)
-{
- // Since these are _vars, we do this the first call and
- // every call thereafter (if any).
- this->inout_ = new Param_Test::Recursive_Union;
- this->out_ = new Param_Test::Recursive_Union;
- this->ret_ = new Param_Test::Recursive_Union;
-
- // value generator
- Generator *gen = GENERATOR::instance ();
-
- // Set the depth of recursion.
- CORBA::ULong depth =
- (CORBA::ULong) (gen->gen_long () % MAX_DEPTH) + 1;
-
- // Create a nested union to put in inout_.
- Param_Test::nested_rec_union nru;
-
- nru.value (0);
-
- this->inout_->nested_member (nru);
-
- // Call the recursive helper function. to initialize in_.
- this->deep_init (this->in_,
- gen,
- depth);
-
- return 0;
-}
-
-int
-Test_Recursive_Union::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Recursive_Union_out out (this->out_.out ());
-
- this->ret_ = objref->test_recursive_union (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Recursive_Union::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Recursive_Union::check_validity (void)
-{
- // Pair in_ with each of the returned values and call the
- // helper function with that pair.
-
- if (this->deep_check (this->in_, this->inout_.in ()) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of inout arg\n"));
-
- return 0;
- }
-
- if (this->deep_check (this->in_, this->out_.in ()) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of out arg\n"));
-
- return 0;
- }
-
- if (this->deep_check (this->in_, this->ret_.in ()) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of ret value\n"));
-
- return 0;
- }
-
- // If we get this far, all is correct.
- return 1;
-}
-
-CORBA::Boolean
-Test_Recursive_Union::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_Recursive_Union::print_values (void)
-{
-}
-
-// Private helper function to recursively initialize the union.
-void
-Test_Recursive_Union::deep_init (Param_Test::Recursive_Union &ru,
- Generator *gen,
- CORBA::ULong level)
-{
- if (level == 1)
- // No more recursion, just insert a nested_rec_union.
- {
- CORBA::ULong nested_depth =
- (CORBA::ULong) (gen->gen_long () % MAX_DEPTH) + 1;
-
- Param_Test::nested_rec_union nru;
-
- this->deep_init_nested (nru,
- gen,
- nested_depth);
-
- ru.nested_member (nru);
-
- Param_Test::Recursive_Union::_rec_member_seq tmp (MAX_SEQ_LENGTH);
-
- ru.rec_member (tmp);
-
- return;
- }
- else
- {
- // Generate a member sequence.
- CORBA::ULong len =
- (CORBA::ULong) (gen->gen_long () % MAX_SEQ_LENGTH) + 1;
-
- // This line is TAO-specific, but some compilers we support
- // are broken in their handling of the portable scoped typedef
- // required by CORBA 2.3
- Param_Test::Recursive_Union::_rec_member_seq tmp (MAX_SEQ_LENGTH);
-
- tmp.length (len);
-
- ru.rec_member (tmp);
-
- // We recurse for each element of the member sequence.
- for (CORBA::ULong i = 0; i < len; i++)
- {
- this->deep_init (ru.rec_member ()[i],
- gen,
- level - 1);
- }
- }
-}
-
-// Private helper function to recursively initialize the nested union.
-void
-Test_Recursive_Union::deep_init_nested (Param_Test::nested_rec_union &nu,
- Generator *gen,
- CORBA::ULong level)
-{
- if (level == 1)
- // No more recursion
- {
- nu.value (gen->gen_long ());
-
- return;
- }
- else
- {
- // Generate a sequence length.
- CORBA::ULong len =
- (CORBA::ULong) (gen->gen_long () % MAX_SEQ_LENGTH) + 1;
-
- // This line is TAO-specific, but some compilers we support
- // are broken in their handling of the portable scoped typedef
- // required by CORBA 2.3
- Param_Test::nested_rec_union::_nested_rec_member_seq tmp (MAX_SEQ_LENGTH);
-
- tmp.length (len);
-
- nu.nested_rec_member (tmp);
-
- // We recurse for each element of the member sequence.
- for (CORBA::ULong i = 0; i < len; i++)
- {
- this->deep_init_nested (nu.nested_rec_member ()[i],
- gen,
- level - 1);
- }
- }
-}
-
-// Private helper function for check_validity (so we can recurse).
-CORBA::Boolean
-Test_Recursive_Union::deep_check (const Param_Test::Recursive_Union &in_union,
- const Param_Test::Recursive_Union &test_union)
-{
- // Do the discriminators match?
- if (in_union._d () != test_union._d ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of Recursive_Union discriminators\n"));
-
- return 0;
- }
-
- switch (in_union._d ())
- {
- // Active member is the Recursive_Union sequence.
- case 0:
- {
- // Do the sequence lengths match?
- if (in_union.rec_member ().length () !=
- test_union.rec_member ().length ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of Recursive_Union member sequence lengths\n"));
-
- return 0;
- }
-
- for (CORBA::ULong i = 0; i < in_union.rec_member ().length (); i++)
- {
- if (!this->deep_check (in_union.rec_member ()[i],
- test_union.rec_member ()[i]))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of contained Recursive_Unions\n"));
-
- return 0;
- }
- }
-
- break;
- }
-
- // Active member is the nested union.
- case 1:
- return this->deep_check_nested (in_union.nested_member (),
- test_union.nested_member ());
-
- default:
- ACE_DEBUG ((LM_DEBUG,
- "bad discriminator value\n"));
-
- break;
- }
-
- return 1;
-}
-
-CORBA::Boolean
-Test_Recursive_Union::deep_check_nested (const Param_Test::nested_rec_union &in,
- const Param_Test::nested_rec_union &test)
-{
- if (in._d () != test._d ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of nested union discriminators\n"));
-
- return 0;
- }
-
- switch (in._d ())
- {
- // Active member is the long integer.
- case 0:
- // Do the nested_rec_union member values match?
- if (in.value () != test.value ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of nested_rec_union member values\n"));
-
- return 0;
- }
-
- break;
-
- // Active member is the recursive sequence.
- case 1:
- {
- // Do the sequence lengths match?
- if (in.nested_rec_member ().length () !=
- test.nested_rec_member ().length ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of nested_rec_union member sequence lengths\n"));
-
- return 0;
- }
-
- for (CORBA::ULong i = 0; i < in.nested_rec_member ().length (); i++)
- {
- if (!this->deep_check_nested (in.nested_rec_member ()[i],
- test.nested_rec_member ()[i]))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of contained nested_rec_unions\n"));
-
- return 0;
- }
- }
- }
- }
-
- return 1;
-}
diff --git a/TAO/tests/Param_Test/recursive_union.h b/TAO/tests/Param_Test/recursive_union.h
deleted file mode 100644
index 5ebeaac1dd7..00000000000
--- a/TAO/tests/Param_Test/recursive_union.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// recursive_union.h
-//
-// = DESCRIPTION
-// Tests a union that contains a sequence of itself
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_RECURSIVE_UNION_H
-#define PARAM_TEST_RECURSIVE_UNION_H
-
-#include "param_testC.h"
-#include "helper.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test recursive unions
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Recursive_Union
-{
-public:
- Test_Recursive_Union (void);
- // ctor
-
- ~Test_Recursive_Union (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Recursive_Union in_;
- // in parameter
-
- // these need memory management
- Param_Test::Recursive_Union_var inout_;
- // inout parameter
-
- Param_Test::Recursive_Union_var out_;
- // out parameter
-
- Param_Test::Recursive_Union_var ret_;
- // return value
-
- void deep_init (Param_Test::Recursive_Union &u,
- Generator *gen,
- CORBA::ULong level);
-
- void deep_init_nested (Param_Test::nested_rec_union &nu,
- Generator *gen,
- CORBA::ULong level);
- // helper functions for init_parameters
-
- CORBA::Boolean deep_check (const Param_Test::Recursive_Union &in_union,
- const Param_Test::Recursive_Union &test_union);
-
- CORBA::Boolean deep_check_nested (const Param_Test::nested_rec_union &in,
- const Param_Test::nested_rec_union &test);
- // helper functions for check_validity
-};
-
-#endif /* PARAM_TEST_RECURSIVE_UNION_H */
diff --git a/TAO/tests/Param_Test/results.cpp b/TAO/tests/Param_Test/results.cpp
deleted file mode 100644
index b2a12a29bd5..00000000000
--- a/TAO/tests/Param_Test/results.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// results.cpp
-//
-// = DESCRIPTION
-// Printing the results
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "results.h"
-#include "tao/debug.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Param_Test,
- results,
- "results.cpp,v 1.8 1999/06/23 14:50:14 parsons Exp")
-
-Results::Results (void)
-{
-}
-
-Results::~Results (void)
-{
- delete [] this->elapsed_time_;
-}
-
-void
-Results::print_stats (void)
-{
- double
- avg_real_time = 0,
- avg_user_time = 0,
- avg_system_time = 0,
- cps; // calls per sec
-
- CORBA::ULong i;
-
- if (TAO_debug_level > 0 && this->error_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Iteration\tReal time (msec)\tUser time (msec)"
- "\tSystem time (msec)\n\n"));
- for (i = 0; i < this->call_count_; i++)
- {
- this->elapsed_time_[i].real_time *= ACE_ONE_SECOND_IN_MSECS;
- this->elapsed_time_[i].user_time *= ACE_ONE_SECOND_IN_MSECS;
- this->elapsed_time_[i].system_time *= ACE_ONE_SECOND_IN_MSECS;
- avg_real_time += this->elapsed_time_[i].real_time;
- avg_user_time += this->elapsed_time_[i].user_time;
- avg_system_time += this->elapsed_time_[i].system_time;
-
- ACE_DEBUG ((LM_DEBUG,
- "%u\t\t%0.06f\t\t%0.06f\t\t%0.06f\n",
- i,
- (this->elapsed_time_[i].real_time < 0.0?
- 0.0:this->elapsed_time_[i].real_time),
- (this->elapsed_time_[i].user_time < 0.0?
- 0.0:this->elapsed_time_[i].user_time),
- (this->elapsed_time_[i].system_time < 0.0?
- 0.0:this->elapsed_time_[i].system_time)));
- } // end of for loop
-
- // compute average
- avg_real_time /= this->call_count_;
- avg_user_time /= this->call_count_;
- avg_system_time /= this->call_count_;
- cps = 1000 / (avg_real_time < 0.01 ? 0.01 : avg_real_time);
-
- ACE_DEBUG ((LM_DEBUG,
- "\n*=*=*=*=*= Average *=*=*=*=*=*=\n"
- "\treal_time\t= %0.06f ms, \n"
- "\tuser_time\t= %0.06f ms, \n"
- "\tsystem_time\t= %0.06f ms\n"
- "\t%0.00f calls/second\n"
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\n",
- (avg_real_time < 0.0? 0.0:avg_real_time),
- (avg_user_time < 0.0? 0.0:avg_user_time),
- (avg_system_time < 0.0? 0.0:avg_system_time),
- (cps < 0.0? 0.0 : cps)));
-
- ACE_DEBUG ((LM_DEBUG,
- "\t%d calls, %d errors\n"
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\n",
- this->call_count_,
- this->error_count_));
- }
- else if (this->error_count_ != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "\tERROR %d faults in %d calls\n"
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\n",
- this->error_count_,
- this->call_count_));
- }
-}
-
-void
-Results::print_exception (const char * /* call_name */
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- //ACE_PRINT_EXCEPTION (call_name);
-}
-
-void
-Results::start_timer (void)
-{
- this->timer_.start ();
-}
-
-void
-Results::stop_timer (void)
-{
- this->timer_.stop ();
- this->timer_.elapsed_time (this->elapsed_time_[this->call_count_-1]);
-}
-
-CORBA::ULong
-Results::call_count (void)
-{
- return this->call_count_;
-}
-
-void
-Results::call_count (CORBA::ULong c)
-{
- this->call_count_ = c;
-}
-
-CORBA::ULong
-Results::error_count (void)
-{
- return this->error_count_;
-}
-
-void
-Results::error_count (CORBA::ULong c)
-{
- this->error_count_ = c;
-}
-
-void
-Results::iterations (CORBA::ULong iters)
-{
- this->elapsed_time_ = new ACE_Profile_Timer::ACE_Elapsed_Time [iters];
-}
diff --git a/TAO/tests/Param_Test/results.h b/TAO/tests/Param_Test/results.h
deleted file mode 100644
index 7c7857acd6c..00000000000
--- a/TAO/tests/Param_Test/results.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// results.h
-//
-// = DESCRIPTION
-// Printing the results
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef RESULTS_H
-#define RESULTS_H
-
-#include "tao/Basic_Types.h"
-
-#include "ace/Profile_Timer.h"
-#include "ace/CORBA_macros.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-namespace CORBA
-{
- class Environment;
-}
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-class Results
-{
-public:
- Results (void);
- // ctor
-
- ~Results (void);
- // destructor
-
- void print_stats (void);
- // prints the time stats
-
- void print_exception (const char *call_name
- ACE_ENV_ARG_DECL_NOT_USED);
- // print the exception
-
- void start_timer (void);
- // start timing
-
- void stop_timer (void);
- // stop timing
-
- CORBA::ULong call_count (void);
- // return call count
-
- void call_count (CORBA::ULong);
- // set the call count
-
- CORBA::ULong error_count (void);
- // return the error count
-
- void error_count (CORBA::ULong);
- // set error count
-
- void iterations (CORBA::ULong iters);
- // set the number of times the test will be run
-
-private:
- CORBA::ULong call_count_;
- // # of calls made to functions
-
- CORBA::ULong error_count_;
- // # of errors incurred in the lifetime of the application.
-
- ACE_Profile_Timer timer_;
- // for timing the test
-
- ACE_Profile_Timer::ACE_Elapsed_Time *elapsed_time_;
- // holds the elapsed time for each iteration
-};
-
-#endif /* RESULTS_H */
diff --git a/TAO/tests/Param_Test/run_test.pl b/TAO/tests/Param_Test/run_test.pl
deleted file mode 100755
index 9b3b96bc124..00000000000
--- a/TAO/tests/Param_Test/run_test.pl
+++ /dev/null
@@ -1,117 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-$invocation = "sii";
-$num = 5;
-$debug = "";
-$status = 0;
-
-unlink $iorfile;
-
-# Parse the arguments
-
-@types = ("short", "ulonglong", "ubstring", "bdstring",
- "ubwstring", "bdwstring", "fixed_struct",
- "ub_strseq", "bd_strseq", "ub_wstrseq", "bd_wstrseq",
- "var_struct", "nested_struct", "recursive_struct",
- "ub_struct_seq", "bd_struct_seq",
- "ub_array_seq", "bd_array_seq", "multdim_array",
- "any", "objref", "objref_sequence", "objref_struct",
- "any_sequence",
- "ub_short_sequence", "ub_long_sequence",
- "bd_short_sequence", "bd_long_sequence",
- "fixed_array", "var_array", "typecode", "exception",
- "big_union", "small_union", "recursive_union", "complex_any");
-
-
-for ($i = 0; $i <= $#ARGV; $i++) {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
- print "Run_Test Perl script for TAO Param Test\n\n";
- print "run_test [-n num] [-d] [-onewin] [-h] [-t type] [-i (dii|sii)] [-chorus <target>]\n";
- print "\n";
- print "-n num -- runs the client num times\n";
- print "-d -- runs each in debug mode\n";
- print "-h -- prints this information\n";
- print "-t type -- runs only one type of param test\n";
- print "-i (dii|sii) -- Changes the type of invocation\n";
- print "-chorus <target> -- Run tests on chorus target\n";
- exit 0;
- }
- elsif ($ARGV[$i] eq "-n") {
- $num = $ARGV[$i + 1];
- $i++;
- }
- elsif ($ARGV[$i] eq "-d") {
- $debug = $debug." -d";
- }
- elsif ($ARGV[$i] eq "-t") {
- @types = split (',', $ARGV[$i + 1]);
- $i++;
- }
- elsif ($ARGV[$i] eq "-i") {
- $invocation = $ARGV[$i + 1];
- $i++;
- }
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "$debug -o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "$debug -o $iorfile");
-}
-$CL = new PerlACE::Process ("client");
-
-foreach $type (@types) {
- unlink $iorfile; # Ignore errors
-
- print STDERR "==== Testing $type === wait....\n";
-
- $server = $SV->Spawn ();
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
- else
- {
- if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
- }
-
- $CL->Arguments ("$debug -f $iorfile -i $invocation -t $type -n $num -x");
-
- $client = $CL->SpawnWaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-
- $server = $SV->WaitKill (10);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
- }
-
- unlink $iorfile;
-
- print STDERR "==== Test for $type finished ===\n";
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Param_Test/run_test_dii.pl b/TAO/tests/Param_Test/run_test_dii.pl
deleted file mode 100755
index b090ff4cd8c..00000000000
--- a/TAO/tests/Param_Test/run_test_dii.pl
+++ /dev/null
@@ -1,9 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-system 'perl run_test.pl -i dii ' . join ' ', @ARGV;
-
diff --git a/TAO/tests/Param_Test/server.cpp b/TAO/tests/Param_Test/server.cpp
deleted file mode 100644
index c66e703967f..00000000000
--- a/TAO/tests/Param_Test/server.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// server.cpp
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "param_test_i.h"
-#include "tao/debug.h"
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Param_Test,
- server,
- "$Id$")
-
-// Parses the command line arguments and returns an error status.
-static FILE *ior_output_file = 0;
-static const char *ior_output_filename = "test.ior";
-
-static int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "do:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag
- TAO_debug_level++;
- break;
- case 'o':
- ior_output_filename = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- "\n", argv [0]), 1);
- }
-
- return 0; // Indicates successful parsing of command line
-}
-
-// Standard command line parsing utilities used.
-
-int
-main (int argc, char *argv[])
-{
- PortableServer::POA_var oa_ptr;
- Param_Test_i *param_test = 0;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- const char *orb_name = "";
- CORBA::ORB_var orb_ptr =
- CORBA::ORB_init (argc, argv, orb_name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var temp; // holder for the myriad of times we get
- // an object which we then have to narrow.
-
- // Get the Root POA
-
- temp = orb_ptr->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (temp.in()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Unable to get root poa reference.\n"),
- 1);
-
- oa_ptr = PortableServer::POA::_narrow (temp.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- oa_ptr->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies (2);
- policies.length (2);
- policies[0] =
- oa_ptr->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies[1] =
- oa_ptr->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // We use a different POA, otherwise the user would have to
- // change the object key each time it invokes the server.
- PortableServer::POA_var good_poa =
- oa_ptr->create_POA ("child_poa",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse remaining command line and verify parameters.
- parse_args (argc, argv);
-
- // initialize a param_test target object and register it with the object
- // adapter
-
- // Create the implementation object
- ACE_NEW_RETURN (param_test,
- Param_Test_i ("unknown",
- orb_ptr.in ()), 1);
-
- // Register with GoodPOA with a specific name
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("param_test");
- good_poa->activate_object_with_id (id.in (),
- param_test
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Stringify the objref we'll be implementing, and print it to
- // stdout. Someone will take that string and give it to a
- // client. Then release the object.
-
- temp = good_poa->id_to_reference (id.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var str =
- orb_ptr->object_to_string (temp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) The IOR is <%s>\n",
- str.in ()));
- }
-
- ior_output_file = ACE_OS::fopen (ior_output_filename, "w");
-
- if (ior_output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- ior_output_filename),
- -1);
- }
-
- ACE_OS::fprintf (ior_output_file,
- "%s",
- str.in ());
- ACE_OS::fclose (ior_output_file);
-
-
- // Make the POAs controlled by this manager active
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb_ptr->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- good_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- oa_ptr->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
- return -1;
- }
- ACE_CATCH (CORBA::UserException, userex)
- {
- ACE_PRINT_EXCEPTION (userex, "User Exception");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
- // Free resources
- delete param_test;
-
- return 0;
-}
diff --git a/TAO/tests/Param_Test/short.cpp b/TAO/tests/Param_Test/short.cpp
deleted file mode 100644
index adaa7219c30..00000000000
--- a/TAO/tests/Param_Test/short.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// short.cpp
-//
-// = DESCRIPTION
-// tests shorts
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "short.h"
-
-ACE_RCSID (Param_Test,
- short,
- "$Id$")
-
-// ************************************************************************
-// Test_Short
-// ************************************************************************
-
-Test_Short::Test_Short (void)
- : opname_ (CORBA::string_dup ("test_short"))
-{
-}
-
-Test_Short::~Test_Short (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Short::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Short::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_;
-
- req->set_return_type (CORBA::_tc_short);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- req->return_value () >>= this->ret_;
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= this->inout_;
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= this->out_;
-}
-
-int
-Test_Short::init_parameters (Param_Test_ptr /*objref*/
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- this->in_ = gen->gen_short ();
- this->inout_ = 0;
- return 0;
-}
-
-int
-Test_Short::reset_parameters (void)
-{
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
- return 0;
-}
-
-int
-Test_Short::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_short (this->in_,
- this->inout_,
- this->out_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Short::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Short::check_validity (void)
-{
- if (this->inout_ == this->in_ * 2 &&
- this->out_ == this->in_ * 3 &&
- this->ret_ == this->in_ * 4)
- return 1; // success
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Short::check_validity (CORBA::Request_ptr /*req*/)
-{
- return this->check_validity ();
-}
-
-void
-Test_Short::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*\n"
- "in = %d, "
- "inout = %d, "
- "out = %d, "
- "ret = %d\n"
- "\n=*=*=*=*=*=*\n",
- this->in_,
- this->inout_,
- this->out_,
- this->ret_));
-}
diff --git a/TAO/tests/Param_Test/short.h b/TAO/tests/Param_Test/short.h
deleted file mode 100644
index 5157b673c74..00000000000
--- a/TAO/tests/Param_Test/short.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// short.h
-//
-// = DESCRIPTION
-// Tests shorts
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_SHORT_H
-#define PARAM_TEST_SHORT_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test shorts
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Short
-{
-public:
- Test_Short (void);
- // ctor
-
- ~Test_Short (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::Short in_;
- // in parameter
-
- CORBA::Short inout_;
- // inout parameter
-
- CORBA::Short out_;
- // out parameter
-
- CORBA::Short ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_SHORT_H */
diff --git a/TAO/tests/Param_Test/small_union.cpp b/TAO/tests/Param_Test/small_union.cpp
deleted file mode 100644
index 81a771b66ea..00000000000
--- a/TAO/tests/Param_Test/small_union.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// small_union.cpp
-//
-// = DESCRIPTION
-// tests Small_Unions
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "small_union.h"
-
-ACE_RCSID (Param_Test,
- small_union,
- "$Id$")
-
-// ************************************************************************
-// Test_Small_Union
-// ************************************************************************
-
-size_t Test_Small_Union::counter = 0;
-
-Test_Small_Union::Test_Small_Union (void)
- : opname_ (CORBA::string_dup ("test_small_union"))
-{
-}
-
-Test_Small_Union::~Test_Small_Union (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Small_Union::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Small_Union::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Small_Union);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Small_Union *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Small_Union (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = *tmp;
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::Small_Union (*tmp);
-}
-
-int
-Test_Small_Union::init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- // get access to a Coffee Object
- this->cobj_ = objref->make_coffee (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->reset_parameters ();
- return 0;
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex,"System Exception doing make_coffee");
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "An exception caught in make_coffee");
- }
- ACE_ENDTRY;
- return -1;
-}
-
-int
-Test_Small_Union::reset_parameters (void)
-{
- Generator *gen = GENERATOR::instance (); // value generator
- CORBA::ULong index = (counter++ % 2);
-
- switch (index)
- {
- case 0:
- {
- CORBA::Long l = gen->gen_long ();
- this->in_.the_long (l);
- this->inout_.the_long (l);
- }
- break;
- default:
- case 1:
- {
- CORBA::Short s = gen->gen_short ();
- this->in_.the_short (s);
- this->inout_.the_short (s);
- }
- break;
- }
- this->out_ = new Param_Test::Small_Union (this->in_);
- this->ret_ = new Param_Test::Small_Union (this->in_);
- return 0;
-}
-
-int
-Test_Small_Union::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_small_union (this->in_,
- this->inout_,
- this->out_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Small_Union::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Small_Union::check_validity (void)
-{
- if (this->in_._d () != this->inout_._d ()
- || this->in_._d () != this->out_->_d ()
- || this->in_._d () != this->ret_->_d ())
- {
- ACE_DEBUG ((LM_DEBUG, "mismatch of discriminators\n"));
- return 0;
- }
-
-
- switch (this->in_._d ())
- {
- case Param_Test::A_LONG:
- {
- CORBA::Long in = this->in_.the_long ();
- CORBA::Long inout = this->inout_.the_long ();
- CORBA::Long out = this->out_->the_long ();
- CORBA::Long ret = this->ret_->the_long ();
- if (in != out || in != inout || in != ret)
- return 0;
- }
- break;
-
- case Param_Test::A_SHORT:
- {
- CORBA::Short in = this->in_.the_short ();
- CORBA::Short inout = this->inout_.the_short ();
- CORBA::Short out = this->out_->the_short ();
- CORBA::Short ret = this->ret_->the_short ();
- if (in != out || in != inout || in != ret)
- return 0;
- }
- break;
-
- default:
- return 0;
- }
-
- return 1;
-}
-
-CORBA::Boolean
-Test_Small_Union::check_validity (CORBA::Request_ptr /*req*/)
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-void
-Test_Small_Union::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/small_union.h b/TAO/tests/Param_Test/small_union.h
deleted file mode 100644
index bea055565b4..00000000000
--- a/TAO/tests/Param_Test/small_union.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// small_union.h
-//
-// = DESCRIPTION
-// Tests Anys
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_SMALL_UNION_H
-#define PARAM_TEST_SMALL_UNION_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test Anys
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Small_Union
-{
-public:
- Test_Small_Union (void);
- // ctor
-
- ~Test_Small_Union (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Coffee_var cobj_;
- // Coffee object used to test Small_Union with object.
-
- static size_t counter;
- // test counter.
-
- Param_Test::Small_Union in_;
- // in parameter
-
- Param_Test::Small_Union inout_;
- // inout parameter
-
- Param_Test::Small_Union_var out_;
- // out parameter
-
- Param_Test::Small_Union_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_SMALL_UNION_H */
diff --git a/TAO/tests/Param_Test/svc.conf b/TAO/tests/Param_Test/svc.conf
deleted file mode 100644
index d63ac264118..00000000000
--- a/TAO/tests/Param_Test/svc.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# $Id$
-#
-# Please read $TAO_ROOT/docs/Options.html for details.
-#
-
-#static Resource_Factory "-ORBNativeWCharCodeset 0x00010109"
-static Server_Strategy_Factory "-ORBtablesize 128"
diff --git a/TAO/tests/Param_Test/svc.conf.xml b/TAO/tests/Param_Test/svc.conf.xml
deleted file mode 100644
index ac9bb2d96dd..00000000000
--- a/TAO/tests/Param_Test/svc.conf.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Param_Test/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <!-- Please read $TAO_ROOT/docs/Options.html for details. -->
- <!-- -->
- <static id="Resource_Factory" params="-ORBNativeWCharCodeset 0x00010001"/>
- <static id="Server_Strategy_Factory" params="-ORBtablesize 128"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Param_Test/tests.h b/TAO/tests/Param_Test/tests.h
deleted file mode 100644
index c042cad74fa..00000000000
--- a/TAO/tests/Param_Test/tests.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// tests.h
-//
-// = DESCRIPTION
-// All the test objects header files included here
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef TESTS_H
-#define TESTS_H
-
-#include "any.h"
-#include "bd_long_seq.h"
-#include "bd_short_seq.h"
-#include "bd_str_seq.h"
-#include "bd_wstr_seq.h"
-#include "bd_string.h"
-#include "bd_wstring.h"
-#include "bd_struct_seq.h"
-#include "bd_array_seq.h"
-#include "fixed_array.h"
-#include "fixed_struct.h"
-#include "nested_struct.h"
-#include "recursive_struct.h"
-#include "objref_struct.h"
-#include "objref.h"
-#include "short.h"
-#include "ulonglong.h"
-#include "typecode.h"
-#include "ub_any_seq.h"
-#include "ub_long_seq.h"
-#include "ub_objref_seq.h"
-#include "ub_short_seq.h"
-#include "ub_str_seq.h"
-#include "ub_wstr_seq.h"
-#include "ub_string.h"
-#include "ub_wstring.h"
-#include "ub_struct_seq.h"
-#include "ub_array_seq.h"
-#include "var_array.h"
-#include "var_struct.h"
-#include "except.h"
-#include "big_union.h"
-#include "small_union.h"
-#include "recursive_union.h"
-#include "complex_any.h"
-#include "multdim_array.h"
-#endif /* if !defined */
diff --git a/TAO/tests/Param_Test/typecode.cpp b/TAO/tests/Param_Test/typecode.cpp
deleted file mode 100644
index 551ef486f39..00000000000
--- a/TAO/tests/Param_Test/typecode.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// typecode.cpp
-//
-// = DESCRIPTION
-// tests typecodes
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "typecode.h"
-
-ACE_RCSID (Param_Test,
- typecode,
- "$Id$")
-
-// ************************************************************************
-// Test_TypeCode
-// ************************************************************************
-
-Test_TypeCode::Test_TypeCode (void)
- : opname_ (CORBA::string_dup ("test_typecode"))
-{
-}
-
-Test_TypeCode::~Test_TypeCode (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_TypeCode::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_TypeCode::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_TypeCode);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_ptr tmp;
- req->return_value () >>= tmp;
- this->ret_ = CORBA::TypeCode::_duplicate (tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = CORBA::TypeCode::_duplicate (tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = CORBA::TypeCode::_duplicate (tmp);
-}
-
-int
-Test_TypeCode::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- static CORBA::TypeCode_ptr tc_table [] =
- {
- // primitive parameterless typecodes
- CORBA::_tc_short,
- // typecode with a simple parameter
- CORBA::_tc_string,
- // complex typecodes
- CORBA::_tc_Object,
- _tc_Param_Test,
- Param_Test::_tc_StructSeq,
- Param_Test::_tc_Nested_Struct
- };
-
- static CORBA::ULong index = 0;
-
- this->tc_holder_ = CORBA::TypeCode::_duplicate (tc_table [index]);
- this->in_ = this->tc_holder_;
- this->inout_ = CORBA::TypeCode::_duplicate (CORBA::_tc_null);
-
- // Must initialize these for DII
- this->out_ = CORBA::TypeCode::_nil ();
- this->ret_ = CORBA::TypeCode::_nil ();
-
- index++;
- if (index >= sizeof(tc_table)/sizeof(tc_table[0]))
- index = 0;
-
- return 0;
-}
-
-int
-Test_TypeCode::reset_parameters (void)
-{
- this->in_ = this->tc_holder_;
- this->inout_ = CORBA::TypeCode::_duplicate (CORBA::_tc_null);
- return 0;
-}
-
-int
-Test_TypeCode::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->init_parameters (objref ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::TypeCode_out out (this->out_);
-
- this->ret_ = objref->test_typecode (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_TypeCode::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_TypeCode::check_validity (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::Boolean one, two, three;
-
- one = this->in_.in ()->equal (this->inout_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- two = this->in_.in ()->equal (this->out_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- three = this->in_.in ()->equal (this->ret_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (one && two && three)
- return 1;
- else
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_TypeCode::check_validity\n");
- }
- ACE_ENDTRY;
- return 0;
-}
-
-CORBA::Boolean
-Test_TypeCode::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_TypeCode::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/typecode.h b/TAO/tests/Param_Test/typecode.h
deleted file mode 100644
index bb369324d6e..00000000000
--- a/TAO/tests/Param_Test/typecode.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// typecode.h
-//
-// = DESCRIPTION
-// Tests typecodes
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_TYPECODE_H
-#define PARAM_TEST_TYPECODE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test TypeCodes
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_TypeCode
-{
-public:
- Test_TypeCode (void);
- // ctor
-
- ~Test_TypeCode (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- CORBA::TypeCode_var tc_holder_;
- // place for selected typecode to stay during time
- // between init_parameters () and reset_parameters ().
-
- char *opname_;
- // operation name
-
- CORBA::TypeCode_var in_;
- // in parameter
-
- CORBA::TypeCode_var inout_;
- // inout parameter
-
- CORBA::TypeCode_var out_;
- // out parameter
-
- CORBA::TypeCode_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_TYPECODE_H */
diff --git a/TAO/tests/Param_Test/ub_any_seq.cpp b/TAO/tests/Param_Test/ub_any_seq.cpp
deleted file mode 100644
index dd5277d5924..00000000000
--- a/TAO/tests/Param_Test/ub_any_seq.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_any_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded Any sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_any_seq.h"
-#include "tao/debug.h"
-
-ACE_RCSID (Param_Test,
- ub_any_seq,
- "$Id$")
-
-const CORBA::ULong TEST_SEQ_LENGTH = 5;
-const CORBA::ULong NUM_TEST_TYPES = 4;
-
-// ************************************************************************
-// Test_AnySeq
-// ************************************************************************
-
-Test_AnySeq::Test_AnySeq (void)
- : opname_ (CORBA::string_dup ("test_anyseq")),
- in_ (new CORBA::AnySeq (TEST_SEQ_LENGTH)),
- inout_ (new CORBA::AnySeq (TEST_SEQ_LENGTH)),
- out_ (new CORBA::AnySeq),
- ret_ (new CORBA::AnySeq)
-{
-}
-
-Test_AnySeq::~Test_AnySeq (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_AnySeq::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_AnySeq::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_AnySeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::AnySeq* tmp;
- req->return_value () >>= tmp;
- this->ret_ = new CORBA::AnySeq (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new CORBA::AnySeq (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new CORBA::AnySeq (*tmp);
-}
-
-int
-Test_AnySeq::init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // Must be set explicitly (CORBA spec)
- this->in_->length (TEST_SEQ_LENGTH);
-
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
- {
- CORBA::ULong index =
- (CORBA::ULong) (gen->gen_short () % NUM_TEST_TYPES);
- switch (index)
- {
- case 0:
- {
- CORBA::Short s;
- s = gen->gen_short ();
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting short = %d\n", s));
- this->in_[i] <<= s;
- this->inout_[i] <<= 0; // different from in_
- }
- break;
- case 1:
- {
- CORBA::String_var str = gen->gen_string ();
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting string = %s\n", str.in ()));
- this->in_[i] <<= str.in ();
- this->inout_[i] <<= 0; // different from in_
- }
- break;
- case 2:
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting coffee object \n" ));
- ACE_TRY
- {
- // get access to a Coffee Object
- Coffee_var cobj = objref->make_coffee (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // insert the coffee object into the Any
- this->in_[i] <<= cobj.in ();
- this->inout_[i] <<= 0; // different from in_
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex,
- "System Exception doing make_coffee");
- return -1;
- }
- ACE_ENDTRY;
- }
- break;
- case 3:
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "setting constant string \n" ));
- this->in_[i] <<= "Const string";
- this->inout_[i] <<= 0; // different from in_
- break;
- }
- }
-
- return 0;
-}
-
-int
-Test_AnySeq::reset_parameters (void)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
- {
- CORBA::ULong index =
- (CORBA::ULong) (gen->gen_long () % NUM_TEST_TYPES);
-
- switch (index)
- {
- case 0:
- {
- CORBA::Short s;
- s = gen->gen_short ();
- this->in_[i] <<= s;
- this->inout_[i] <<= s;
- }
- break;
- case 1:
- {
- CORBA::String_var str = gen->gen_string ();
- this->in_[i] <<= str.in ();
- this->inout_[i] <<= str.in ();
- }
- break;
- case 2:
- {
- this->inout_[i] = this->in_[i];
- }
- break;
- case 3:
- this->in_[i] <<= "Const string";
- this->inout_[i] <<= "Const string";
- break;
- }
- }
-
- return 0;
-}
-
-
-int
-Test_AnySeq::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::AnySeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_anyseq (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_AnySeq::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_AnySeq::check_validity (void)
-{
- CORBA::Short short_in, short_inout, short_out, short_ret;
- const char *str_in;
- const char *str_inout;
- const char *str_out;
- const char *str_ret;
- Coffee_ptr obj_in, obj_inout, obj_out, obj_ret;
-
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
- {
- if ((this->in_[i] >>= short_in) &&
- (this->inout_[i] >>= short_inout) &&
- (this->out_[i] >>= short_out) &&
- (this->ret_[i] >>= short_ret))
- {
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Received shorts: in = %d, "
- "inout = %d, out = %d, ret = %d\n",
- short_in,
- short_inout,
- short_out,
- short_ret));
- }
-
- if ((short_in != short_inout) ||
- (short_in != short_out) ||
- (short_in != short_ret))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of short values\n"));
- return 0;
- }
- else
- continue;
- }
- else if ((this->in_[i] >>= str_in) &&
- (this->inout_[i] >>= str_inout) &&
- (this->out_[i] >>= str_out) &&
- (this->ret_[i] >>= str_ret))
- {
- if (ACE_OS::strcmp (str_in, str_inout) ||
- ACE_OS::strcmp (str_in, str_out) ||
- ACE_OS::strcmp (str_in, str_ret))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of string values\n"));
- return 0;
- }
- else
- continue;
- }
- else if ((this->in_[i] >>= obj_in) &&
- (this->inout_[i] >>= obj_inout) &&
- (this->out_[i] >>= obj_out) &&
- (this->ret_[i] >>= obj_ret))
- {
- if (!(obj_in->_is_equivalent (obj_inout)) ||
- !(obj_in->_is_equivalent (obj_out)) ||
- !(obj_in->_is_equivalent (obj_ret)))
- {
- ACE_DEBUG ((LM_DEBUG,
- "mismatch of Coffee values\n"));
- return 0;
- }
- }
- else
- continue;
- }
-
- // Everything checks out.
- return 1;
-}
-
-CORBA::Boolean
-Test_AnySeq::check_validity (CORBA::Request_ptr)
-{
- return this->check_validity ();
-}
-
-void
-Test_AnySeq::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "IN sequence\n"));
- this->print_sequence (this->in_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "INOUT sequence\n"));
- this->print_sequence (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "OUT sequence\n"));
- this->print_sequence (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "RET sequence\n"));
- this->print_sequence (this->ret_.in ());
-}
-
-void
-Test_AnySeq::print_sequence (const CORBA::AnySeq &s)
-{
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s.maximum (),
- s.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
- for (CORBA::ULong i=0; i < s.length (); i++)
- {
- /* const CORBA::Any& vs = s[i];
-
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "\tl = %d\n"
- "\tc = %c\n"
- "\ts = %d\n"
- "\to = %x\n"
- "\tf = %f\n"
- "\tb = %d\n"
- "\td = %f\n",
- i,
- vs.l, vs.c, vs.s, vs.o, vs.f, vs.b, vs.d));
- */
- }
-}
diff --git a/TAO/tests/Param_Test/ub_any_seq.h b/TAO/tests/Param_Test/ub_any_seq.h
deleted file mode 100644
index 3a2d6c72577..00000000000
--- a/TAO/tests/Param_Test/ub_any_seq.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_any_seq.h
-//
-// = DESCRIPTION
-// Tests unbounded Any sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_ANY_SEQUENCE_H
-#define PARAM_TEST_UNBOUNDED_ANY_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test sequences of Anys
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_AnySeq
-{
-public:
- Test_AnySeq (void);
- // ctor
-
- ~Test_AnySeq (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-protected:
- CORBA::Boolean compare (const CORBA::AnySeq &s1,
- const Param_Test::StructSeq &s2);
- // compare
-
- void print_sequence (const CORBA::AnySeq &s);
- // print individual sequence
-
-private:
- char *opname_;
- // operation name
-
- CORBA::AnySeq_var in_;
- // in parameter
-
- CORBA::AnySeq_var inout_;
- // inout parameter
-
- CORBA::AnySeq_var out_;
- // out parameter
-
- CORBA::AnySeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_ANY_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_array_seq.cpp b/TAO/tests/Param_Test/ub_array_seq.cpp
deleted file mode 100644
index 104c4885c74..00000000000
--- a/TAO/tests/Param_Test/ub_array_seq.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_array_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded array sequences
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_array_seq.h"
-
-ACE_RCSID (Param_Test,
- ub_array_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Array_Sequence
-// ************************************************************************
-
-Test_Array_Sequence::Test_Array_Sequence (void)
- : opname_ (CORBA::string_dup ("test_array_sequence")),
- inout_ (new Param_Test::ArraySeq),
- out_ (new Param_Test::ArraySeq),
- ret_ (new Param_Test::ArraySeq)
-{
-}
-
-Test_Array_Sequence::~Test_Array_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Array_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Array_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_ArraySeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::ArraySeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::ArraySeq (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::ArraySeq (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::ArraySeq (*tmp);
-}
-
-int
-Test_Array_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
-
- // set the length of the in sequence
- this->in_.length (len);
- // different from in_.
- this->inout_->length (1);
-
- // now set each individual element
- Param_Test::Fixed_Array tmp;
-
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- tmp[j] = gen->gen_long ();
- }
-
- Param_Test::Fixed_Array_copy (this->inout_[0], tmp);
-
- for (CORBA::ULong i = 0; i < this->in_.length (); i++)
- {
- // Generate some arbitrary array to be filled into the ith
- // location in the sequence.
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- tmp[j] = gen->gen_long ();
- }
-
- Param_Test::Fixed_Array_copy (this->in_[i], tmp);
- }
-
- return 0;
-}
-
-int
-Test_Array_Sequence::reset_parameters (void)
-{
- // Delete the previous ones.
- this->inout_ = new Param_Test::ArraySeq;
- this->out_ = new Param_Test::ArraySeq;
- this->ret_ = new Param_Test::ArraySeq;
- return 0;
-}
-
-int
-Test_Array_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::ArraySeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_array_sequence (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Array_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Array_Sequence::check_validity (void)
-{
- if (this->compare (this->in_, this->inout_.in ()) &&
- this->compare (this->in_, this->out_.in ()) &&
- this->compare (this->in_, this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Array_Sequence::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_Array_Sequence::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "IN array\n"));
- this->print_sequence (this->in_);
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "INOUT array\n"));
- this->print_sequence (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "OUT array\n"));
- this->print_sequence (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "RET array\n"));
- this->print_sequence (this->ret_.in ());
-}
-
-CORBA::Boolean
-Test_Array_Sequence::compare (const Param_Test::ArraySeq &s1,
- const Param_Test::ArraySeq &s2)
-{
- if (s1.maximum () != s2.maximum ())
- {
- return 0;
- }
-
- if (s1.length () != s2.length ())
- {
- return 0;
- }
-
- for (CORBA::ULong i = 0; i < s1.length (); i++)
- {
- const Param_Test::Fixed_Array& vs1 = s1[i];
- const Param_Test::Fixed_Array& vs2 = s2[i];
-
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- if (vs1[j] != vs2[j])
- {
- return 0;
- }
- }
- }
-
- return 1; // success
-}
-
-void
-Test_Array_Sequence::print_sequence (const Param_Test::ArraySeq &s)
-{
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s.maximum (),
- s.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
-
- for (CORBA::ULong i=0; i < s.length (); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d --\n",
- i));
-
- const Param_Test::Fixed_Array& vs = s[i];
-
- for (CORBA::ULong j = 0; j < Param_Test::DIM1; j++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element%d[%d] = %d\n",
- i,
- j,
- vs[j]));
- }
- }
-}
diff --git a/TAO/tests/Param_Test/ub_array_seq.h b/TAO/tests/Param_Test/ub_array_seq.h
deleted file mode 100644
index ce888926d2e..00000000000
--- a/TAO/tests/Param_Test/ub_array_seq.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_array_seq.h
-//
-// = DESCRIPTION
-// Tests unbounded array sequence
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNED_ARRAY_SEQUENCE_H
-#define PARAM_TEST_UNBOUNED_ARRAY_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test sequence of arrays
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Array_Sequence
-{
-public:
- Test_Array_Sequence (void);
- // ctor
-
- ~Test_Array_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-protected:
- CORBA::Boolean compare (const Param_Test::ArraySeq &s1,
- const Param_Test::ArraySeq &s2);
- // compare
-
- void print_sequence (const Param_Test::ArraySeq &s);
- // print individual sequence
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::ArraySeq in_;
- // in parameter
-
- // these need memory management
- Param_Test::ArraySeq_var inout_;
- // inout parameter
-
- Param_Test::ArraySeq_var out_;
- // out parameter
-
- Param_Test::ArraySeq_var ret_;
- // return value
-};
-
-
-#endif /* PARAM_TEST_UNBOUNED_ARRAY_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_long_seq.cpp b/TAO/tests/Param_Test/ub_long_seq.cpp
deleted file mode 100644
index 32ef0cba131..00000000000
--- a/TAO/tests/Param_Test/ub_long_seq.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_long_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded long sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_long_seq.h"
-
-ACE_RCSID (Param_Test,
- ub_long_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Long_Sequence
-// ************************************************************************
-
-Test_Long_Sequence::Test_Long_Sequence (void)
- : opname_ (CORBA::string_dup ("test_long_sequence")),
- in_ (new CORBA::LongSeq),
- inout_ (new CORBA::LongSeq),
- out_ (new CORBA::LongSeq),
- ret_ (new CORBA::LongSeq)
-{
-}
-
-Test_Long_Sequence::~Test_Long_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Long_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Long_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_LongSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::LongSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = CORBA::LongSeq (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = CORBA::LongSeq (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = CORBA::LongSeq (*tmp);
-}
-
-int
-Test_Long_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
-
- // set the length of the sequence
- this->in_->length (len);
- this->inout_->length (len);
- // now set each individual element
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
- {
- this->in_[i] = i;
- this->inout_[i] = i+1;
- }
- return 0;
-}
-
-int
-Test_Long_Sequence::reset_parameters (void)
-{
- this->inout_ = new CORBA::LongSeq; // delete the previous ones
- this->out_ = new CORBA::LongSeq;
- this->ret_ = new CORBA::LongSeq;
- return 0;
-}
-
-int
-Test_Long_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::LongSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_long_sequence (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Long_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Long_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (this->in_[i] != this->inout_[i] ||
- this->in_[i] != this->out_[i] ||
- this->in_[i] != this->ret_[i])
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Long_Sequence::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_Long_Sequence::print_values (void)
-{
- CORBA::ULong i;
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->in_.ptr () && (i < this->in_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->in_[i]));
- }
- if (!this->in_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->inout_.ptr () && (i < this->inout_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->inout_[i]));
- }
- if (!this->inout_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->out_.ptr () && (i < this->out_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->out_[i]));
- }
- if (!this->out_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->ret_.ptr () && (i < this->ret_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->ret_[i]));
- }
- if (!this->ret_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-}
diff --git a/TAO/tests/Param_Test/ub_long_seq.h b/TAO/tests/Param_Test/ub_long_seq.h
deleted file mode 100644
index 6cfdef9dc3d..00000000000
--- a/TAO/tests/Param_Test/ub_long_seq.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_long_seq.h
-//
-// = DESCRIPTION
-// Tests unbounded long sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_LONG_SEQUENCE_H
-#define PARAM_TEST_UNBOUNDED_LONG_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test sequences of longs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Long_Sequence
-{
-public:
- Test_Long_Sequence (void);
- // ctor
-
- ~Test_Long_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::LongSeq_var in_;
- // in parameter
-
- CORBA::LongSeq_var inout_;
- // inout parameter
-
- CORBA::LongSeq_var out_;
- // out parameter
-
- CORBA::LongSeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_LONG_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_objref_seq.cpp b/TAO/tests/Param_Test/ub_objref_seq.cpp
deleted file mode 100644
index d15d6f0baac..00000000000
--- a/TAO/tests/Param_Test/ub_objref_seq.cpp
+++ /dev/null
@@ -1,318 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_objref_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded objref sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_objref_seq.h"
-
-ACE_RCSID (Param_Test,
- ub_objref_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_ObjRef_Sequence
-// ************************************************************************
-
-static const char *Coffee_Flavor [] = {
- "Italian Roast",
- "Irish Creme",
- "Costa Rican",
- "Colombian Supremo",
- "Macademia Nut",
- "Swiss Chocolate Mocha"
-};
-
-Test_ObjRef_Sequence::Test_ObjRef_Sequence (void)
- : opname_ (CORBA::string_dup ("test_coffe_mix")),
- inout_ (new Param_Test::Coffee_Mix),
- out_ (new Param_Test::Coffee_Mix),
- ret_ (new Param_Test::Coffee_Mix)
-{
-}
-
-Test_ObjRef_Sequence::~Test_ObjRef_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_ObjRef_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_ObjRef_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Coffee_Mix);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Coffee_Mix *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Coffee_Mix (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::Coffee_Mix (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::Coffee_Mix (*tmp);
-}
-
-int
-Test_ObjRef_Sequence::init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Coffee::Desc desc;
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 5) + 5;
-
- // set the length of the sequence
- this->in_.length (len);
- // now set each individual element
-
- for (CORBA::ULong i = 0; i < this->in_.length (); i++)
- {
- // generate some arbitrary string to be filled into the ith location in
- // the sequence
- this->in_[i] = objref->make_coffee (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // select a Coffee flavor at random
- CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
-
- desc.name = Coffee_Flavor [index];
- // set the attribute for the in object
- Coffee_ptr tmp = this->in_[i];
-
- tmp->description (desc
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_ObjRef_Sequence::init_parameters\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-int
-Test_ObjRef_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Coffee_Mix; // delete the previous ones
- this->out_ = new Param_Test::Coffee_Mix;
- this->ret_ = new Param_Test::Coffee_Mix;
- return 0;
-}
-
-int
-Test_ObjRef_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Coffee_Mix_out out (this->out_.out ());
-
- this->ret_ = objref->test_coffe_mix (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_ObjRef_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_ObjRef_Sequence::check_validity (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- this->compare (this->in_,
- this->inout_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->compare (this->in_,
- this->out_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->compare (this->in_,
- this->ret_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_ObjRef_Sequence::check_validity");
-
- }
- ACE_ENDTRY;
- return 0;
-}
-
-CORBA::Boolean
-Test_ObjRef_Sequence::check_validity (CORBA::Request_ptr )
-{
- //ACE_UNUSED_ARG (req);
- return this->check_validity ();
-}
-
-void
-Test_ObjRef_Sequence::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "IN sequence\n"));
- this->print_sequence (this->in_);
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "INOUT sequence\n"));
- this->print_sequence (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "OUT sequence\n"));
- this->print_sequence (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "RET sequence\n"));
- this->print_sequence (this->ret_.in ());
-}
-
-CORBA::Boolean
-Test_ObjRef_Sequence::compare (const Param_Test::Coffee_Mix &s1,
- const Param_Test::Coffee_Mix &s2
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- if (s1.maximum () != s2.maximum ())
- {
- return 0;
- }
- if (s1.length () != s2.length ())
- {
- return 0;
- }
-
- for (CORBA::ULong i=0; i < s1.length (); i++)
- {
- Coffee_ptr vs1 = s1[i];
- Coffee_ptr vs2 = s2[i];
-
- if (CORBA::is_nil (vs1) && CORBA::is_nil (vs2))
- {
- continue;
- }
-
- if (CORBA::is_nil (vs1) || CORBA::is_nil (vs2))
- {
- return 0;
- }
-
- Coffee::Desc_var desc1 = vs1->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var n1 = desc1->name.in ();
-
- Coffee::Desc_var desc2 = vs2->description (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var n2 = desc2->name.in ();
-
- if (ACE_OS::strcmp(n1.in (), n2.in ()) != 0)
- {
- return 0;
- }
- }
-
- return 1; // success
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_ObjRef_Sequence::compare");
-
- }
- ACE_ENDTRY;
- return 0;
-}
-
-void
-Test_ObjRef_Sequence::print_sequence (const Param_Test::Coffee_Mix &s)
-{
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s.maximum (),
- s.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
- for (CORBA::ULong i=0; i < s.length (); i++)
- {
- Coffee_ptr c = s[i];
- if (CORBA::is_nil (c))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d is nil\n", i));
- continue;
- }
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "\ttype = <%s>\n",
- i,
- c->_interface_repository_id ()));
- }
-}
diff --git a/TAO/tests/Param_Test/ub_objref_seq.h b/TAO/tests/Param_Test/ub_objref_seq.h
deleted file mode 100644
index f087101b08b..00000000000
--- a/TAO/tests/Param_Test/ub_objref_seq.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_objref_seq.h
-//
-// = DESCRIPTION
-// Tests unbounded sequences of object references
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_OBJREF_SEQUENCE_H
-#define PARAM_TEST_UNBOUNDED_OBJREF_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test sequence of object references
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_ObjRef_Sequence
-{
-public:
- Test_ObjRef_Sequence (void);
- // ctor
-
- ~Test_ObjRef_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-protected:
- CORBA::Boolean compare (const Param_Test::Coffee_Mix &s1,
- const Param_Test::Coffee_Mix &s2
- ACE_ENV_ARG_DECL);
- // compare
-
- void print_sequence (const Param_Test::Coffee_Mix &s);
- // print individual sequence
-private:
- char *opname_;
- // operation name
-
- Param_Test::Coffee_Mix in_;
- // in parameter
-
- // these need memory management
- Param_Test::Coffee_Mix_var inout_;
- // inout parameter
-
- Param_Test::Coffee_Mix_var out_;
- // out parameter
-
- Param_Test::Coffee_Mix_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_OBJREF_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_short_seq.cpp b/TAO/tests/Param_Test/ub_short_seq.cpp
deleted file mode 100644
index c7740c69fdb..00000000000
--- a/TAO/tests/Param_Test/ub_short_seq.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_short_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded short sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_short_seq.h"
-
-ACE_RCSID (Param_Test,
- ub_short_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Short_Sequence
-// ************************************************************************
-
-Test_Short_Sequence::Test_Short_Sequence (void)
- : opname_ (CORBA::string_dup ("test_short_sequence")),
- in_ (new CORBA::ShortSeq),
- inout_ (new CORBA::ShortSeq),
- out_ (new CORBA::ShortSeq),
- ret_ (new CORBA::ShortSeq)
-{
-}
-
-Test_Short_Sequence::~Test_Short_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Short_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Short_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_ShortSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ShortSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new CORBA::ShortSeq (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new CORBA::ShortSeq (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new CORBA::ShortSeq (*tmp);
-}
-
-int
-Test_Short_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
-
- // set the length of the sequence
- this->in_->length (len);
- this->inout_->length (len);
- // now set each individual element
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
- {
- // generate some arbitrary string to be filled into the ith location in
- // the sequence
- this->in_[i] = i;
- this->inout_[i] = i+1;
- }
- return 0;
-}
-
-int
-Test_Short_Sequence::reset_parameters (void)
-{
- this->inout_ = new CORBA::ShortSeq; // delete the previous ones
- this->out_ = new CORBA::ShortSeq;
- this->ret_ = new CORBA::ShortSeq;
- return 0;
-}
-
-int
-Test_Short_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::ShortSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_short_sequence (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Short_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Short_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (this->in_[i] != this->inout_[i] ||
- this->in_[i] != this->out_[i] ||
- this->in_[i] != this->ret_[i])
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Short_Sequence::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_Short_Sequence::print_values (void)
-{
- CORBA::ULong i;
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->in_.ptr () && (i < this->in_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->in_[i]));
- }
- if (!this->in_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->inout_.ptr () && (i < this->inout_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->inout_[i]));
- }
- if (!this->inout_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->out_.ptr () && (i < this->out_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->out_[i]));
- }
- if (!this->out_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->ret_.ptr () && (i < this->ret_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %d\n",
- i,
- this->ret_[i]));
- }
- if (!this->ret_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-}
diff --git a/TAO/tests/Param_Test/ub_short_seq.h b/TAO/tests/Param_Test/ub_short_seq.h
deleted file mode 100644
index 7cf0a4499f5..00000000000
--- a/TAO/tests/Param_Test/ub_short_seq.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_short_seq.h
-//
-// = DESCRIPTION
-// Tests unbounded short sequence
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_SHORT_SEQUENCE_H
-#define PARAM_TEST_UNBOUNDED_SHORT_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test sequences of shorts
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Short_Sequence
-{
-public:
- Test_Short_Sequence (void);
- // ctor
-
- ~Test_Short_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::ShortSeq_var in_;
- // in parameter
-
- CORBA::ShortSeq_var inout_;
- // inout parameter
-
- CORBA::ShortSeq_var out_;
- // out parameter
-
- CORBA::ShortSeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_SHORT_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_str_seq.cpp b/TAO/tests/Param_Test/ub_str_seq.cpp
deleted file mode 100644
index 730701506f0..00000000000
--- a/TAO/tests/Param_Test/ub_str_seq.cpp
+++ /dev/null
@@ -1,220 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_str_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded string sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_str_seq.h"
-
-ACE_RCSID (Param_Test,
- ub_str_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_String_Sequence
-// ************************************************************************
-
-Test_String_Sequence::Test_String_Sequence (void)
- : opname_ (CORBA::string_dup ("test_strseq")),
- in_ (new CORBA::StringSeq),
- inout_ (new CORBA::StringSeq),
- out_ (new CORBA::StringSeq),
- ret_ (new CORBA::StringSeq)
-{
-}
-
-Test_String_Sequence::~Test_String_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_String_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_String_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_StringSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::StringSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new CORBA::StringSeq (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new CORBA::StringSeq (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new CORBA::StringSeq (*tmp);
-}
-
-int
-Test_String_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- const char *choiceList[] =
- {
- "one",
- "two",
- "three",
- "four"
- };
-
- CORBA::ULong len = sizeof(choiceList)/sizeof(char *) - 1;
-
- // set the length of the sequences
- this->in_->length (len);
- this->inout_->length (len);
-
- // now set each individual element
- for (CORBA::ULong i=0; i < this->in_->length (); i++)
- {
- this->in_[i] = choiceList[i];
- this->inout_[i] = choiceList[i+1];
- }
- return 0;
-}
-
-int
-Test_String_Sequence::reset_parameters (void)
-{
- this->inout_ = new CORBA::StringSeq; // delete the previous ones
- this->out_ = new CORBA::StringSeq;
- this->ret_ = new CORBA::StringSeq;
- return 0;
-}
-
-int
-Test_String_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::StringSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_strseq (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_String_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_String_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (ACE_OS::strcmp(this->in_[i], this->inout_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->out_[i]) ||
- ACE_OS::strcmp(this->in_[i], this->ret_[i]))
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_String_Sequence::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_String_Sequence::print_values (void)
-{
- CORBA::ULong i;
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->in_.ptr () && (i < this->in_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- this->in_[i]? (const char *)this->in_[i]:"<nul>"));
- }
- if (!this->in_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->inout_.ptr () && (i < this->inout_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->inout_[i]? (const char *)this->inout_[i]:"<nul>")));
- }
- if (!this->inout_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\ninout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->out_.ptr () && (i < this->out_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->out_[i]? (const char *)this->out_[i]:"<nul>")));
- }
- if (!this->out_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nout sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->ret_.ptr () && (i < this->ret_->length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->ret_[i]? (const char *)this->ret_[i]:"<nul>")));
- }
- if (!this->ret_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nin sequence is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-}
diff --git a/TAO/tests/Param_Test/ub_str_seq.h b/TAO/tests/Param_Test/ub_str_seq.h
deleted file mode 100644
index 069bdf2351e..00000000000
--- a/TAO/tests/Param_Test/ub_str_seq.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_str_seq.h
-//
-// = DESCRIPTION
-// Tests sequences of strings
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_STRING_SEQUENCE_H
-#define PARAM_TEST_UNBOUNDED_STRING_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test typedefed sequences (in our case, sequences of strings)
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_String_Sequence
-{
-public:
- Test_String_Sequence (void);
- // ctor
-
- ~Test_String_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::StringSeq_var in_;
- // in parameter
-
- CORBA::StringSeq_var inout_;
- // inout parameter
-
- CORBA::StringSeq_var out_;
- // out parameter
-
- CORBA::StringSeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_STRING_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_string.cpp b/TAO/tests/Param_Test/ub_string.cpp
deleted file mode 100644
index 1392df320c0..00000000000
--- a/TAO/tests/Param_Test/ub_string.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_string.cpp
-//
-// = DESCRIPTION
-// tests unbounded strings
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_string.h"
-
-ACE_RCSID (Param_Test,
- ub_string,
- "$Id$")
-
-// ************************************************************************
-// Test_Unbounded_String
-// ************************************************************************
-
-Test_Unbounded_String::Test_Unbounded_String (void)
- : opname_ (CORBA::string_dup ("test_unbounded_string")),
- in_ (0),
- inout_ (0),
- out_ (0),
- ret_ (0)
-{
-}
-
-Test_Unbounded_String::~Test_Unbounded_String (void)
-{
- CORBA::string_free (this->opname_);
- CORBA::string_free (this->in_);
- CORBA::string_free (this->inout_);
- CORBA::string_free (this->out_);
- CORBA::string_free (this->ret_);
- this->opname_ = 0;
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-}
-
-const char *
-Test_Unbounded_String::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Unbounded_String::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_;
-
- // The Any arg manages its memory but this class member does not.
- CORBA::string_free (this->inout_);
-
- req->set_return_type (CORBA::_tc_string);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *tmp;
- req->return_value () >>= tmp;
- this->ret_ = CORBA::string_dup (tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = CORBA::string_dup (tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = CORBA::string_dup (tmp);
-}
-
-int
-Test_Unbounded_String::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
-
- // release any previously occupied values
- CORBA::string_free (this->in_);
- CORBA::string_free (this->inout_);
- CORBA::string_free (this->out_);
- CORBA::string_free (this->ret_);
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->in_ = gen->gen_string ();
- this->inout_ = CORBA::string_dup (this->in_);
- return 0;
-}
-
-int
-Test_Unbounded_String::reset_parameters (void)
-{
- // release any previously occupied values
- CORBA::string_free (this->inout_);
- CORBA::string_free (this->out_);
- CORBA::string_free (this->ret_);
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->inout_ = CORBA::string_dup (this->in_);
- return 0;
-}
-
-int
-Test_Unbounded_String::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::String_out str_out (this->out_);
-
- this->ret_ = objref->test_unbounded_string (this->in_,
- this->inout_,
- str_out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Unbounded_String::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Unbounded_String::check_validity (void)
-{
- CORBA::ULong len = ACE_OS::strlen (this->in_);
-
- if (!ACE_OS::strcmp (this->in_, this->out_) &&
- !ACE_OS::strcmp (this->in_, this->ret_) &&
- ACE_OS::strlen (this->inout_) == 2*len &&
- !ACE_OS::strncmp (this->in_, this->inout_, len) &&
- !ACE_OS::strncmp (this->in_, &this->inout_[len], len))
- return 1;
-
- return 0; // otherwise
-}
-
-CORBA::Boolean
-Test_Unbounded_String::check_validity (CORBA::Request_ptr )
-{
- // No need to retrieve anything because, for all the args and
- // the return, we provided the memory and we own it.
- return this->check_validity ();
-}
-
-void
-Test_Unbounded_String::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*\n"
- "in with len (%d) = %s\n"
- "inout with len (%d) = %s\n"
- "out with len (%d) = %s\n"
- "ret with len (%d) = %s\n"
- "\n=*=*=*=*=*=*\n",
- (this->in_ ? ACE_OS::strlen (this->in_):0),
- (this->in_ ? this->in_:"<nul string>"),
- (this->inout_ ? ACE_OS::strlen (this->inout_):0),
- (this->inout_ ? this->inout_:"<nul string>"),
- (this->out_ ? ACE_OS::strlen (this->out_):0),
- (this->out_ ? this->out_:"<nul string>"),
- (this->ret_ ? ACE_OS::strlen (this->ret_):0),
- (this->ret_ ? this->ret_:"<nul string>")));
-}
diff --git a/TAO/tests/Param_Test/ub_string.h b/TAO/tests/Param_Test/ub_string.h
deleted file mode 100644
index ed721972028..00000000000
--- a/TAO/tests/Param_Test/ub_string.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// unbounded_string.h
-//
-// = DESCRIPTION
-// Tests unbounded string
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_STRING_H
-#define PARAM_TEST_UNBOUNDED_STRING_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test unbounded strings
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Unbounded_String
-{
-public:
- Test_Unbounded_String (void);
- // ctor
-
- ~Test_Unbounded_String (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- char *in_;
- // in parameter
-
- char *inout_;
- // inout parameter
-
- char *out_;
- // out parameter
-
- char *ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_STRING_H */
diff --git a/TAO/tests/Param_Test/ub_struct_seq.cpp b/TAO/tests/Param_Test/ub_struct_seq.cpp
deleted file mode 100644
index 805ecf71579..00000000000
--- a/TAO/tests/Param_Test/ub_struct_seq.cpp
+++ /dev/null
@@ -1,417 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_struct_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded struct sequences
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_struct_seq.h"
-
-ACE_RCSID (Param_Test,
- ub_struct_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_Struct_Sequence
-// ************************************************************************
-
-Test_Struct_Sequence::Test_Struct_Sequence (void)
- : opname_ (CORBA::string_dup ("test_struct_sequence")),
- inout_ (new Param_Test::StructSeq),
- out_ (new Param_Test::StructSeq),
- ret_ (new Param_Test::StructSeq)
-{
-}
-
-Test_Struct_Sequence::~Test_Struct_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Struct_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Struct_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_StructSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::StructSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::StructSeq (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::StructSeq (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::StructSeq (*tmp);
-}
-
-int
-Test_Struct_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
-
- // set the length of the sequence
- this->in_.length (len);
- this->inout_->length (len);
- // now set each individual element
- for (CORBA::ULong i = 0; i < this->in_.length (); i++)
- {
- // generate some arbitrary struct to be filled into the ith location in
- // the sequence
- this->in_[i] = gen->gen_fixed_struct ();
- this->inout_[i] = gen->gen_fixed_struct ();
- }
- return 0;
-}
-
-int
-Test_Struct_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::StructSeq; // delete the previous one
- this->out_ = new Param_Test::StructSeq;
- this->ret_ = new Param_Test::StructSeq;
- return 0;
-}
-
-int
-Test_Struct_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::StructSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_struct_sequence (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Struct_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Struct_Sequence::check_validity (void)
-{
- if (this->compare (this->in_, this->inout_.in ()) &&
- this->compare (this->in_, this->out_.in ()) &&
- this->compare (this->in_, this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Struct_Sequence::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_Struct_Sequence::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "IN sequence\n"));
- this->print_sequence (this->in_);
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "INOUT sequence\n"));
- this->print_sequence (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "OUT sequence\n"));
- this->print_sequence (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "RET sequence\n"));
- this->print_sequence (this->ret_.in ());
-}
-
-CORBA::Boolean
-Test_Struct_Sequence::compare (const Param_Test::StructSeq &s1,
- const Param_Test::StructSeq &s2)
-{
- if (s1.maximum () != s2.maximum ())
- return 0;
- if (s1.length () != s2.length ())
- return 0;
-
- for (CORBA::ULong i=0; i < s1.length (); i++)
- {
- const Param_Test::Fixed_Struct& vs1 = s1[i];
- const Param_Test::Fixed_Struct& vs2 = s2[i];
-
- if (vs1.l != vs2.l
- || vs1.c != vs2.c
- || vs1.s != vs2.s
- || vs1.o != vs2.o
- || vs1.f != vs2.f
- || vs1.b != vs2.b
- || vs1.d != vs2.d )
- return 0;
- }
-
- return 1; // success
-}
-
-void
-Test_Struct_Sequence::print_sequence (const Param_Test::StructSeq &s)
-{
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s.maximum (),
- s.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
- for (CORBA::ULong i=0; i < s.length (); i++)
- {
- const Param_Test::Fixed_Struct& vs = s[i];
-
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "\tl = %d\n"
- "\tc = %c\n"
- "\ts = %d\n"
- "\to = %x\n"
- "\tf = %f\n"
- "\tb = %d\n"
- "\td = %f\n",
- i,
- vs.l, vs.c, vs.s, vs.o, vs.f, vs.b, vs.d));
- }
-}
-
-
-// ************************************************************************
-// Test_Unbounded_Struct_Sequence
-// ************************************************************************
-
-Test_Unbounded_Struct_Sequence::Test_Unbounded_Struct_Sequence (void)
- : opname_ (CORBA::string_dup ("test_unbounded_struct_sequence")),
- inout_ (new Param_Test::PathSpec),
- out_ (new Param_Test::PathSpec),
- ret_ (new Param_Test::PathSpec)
-{
-}
-
-Test_Unbounded_Struct_Sequence::~Test_Unbounded_Struct_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Unbounded_Struct_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Unbounded_Struct_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_PathSpec);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::PathSpec *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::PathSpec (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::PathSpec (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::PathSpec (*tmp);
-}
-
-int
-Test_Unbounded_Struct_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
-
- // set the length of the sequence
- this->in_.length (len);
- this->inout_->length (len);
- // now set each individual element
-
- for (CORBA::ULong i = 0; i < this->in_.length (); i++)
- {
- // generate some arbitrary string to be filled into the ith location in
- // the sequence
- this->in_[i] = gen->gen_step ();
- this->inout_[i] = gen->gen_step ();
- }
- return 0;
-}
-
-int
-Test_Unbounded_Struct_Sequence::reset_parameters (void)
-{
- this->inout_ = new Param_Test::PathSpec; // delete the previous one
- this->out_ = new Param_Test::PathSpec;
- this->ret_ = new Param_Test::PathSpec;
- return 0;
-}
-
-int
-Test_Unbounded_Struct_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- Param_Test::PathSpec_out out (this->out_.out ());
- this->ret_ = objref->test_unbounded_struct_sequence (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-CORBA::Boolean
-Test_Unbounded_Struct_Sequence::check_validity (void)
-{
- if (this->compare (this->in_, this->inout_.in ()) &&
- this->compare (this->in_, this->out_.in ()) &&
- this->compare (this->in_, this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Unbounded_Struct_Sequence::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_Unbounded_Struct_Sequence::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "IN sequence\n"));
- this->print_sequence (this->in_);
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "INOUT sequence\n"));
- this->print_sequence (this->inout_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "OUT sequence\n"));
- this->print_sequence (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG,
- "*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n"
- "RET sequence\n"));
- this->print_sequence (this->ret_.in ());
-}
-
-CORBA::Boolean
-Test_Unbounded_Struct_Sequence::compare (const Param_Test::PathSpec &s1,
- const Param_Test::PathSpec &s2)
-{
- if (s1.maximum () != s2.maximum ())
- return 0;
- if (s1.length () != s2.length ())
- return 0;
-
- for (CORBA::ULong i=0; i < s1.length (); i++)
- {
- const Param_Test::Step& vs1 = s1[i];
- const Param_Test::Step& vs2 = s2[i];
-
- if (ACE_OS::strcmp (vs1.name.id.in (), vs2.name.id.in ())
- || ACE_OS:: strcmp (vs1.name.kind.in (), vs2.name.kind.in ())
- || vs1.process != vs2.process)
- return 0;
- }
- return 1; // success
-}
-
-void
-Test_Unbounded_Struct_Sequence::print_sequence (const Param_Test::PathSpec &s)
-{
- ACE_DEBUG ((LM_DEBUG,
- "maximum = %d\n"
- "length = %d\n",
- s.maximum (),
- s.length ()));
- ACE_DEBUG ((LM_DEBUG, "Elements -\n"));
- for (CORBA::ULong i=0; i < s.length (); i++)
- {
- const Param_Test::Step& vs = s[i];
-
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "\tname.id = %s\n"
- "\tname.kind = %s\n"
- "\tprocess = %d\n",
- i,
- vs.name.id.in (), vs.name.kind.in (), vs.process));
- }
-}
diff --git a/TAO/tests/Param_Test/ub_struct_seq.h b/TAO/tests/Param_Test/ub_struct_seq.h
deleted file mode 100644
index 00ce057526d..00000000000
--- a/TAO/tests/Param_Test/ub_struct_seq.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_struct_seq.h
-//
-// = DESCRIPTION
-// Tests unbounded struct sequence
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNED_STRUCT_SEQUENCE_H
-#define PARAM_TEST_UNBOUNED_STRUCT_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test sequence of structs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Struct_Sequence
-{
-public:
- Test_Struct_Sequence (void);
- // ctor
-
- ~Test_Struct_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-protected:
- CORBA::Boolean compare (const Param_Test::StructSeq &s1,
- const Param_Test::StructSeq &s2);
- // compare
-
- void print_sequence (const Param_Test::StructSeq &s);
- // print individual sequence
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::StructSeq in_;
- // in parameter
-
- // these need memory management
- Param_Test::StructSeq_var inout_;
- // inout parameter
-
- Param_Test::StructSeq_var out_;
- // out parameter
-
- Param_Test::StructSeq_var ret_;
- // return value
-};
-
-
-
-class Test_Unbounded_Struct_Sequence
-{
-public:
- Test_Unbounded_Struct_Sequence (void);
- // ctor
-
- ~Test_Unbounded_Struct_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-protected:
- CORBA::Boolean compare (const Param_Test::PathSpec &s1,
- const Param_Test::PathSpec &s2);
- // compare
-
- void print_sequence (const Param_Test::PathSpec &s);
- // print individual sequence
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::PathSpec in_;
- // in parameter
-
- // these need memory management
- Param_Test::PathSpec_var inout_;
- // inout parameter
-
- Param_Test::PathSpec_var out_;
- // out parameter
-
- Param_Test::PathSpec_var ret_;
- // return value
-};
-
-
-#endif /* PARAM_TEST_UNBOUNED_STRUCT_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_wstr_seq.cpp b/TAO/tests/Param_Test/ub_wstr_seq.cpp
deleted file mode 100644
index e082cc19817..00000000000
--- a/TAO/tests/Param_Test/ub_wstr_seq.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_wstr_seq.cpp
-//
-// = DESCRIPTION
-// tests unbounded wide string sequences
-//
-// = AUTHORS
-// Jeff Parsons
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_wstr_seq.h"
-#include "ace/OS_NS_wchar.h"
-
-ACE_RCSID (Param_Test,
- ub_wstr_seq,
- "$Id$")
-
-// ************************************************************************
-// Test_WString_Sequence
-// ************************************************************************
-
-Test_WString_Sequence::Test_WString_Sequence (void)
- : opname_ (CORBA::string_dup ("test_wstrseq")),
- in_ (new CORBA::WStringSeq),
- inout_ (new CORBA::WStringSeq),
- out_ (new CORBA::WStringSeq),
- ret_ (new CORBA::WStringSeq)
-{
-}
-
-Test_WString_Sequence::~Test_WString_Sequence (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_WString_Sequence::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_WString_Sequence::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_.in ();
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (CORBA::_tc_WStringSeq);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::WStringSeq *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new CORBA::WStringSeq (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new CORBA::WStringSeq (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new CORBA::WStringSeq (*tmp);
-}
-
-int
-Test_WString_Sequence::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- CORBA::ULong len = 2;
-
- // set the length of the sequences
- this->in_->length (len);
- this->inout_->length (len);
-
- // now set each individual element
- for (CORBA::ULong i = 0; i < this->in_->length (); i++)
- {
- this->in_[i] = gen->gen_wstring ();
- this->inout_[i] = gen->gen_wstring ();
- }
-
- return 0;
-}
-
-int
-Test_WString_Sequence::reset_parameters (void)
-{
- this->inout_ = new CORBA::WStringSeq; // delete the previous ones
- this->out_ = new CORBA::WStringSeq;
- this->ret_ = new CORBA::WStringSeq;
- return 0;
-}
-
-int
-Test_WString_Sequence::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::WStringSeq_out out (this->out_.out ());
-
- this->ret_ = objref->test_wstrseq (this->in_.in (),
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_WString_Sequence::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_WString_Sequence::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if ((this->in_->length () == this->inout_->length ()) &&
- (this->in_->length () == this->out_->length ()) &&
- (this->in_->length () == this->ret_->length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_->length () && flag; i++)
- {
- if (ACE_OS::wscmp (this->in_[i], this->inout_[i]) ||
- ACE_OS::wscmp (this->in_[i], this->out_[i]) ||
- ACE_OS::wscmp (this->in_[i], this->ret_[i]))
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_WString_Sequence::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_WString_Sequence::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/ub_wstr_seq.h b/TAO/tests/Param_Test/ub_wstr_seq.h
deleted file mode 100644
index 6c212efc388..00000000000
--- a/TAO/tests/Param_Test/ub_wstr_seq.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_wstr_seq.h
-//
-// = DESCRIPTION
-// Tests sequences of wide strings
-//
-// = AUTHORS
-// Jeff Parsons
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_WSTRING_SEQUENCE_H
-#define PARAM_TEST_UNBOUNDED_WSTRING_SEQUENCE_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test typedefed sequences (in our case, sequences of wstrings)
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_WString_Sequence
-{
-public:
- Test_WString_Sequence (void);
- // ctor
-
- ~Test_WString_Sequence (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::WStringSeq_var in_;
- // in parameter
-
- CORBA::WStringSeq_var inout_;
- // inout parameter
-
- CORBA::WStringSeq_var out_;
- // out parameter
-
- CORBA::WStringSeq_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_WSTRING_SEQUENCE_H */
diff --git a/TAO/tests/Param_Test/ub_wstring.cpp b/TAO/tests/Param_Test/ub_wstring.cpp
deleted file mode 100644
index a74134ff06b..00000000000
--- a/TAO/tests/Param_Test/ub_wstring.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_wstring.cpp
-//
-// = DESCRIPTION
-// tests unbounded wide strings
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ub_wstring.h"
-#include "ace/OS_NS_wchar.h"
-
-ACE_RCSID (Param_Test,
- ub_wstring,
- "$Id$")
-
-// ************************************************************************
-// Test_Unbounded_WString
-// ************************************************************************
-
-Test_Unbounded_WString::Test_Unbounded_WString (void)
- : opname_ (CORBA::string_dup ("test_unbounded_wstring")),
- in_ (0),
- inout_ (0),
- out_ (0),
- ret_ (0)
-{
-}
-
-Test_Unbounded_WString::~Test_Unbounded_WString (void)
-{
- CORBA::string_free (this->opname_);
- CORBA::wstring_free (this->in_);
- CORBA::wstring_free (this->inout_);
- CORBA::wstring_free (this->out_);
- CORBA::wstring_free (this->ret_);
- this->opname_ = 0;
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-}
-
-const char *
-Test_Unbounded_WString::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Unbounded_WString::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_;
-
- // The Any arg manages its memory but this class member does not.
- CORBA::wstring_free (this->inout_);
-
- req->set_return_type (CORBA::_tc_wstring);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const CORBA::WChar *tmp;
- req->return_value () >>= tmp;
- this->ret_ = CORBA::wstring_dup (tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = CORBA::wstring_dup (tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = CORBA::wstring_dup (tmp);
-}
-
-int
-Test_Unbounded_WString::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // release any previously occupied values
- CORBA::wstring_free (this->in_);
- CORBA::wstring_free (this->inout_);
- CORBA::wstring_free (this->out_);
- CORBA::wstring_free (this->ret_);
- this->in_ = 0;
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->in_ = gen->gen_wstring ();
- this->inout_ = CORBA::wstring_dup (this->in_);
- return 0;
-}
-
-int
-Test_Unbounded_WString::reset_parameters (void)
-{
- // release any previously occupied values
- CORBA::wstring_free (this->inout_);
- CORBA::wstring_free (this->out_);
- CORBA::wstring_free (this->ret_);
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
-
- this->inout_ = CORBA::wstring_dup (this->in_);
- return 0;
-}
-
-int
-Test_Unbounded_WString::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- CORBA::WString_out str_out (this->out_);
-
- this->ret_ = objref->test_unbounded_wstring (this->in_,
- this->inout_,
- str_out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Unbounded_WString::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Unbounded_WString::check_validity (void)
-{
- CORBA::ULong len = ACE_OS::wslen (this->in_);
-
- if (!ACE_OS::wscmp (this->in_, this->out_) &&
- !ACE_OS::wscmp (this->in_, this->ret_) &&
- ACE_OS::wslen (this->inout_) == 2*len &&
- !ACE_OS::wsncmp (this->in_, this->inout_, len) &&
- !ACE_OS::wsncmp (this->in_, &this->inout_[len], len))
- return 1;
-
- return 0; // otherwise
-}
-
-CORBA::Boolean
-Test_Unbounded_WString::check_validity (CORBA::Request_ptr )
-{
- // No need to retrieve anything because, for all the args and
- // the return, we provided the memory and we own it.
- return this->check_validity ();
-}
-
-void
-Test_Unbounded_WString::print_values (void)
-{
-}
diff --git a/TAO/tests/Param_Test/ub_wstring.h b/TAO/tests/Param_Test/ub_wstring.h
deleted file mode 100644
index 04497648c11..00000000000
--- a/TAO/tests/Param_Test/ub_wstring.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ub_wstring.h
-//
-// = DESCRIPTION
-// Tests unbounded wide string
-//
-// = AUTHORS
-// Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_UNBOUNDED_WSTRING_H
-#define PARAM_TEST_UNBOUNDED_WSTRING_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test unbounded wide strings
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Unbounded_WString
-{
-public:
- Test_Unbounded_WString (void);
- // ctor
-
- ~Test_Unbounded_WString (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request *
- ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::WChar *in_;
- // in parameter
-
- CORBA::WChar *inout_;
- // inout parameter
-
- CORBA::WChar *out_;
- // out parameter
-
- CORBA::WChar *ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_UNBOUNDED_WSTRING_H */
diff --git a/TAO/tests/Param_Test/ulonglong.cpp b/TAO/tests/Param_Test/ulonglong.cpp
deleted file mode 100644
index d8104652da1..00000000000
--- a/TAO/tests/Param_Test/ulonglong.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ulonglong.cpp
-//
-// = DESCRIPTION
-// tests 64 bit longs
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "ulonglong.h"
-
-ACE_RCSID (Param_Test,
- ulonglong,
- "$Id$")
-
-Test_ULongLong::Test_ULongLong (void)
- : opname_ (CORBA::string_dup ("test_ulonglong"))
-{
-}
-
-Test_ULongLong::~Test_ULongLong (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_ULongLong::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_ULongLong::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_;
- req->add_out_arg ("s3") <<= this->out_;
-
- req->set_return_type (CORBA::_tc_ulonglong);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- req->return_value () >>= this->ret_;
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= this->inout_;
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= this->out_;
-}
-
-int
-Test_ULongLong::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- this->in_ = gen->gen_long ();
- this->inout_ = 0;
- return 0;
-}
-
-int
-Test_ULongLong::reset_parameters (void)
-{
- this->inout_ = 0;
- this->out_ = 0;
- this->ret_ = 0;
- return 0;
-}
-
-int
-Test_ULongLong::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- this->ret_ = objref->test_ulonglong (this->in_,
- this->inout_,
- this->out_
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_ULongLong::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_ULongLong::check_validity (void)
-{
- if (this->inout_ == this->in_ * 2 &&
- this->out_ == this->in_ * 3 &&
- this->ret_ == this->in_ * 4)
- return 1; // success
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_ULongLong::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_ULongLong::print_values (void)
-{
-#if defined(ACE_LACKS_LONGLONG_T)
- char bufferin[32];
- char bufferinout[32];
- char bufferout[32];
- char bufferret[32];
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*\n"
- "in = %s, "
- "inout = %s, "
- "out = %s, "
- "ret = %s\n"
- "\n=*=*=*=*=*=*\n",
- this->in_.as_string (bufferin),
- this->inout_.as_string (bufferinout),
- this->out_.as_string (bufferout),
- this->ret_.as_string (bufferret)));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "\n=*=*=*=*=*=*\n"
- "in = %Q, "
- "inout = %Q, "
- "out = %Q, "
- "ret = %Q\n"
- "\n=*=*=*=*=*=*\n",
- this->in_,
- this->inout_,
- this->out_,
- this->ret_));
-#endif
-}
diff --git a/TAO/tests/Param_Test/ulonglong.h b/TAO/tests/Param_Test/ulonglong.h
deleted file mode 100644
index db9e1fa86a4..00000000000
--- a/TAO/tests/Param_Test/ulonglong.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// ulonglong.h
-//
-// = DESCRIPTION
-// Tests 64bit unsigned longs.
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_ULONGLONG_H
-#define PARAM_TEST_ULONGLONG_H
-
-#include "param_testC.h"
-
-class Test_ULongLong
-{
-public:
- Test_ULongLong (void);
- // ctor
-
- ~Test_ULongLong (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- CORBA::ULongLong in_;
- // in parameter
-
- CORBA::ULongLong inout_;
- // inout parameter
-
- CORBA::ULongLong out_;
- // out parameter
-
- CORBA::ULongLong ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_ULONGLONG_H */
diff --git a/TAO/tests/Param_Test/var_array.cpp b/TAO/tests/Param_Test/var_array.cpp
deleted file mode 100644
index f07192921e5..00000000000
--- a/TAO/tests/Param_Test/var_array.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// var_array.cpp
-//
-// = DESCRIPTION
-// tests fixed size arrays
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "var_array.h"
-
-ACE_RCSID (Param_Test,
- var_array,
- "$Id$")
-
-// ************************************************************************
-// Test_Var_Array
-// ************************************************************************
-
-Test_Var_Array::Test_Var_Array (void)
- : opname_ (CORBA::string_dup ("test_var_array")),
- out_ (new Param_Test::Var_Array),
- ret_ (new Param_Test::Var_Array)
-{
-}
-
-Test_Var_Array::~Test_Var_Array (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
-}
-
-const char *
-Test_Var_Array::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Var_Array::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= Param_Test::Var_Array_forany (this->in_);
- req->add_inout_arg ("s2") <<= Param_Test::Var_Array_forany (this->inout_);
- req->add_out_arg ("s3") <<= Param_Test::Var_Array_forany (this->out_.inout ());
-
- req->set_return_type (Param_Test::_tc_Var_Array);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Var_Array_forany forany;
-
- req->return_value () >>= forany;
- this->ret_ = Param_Test::Var_Array_dup (forany.in ());
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= forany;
- Param_Test::Var_Array_copy (this->inout_, forany.in ());
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= forany;
- this->out_ = Param_Test::Var_Array_dup (forany.in ());
-}
-
-int
-Test_Var_Array::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
-
- // fill the in_ array
- for (CORBA::ULong i=0; i < Param_Test::DIM2; i++)
- {
- this->in_[i] = gen->gen_string ();
- }
-
- return 0;
-}
-
-int
-Test_Var_Array::reset_parameters (void)
-{
- // free the out, and return value arrays
- Param_Test::Var_Array_free (this->out_._retn ());
- Param_Test::Var_Array_free (this->ret_._retn ());
- this->out_ = new Param_Test::Var_Array;
- this->ret_ = new Param_Test::Var_Array;
- return 0;
-}
-
-int
-Test_Var_Array::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Var_Array_out out_arr (this->out_.out ());
- this->ret_ = objref->test_var_array (this->in_,
- this->inout_,
- out_arr
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Var_Array::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Var_Array::check_validity (void)
-{
- if (this->compare (this->in_, this->inout_) &&
- this->compare (this->in_, this->out_.in ()) &&
- this->compare (this->in_, this->ret_.in ()))
- return 1;
- else
- return 0;
-}
-
-CORBA::Boolean
-Test_Var_Array::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-CORBA::Boolean
-Test_Var_Array::compare (const Param_Test::Var_Array_slice *a1,
- const Param_Test::Var_Array_slice *a2)
-{
- for (CORBA::ULong i=0; i < Param_Test::DIM2; i++)
- {
- if (strcmp (a1[i].in (), a2[i].in ()))
- return 0;
- }
- return 1; // success
-}
-
-void
-Test_Var_Array::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG, "IN array\n"));
- this->print (this->in_);
- ACE_DEBUG ((LM_DEBUG, "INOUT array\n"));
- this->print (this->inout_);
- ACE_DEBUG ((LM_DEBUG, "OUT array\n"));
- this->print (this->out_.in ());
- ACE_DEBUG ((LM_DEBUG, "RET array\n"));
- this->print (this->ret_.in ());
-}
-
-void
-Test_Var_Array::print (const Param_Test::Var_Array_slice *a)
-{
- for (CORBA::ULong i = 0; i < Param_Test::DIM2; i++)
- {
- ACE_DEBUG ((LM_DEBUG, "\t\tElement #%d = %s\n",i, a[i].in ()));
- }
-}
diff --git a/TAO/tests/Param_Test/var_array.h b/TAO/tests/Param_Test/var_array.h
deleted file mode 100644
index 07d33162104..00000000000
--- a/TAO/tests/Param_Test/var_array.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// var_array.h
-//
-// = DESCRIPTION
-// Tests arrays whose base types are of variable size
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_VAR_ARRAY_H
-#define PARAM_TEST_VAR_ARRAY_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test var arrays
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-class Test_Var_Array
-{
-public:
- Test_Var_Array (void);
- // ctor
-
- ~Test_Var_Array (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- CORBA::Boolean compare (const Param_Test::Var_Array_slice *a1,
- const Param_Test::Var_Array_slice *a2);
- // compare arrays
-
- void print (const Param_Test::Var_Array_slice *a);
- // print an array
-
- char *opname_;
- // operation name
-
- Param_Test::Var_Array in_;
- // in parameter
-
- Param_Test::Var_Array inout_;
- // inout parameter
-
- Param_Test::Var_Array_var out_;
- // out parameter
-
- Param_Test::Var_Array_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_VAR_ARRAY_H */
diff --git a/TAO/tests/Param_Test/var_struct.cpp b/TAO/tests/Param_Test/var_struct.cpp
deleted file mode 100644
index 679ed7b3db3..00000000000
--- a/TAO/tests/Param_Test/var_struct.cpp
+++ /dev/null
@@ -1,274 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// var_struct.cpp
-//
-// = DESCRIPTION
-// test variable sized structures
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "helper.h"
-#include "var_struct.h"
-
-ACE_RCSID (Param_Test,
- var_struct,
- "$Id$")
-
-// ************************************************************************
-// Test_Var_Struct
-// ************************************************************************
-
-Test_Var_Struct::Test_Var_Struct (void)
- : opname_ (CORBA::string_dup ("test_var_struct")),
- inout_ (new Param_Test::Var_Struct),
- out_ (new Param_Test::Var_Struct),
- ret_ (new Param_Test::Var_Struct)
-{
-}
-
-Test_Var_Struct::~Test_Var_Struct (void)
-{
- CORBA::string_free (this->opname_);
- this->opname_ = 0;
- // the other data members will be freed as they are "_var"s and objects
- // (rather than pointers to objects)
-}
-
-const char *
-Test_Var_Struct::opname (void) const
-{
- return this->opname_;
-}
-
-void
-Test_Var_Struct::dii_req_invoke (CORBA::Request *req
- ACE_ENV_ARG_DECL)
-{
- req->add_in_arg ("s1") <<= this->in_;
- req->add_inout_arg ("s2") <<= this->inout_.in ();
- req->add_out_arg ("s3") <<= this->out_.in ();
-
- req->set_return_type (Param_Test::_tc_Var_Struct);
-
- req->invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Param_Test::Var_Struct *tmp;
- req->return_value () >>= tmp;
- this->ret_ = new Param_Test::Var_Struct (*tmp);
-
- CORBA::NamedValue_ptr o2 =
- req->arguments ()->item (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o2->value () >>= tmp;
- this->inout_ = new Param_Test::Var_Struct (*tmp);
-
- CORBA::NamedValue_ptr o3 =
- req->arguments ()->item (2 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- *o3->value () >>= tmp;
- this->out_ = new Param_Test::Var_Struct (*tmp);
-}
-
-int
-Test_Var_Struct::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- Generator *gen = GENERATOR::instance (); // value generator
-
- // get some sequence length (not more than 10)
- CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
-
- this->in_.dbl = 3.14159;
- this->in_.dummy1 = gen->gen_string ();
- this->in_.boole = gen->gen_short () % 2;
- this->in_.dummy2 = gen->gen_string ();
- this->in_.shrt = gen->gen_short ();
- // set the length of the sequence
- this->in_.seq.length (len);
-
- // now set each individual element
- for (CORBA::ULong i = 0; i < this->in_.seq.length (); i++)
- {
- // generate some arbitrary string to be filled into the ith location in
- // the sequence
- char *str = gen->gen_string ();
- this->in_.seq[i] = str;
- }
-
- this->inout_->dbl = 0.0;
- this->inout_->dummy1 = CORBA::string_dup ("");
- this->inout_->boole = 0;
- this->inout_->dummy2 = CORBA::string_dup ("");
- this->inout_->shrt = 0;
- // set the length of the sequence
- this->inout_->seq.length (0);
-
- return 0;
-}
-
-int
-Test_Var_Struct::reset_parameters (void)
-{
- this->inout_ = new Param_Test::Var_Struct; // delete the previous ones
- this->out_ = new Param_Test::Var_Struct;
- this->ret_ = new Param_Test::Var_Struct;
-
- this->inout_->dbl = 0.0;
- this->inout_->dummy1 = CORBA::string_dup ("");
- this->inout_->boole = 0;
- this->inout_->dummy2 = CORBA::string_dup ("");
- this->inout_->shrt = 0;
- // set the length of the sequence
- this->inout_->seq.length (0);
-
- return 0;
-}
-
-int
-Test_Var_Struct::run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- Param_Test::Var_Struct_out out (this->out_.out ());
- this->ret_ = objref->test_var_struct (this->in_,
- this->inout_.inout (),
- out
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Var_Struct::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
-CORBA::Boolean
-Test_Var_Struct::check_validity (void)
-{
- CORBA::Boolean flag = 0;
- if (this->in_.dbl == this->inout_->dbl &&
- this->in_.dbl == this->out_->dbl &&
- this->in_.dbl == this->ret_->dbl &&
- (!ACE_OS::strcmp (this->in_.dummy1, this->inout_->dummy1)) &&
- (!ACE_OS::strcmp (this->in_.dummy1, this->out_->dummy1)) &&
- (!ACE_OS::strcmp (this->in_.dummy1, this->ret_->dummy1)) &&
- this->in_.boole == this->inout_->boole &&
- this->in_.boole == this->out_->boole &&
- this->in_.boole == this->ret_->boole &&
- (!ACE_OS::strcmp (this->in_.dummy2, this->inout_->dummy2)) &&
- (!ACE_OS::strcmp (this->in_.dummy2, this->out_->dummy2)) &&
- (!ACE_OS::strcmp (this->in_.dummy2, this->ret_->dummy2)) &&
- this->in_.shrt == this->inout_->shrt &&
- this->in_.shrt == this->out_->shrt &&
- this->in_.shrt == this->ret_->shrt &&
- (this->in_.seq.length () == this->inout_->seq.length ()) &&
- (this->in_.seq.length () == this->out_->seq.length ()) &&
- (this->in_.seq.length () == this->ret_->seq.length ()))
- {
- flag = 1; // assume all are equal
- // lengths are same. Now compare the contents
- for (CORBA::ULong i=0; i < this->in_.seq.length () && flag; i++)
- {
- if (ACE_OS::strcmp (this->in_.seq[i], this->inout_->seq[i]) ||
- ACE_OS::strcmp (this->in_.seq[i], this->out_->seq[i]) ||
- ACE_OS::strcmp (this->in_.seq[i], this->ret_->seq[i]))
- // not equal
- flag = 0;
- }
- }
- return flag;
-}
-
-CORBA::Boolean
-Test_Var_Struct::check_validity (CORBA::Request_ptr )
-{
- return this->check_validity ();
-}
-
-void
-Test_Var_Struct::print_values (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n*=*=*=*=*=*=*=*=*=*=\n"
- "in_.dummy1 = %s\n"
- "inout_.dummy1 = %s\n"
- "out_.dummy1 = %s\n"
- "ret_.dummy1 = %s\n",
- this->in_.dummy1.in (),
- this->inout_->dummy1.in (),
- this->out_->dummy1.in (),
- this->ret_->dummy1.in ()));
-
- ACE_DEBUG ((LM_DEBUG,
- "\n*=*=*=*=*=*=*=*=*=*=\n"
- "in_.dummy2 = %s\n"
- "inout_.dummy2 = %s\n"
- "out_.dummy2 = %s\n"
- "ret_.dummy2 = %s\n",
- this->in_.dummy2.in (),
- this->inout_->dummy2.in (),
- this->out_->dummy2.in (),
- this->ret_->dummy2.in ()));
-
- CORBA::ULong i;
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; i < this->in_.seq.length (); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in.seq : %s\n",
- i,
- (this->in_.seq[i]? (const char *)this->in_.seq[i]:"<nul>")));
- }
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->inout_.ptr () && (i < this->inout_->seq.length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "inout : %s\n",
- i,
- (this->inout_->seq[i]? (const char *)this->inout_->seq[i]:"<nul>")));
- }
- if (!this->inout_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\ninout struct does not exist\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->out_.ptr () && (i < this->out_->seq.length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->out_->seq[i]? (const char *)this->out_->seq[i]:"<nul>")));
- }
- if (!this->out_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nout struct is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
- for (i=0; this->ret_.ptr () && (i < this->ret_->seq.length ()); i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Element #%d\n"
- "in : %s\n",
- i,
- (this->ret_->seq[i]? (const char *)this->ret_->seq[i]:"<nul>")));
- }
- if (!this->ret_.ptr ())
- ACE_DEBUG ((LM_DEBUG, "\nret struct is NUL\n"));
- ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
-}
diff --git a/TAO/tests/Param_Test/var_struct.h b/TAO/tests/Param_Test/var_struct.h
deleted file mode 100644
index aab34fe5247..00000000000
--- a/TAO/tests/Param_Test/var_struct.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Param_Test
-//
-// = FILENAME
-// var_struct.h
-//
-// = DESCRIPTION
-// Tests variable sized structures
-//
-// = AUTHORS
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef PARAM_TEST_VAR_STRUCT_H
-#define PARAM_TEST_VAR_STRUCT_H
-
-#include "param_testC.h"
-
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test variable sized structs
-// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-
-class Test_Var_Struct
-{
-public:
- Test_Var_Struct (void);
- // ctor
-
- ~Test_Var_Struct (void);
- // dtor
-
- int run_sii_test (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // run the SII test
-
- const char *opname (void) const;
- // return operation name
-
- int init_parameters (Param_Test_ptr objref
- ACE_ENV_ARG_DECL);
- // set values for parameters
-
- int reset_parameters (void);
- // reset values for CORBA
-
- CORBA::Boolean check_validity (void);
- // check if results are valid
-
- CORBA::Boolean check_validity (CORBA::Request_ptr req);
- // check if results are valid. This is used for DII results
-
- void print_values (void);
- // print all the values
-
- void dii_req_invoke (CORBA::Request * ACE_ENV_ARG_DECL_NOT_USED);
- // invoke DII request with appropriate exception handling.
-
-private:
- char *opname_;
- // operation name
-
- Param_Test::Var_Struct in_;
- // in parameter
-
- // these need memory management
- Param_Test::Var_Struct_var inout_;
- // inout parameter
-
- Param_Test::Var_Struct_var out_;
- // out parameter
-
- Param_Test::Var_Struct_var ret_;
- // return value
-};
-
-#endif /* PARAM_TEST_VAR_STRUCT_H */
diff --git a/TAO/tests/Permanent_Forward/Permanent_Forward.mpc b/TAO/tests/Permanent_Forward/Permanent_Forward.mpc
deleted file mode 100755
index ab5cf4db05d..00000000000
--- a/TAO/tests/Permanent_Forward/Permanent_Forward.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*StubTest) : taoexe, iormanip {
- exename = StubTest
-}
diff --git a/TAO/tests/Permanent_Forward/README b/TAO/tests/Permanent_Forward/README
deleted file mode 100755
index 283aa20a87d..00000000000
--- a/TAO/tests/Permanent_Forward/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This program tests the various forward and forward-permanent
-combinations possible in applications. The tests operates directly on
-Objects and TAO_Stub interfaces.
diff --git a/TAO/tests/Permanent_Forward/StubTest.cpp b/TAO/tests/Permanent_Forward/StubTest.cpp
deleted file mode 100755
index 21fbd5409bd..00000000000
--- a/TAO/tests/Permanent_Forward/StubTest.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-// $Id$
-
-//========================================================================
-/**
- * @file StubTest.cpp
- *
- * This program tests the basic functionality of the TAO_Stub in case
- * of permanent_forward
- *
- * @author Frank Rehberger
- */
-//=========================================================================
-
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-#include "tao/ORB.h"
-#include "tao/Environment.h"
-#include "tao/SystemException.h"
-#include "tao/Object.h"
-#include "tao/Stub.h"
-#include "tao/Profile.h"
-#include "tao/IIOP_Profile.h"
-
-#ifndef FRANKS_ASSERT
-#define FRANKS_ASSERT(X) \
- ((X) \
- ? static_cast<void>(0) \
- : ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X)))
-#endif
-
-ACE_RCSID (Permanent_Forward,
- StubTest,
- "$Id$")
-
-static bool
-is_endpoint (TAO_Profile *profile, const char *host, unsigned short port)
- {
- TAO_IIOP_Profile *iiop = dynamic_cast<TAO_IIOP_Profile*> (profile);
- TAO_Endpoint *endpoint = iiop->endpoint ();
- TAO_IIOP_Endpoint *iiop_endpoint = dynamic_cast<TAO_IIOP_Endpoint*> (endpoint);
- const char * endpoint_host = iiop_endpoint->host();
- unsigned short endpoint_port = iiop_endpoint->port();
-
- bool retval =
- ACE_OS::strcmp (endpoint_host, host)==0
- && endpoint_port == port;
-
- return retval;
- }
-
-static bool
-equal_endpoint (TAO_Profile *profile, TAO_Profile *other)
- {
- TAO_IIOP_Profile *iiop = dynamic_cast<TAO_IIOP_Profile*> (profile);
- TAO_Endpoint *endpoint = iiop->endpoint ();
- TAO_IIOP_Endpoint *iiop_endpoint = dynamic_cast<TAO_IIOP_Endpoint*> (endpoint);
- const char * endpoint_host = iiop_endpoint->host();
- unsigned short endpoint_port = iiop_endpoint->port();
-
- TAO_IIOP_Profile *other_iiop = dynamic_cast<TAO_IIOP_Profile*> (other);
- TAO_Endpoint *other_endpoint = other_iiop->endpoint ();
- TAO_IIOP_Endpoint *other_iiop_endpoint = dynamic_cast<TAO_IIOP_Endpoint*> (other_endpoint);
- const char * other_endpoint_host = other_iiop_endpoint->host();
- unsigned short other_endpoint_port = other_iiop_endpoint->port();
-
- bool retval =
- ACE_OS::strcmp (endpoint_host, other_endpoint_host)==0
- && endpoint_port == other_endpoint_port;
-
- return retval;
- }
-
-static bool
-marshaled_equal_to_other (CORBA::ORB_ptr orb, CORBA::Object_ptr obj, TAO_MProfile *other_mprofile)
-{
- CORBA::String_var str = orb->object_to_string (obj ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj_copy = orb->string_to_object (str.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub_copy = obj_copy->_stubobj ();
- TAO_MProfile *copy_mprofile = &(stub_copy->base_profiles ());
-
- if ( copy_mprofile->size() != other_mprofile->size())
- return false;
-
- for (size_t i=0; i<copy_mprofile->size(); ++i)
- {
- TAO_Profile *copy_profile = copy_mprofile->get_profile (i);
- TAO_Profile *other_profile = other_mprofile->get_profile (i);
-
- if ( ! equal_endpoint (copy_profile, other_profile) )
- return false;
- }
-
- return true;
-}
-
-static void
-test_forward_permanent (CORBA::ORB_ptr orb)
-{
- CORBA::Object_var obj1 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:1111,iiop:192.168.1.3:1111/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // the permanent profile
- CORBA::Object_var obj4 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:4444,iiop:192.168.1.3:4444/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub1 = obj1->_stubobj ();
- TAO_Stub *stub4 = obj4->_stubobj ();
-
- TAO_Profile *profile = NULL;
-
- profile = stub1->profile_in_use ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 1111));
-
- // ----- forward to obj2 permanently
- stub1->add_forward_profiles (stub4->base_profiles(), true /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 4444));
-
- // ----- stringified object reference must be equal to obj4->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub4->base_profiles())) );
-
- // ----- consume second profile of obj2
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 4444));
-
-
- // ----- reached end, next_profile() must yield NULL
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (profile == NULL);
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-}
-
-static void
-test_forward_permanent_mix (CORBA::ORB_ptr orb)
-{
- CORBA::Object_var obj1 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:1111,iiop:192.168.1.3:1111/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj2 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:2222,iiop:192.168.1.3:2222/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj3 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:3333,iiop:192.168.1.3:3333/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj4 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:4444,iiop:192.168.1.3:4444/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj5 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:5555,iiop:192.168.1.3:5555/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub1 = obj1->_stubobj ();
- TAO_Stub *stub2 = obj2->_stubobj ();
- TAO_Stub *stub3 = obj3->_stubobj ();
- TAO_Stub *stub4 = obj4->_stubobj ();
- TAO_Stub *stub5 = obj5->_stubobj ();
-
- TAO_Profile *profile = NULL;
-
- profile = stub1->profile_in_use ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 1111));
-
- // ----- forward to obj2
- stub1->add_forward_profiles (stub2->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 2222));
-
- // ----- forward to obj3
- stub1->add_forward_profiles (stub3->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 3333));
-
- // ----- stringified object reference must be equal to obj1->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub1->base_profiles())) );
-
- // ----- forward to obj4 permanently
- stub1->add_forward_profiles (stub4->base_profiles(), true /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 4444));
-
- // ----- stringified object reference must be equal to obj4->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub4->base_profiles())) );
-
- // ----- consume second profile from obj4
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 4444));
-
- // ----- forward to obj2
- stub1->add_forward_profiles (stub2->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 2222));
-
- // ----- forward to obj3
- stub1->add_forward_profiles (stub3->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 3333));
-
- // ----- stringified object reference must be equal to obj4->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub4->base_profiles())) );
-
- // ----- forward to obj5 permanently
- stub1->add_forward_profiles (stub5->base_profiles(), true /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 5555));
-
- // ----- stringified object reference must be equal to obj5->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub5->base_profiles())) );
-
- // ----- consume second profile from obj5
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 5555));
-
- // ----- stringified object reference must be equal to obj1->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub5->base_profiles())) );
-
- // reached end of profiles, next_profile must return NULL
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (profile == NULL);
-}
-
-static void
-test_forward (CORBA::ORB_ptr orb)
-{
- CORBA::Object_var obj1 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:1111,iiop:192.168.1.3:1111/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj2 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:2222,iiop:192.168.1.3:2222/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj3 = orb->string_to_object ("corbaloc:iiop:192.168.1.2:3333,iiop:192.168.1.3:3333/NameService" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Stub *stub1 = obj1->_stubobj ();
- TAO_Stub *stub2 = obj2->_stubobj ();
- TAO_Stub *stub3 = obj3->_stubobj ();
-
- TAO_Profile *profile = NULL;
-
- profile = stub1->profile_in_use ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 1111));
-
- // ----- forward to obj2
- stub1->add_forward_profiles (stub2->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 2222));
-
- // ----- forward to obj3
-
- stub1->add_forward_profiles (stub3->base_profiles(), false /* permanent */ );
-
- FRANKS_ASSERT (stub1->forward_profiles () != NULL);
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.2", 3333));
-
- // ----- stringified object reference must be equal to obj1->base_prpfiles().
- FRANKS_ASSERT (marshaled_equal_to_other (orb, obj1.in (), &(stub1->base_profiles())) );
-
- // ----- consume second profile of obj3
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 3333));
-
- // ----- consume second profile of obj2
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 2222));
-
- // ----- consume second profile of obj1
-
- profile = stub1->next_profile ();
-
- FRANKS_ASSERT (is_endpoint (profile, "192.168.1.3", 1111));
-
- FRANKS_ASSERT (stub1->forward_profiles () == NULL);
-
- // ----- reached end, next_profile() must yield NULL
-
- profile = stub1->next_profile ();
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
- ACE_DEBUG ((LM_DEBUG, "Running the Stub Tests.\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // Retrieve the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_forward (orb.in());
- test_forward_permanent (orb.in());
- test_forward_permanent_mix (orb.in());
- }
- ACE_CATCH (CORBA::SystemException, sysex)
- {
- ACE_PRINT_EXCEPTION (sysex,
- "Unexpected system Exception!!\n");
- return -1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected ACE_CATCHANY Exception!\n");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "Stub Tests Successfully Completed!\n"));
- ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Permanent_Forward/run_test.pl b/TAO/tests/Permanent_Forward/run_test.pl
deleted file mode 100755
index 60c2fb9ac3d..00000000000
--- a/TAO/tests/Permanent_Forward/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("StubTest");
-}
-else {
- $T = new PerlACE::Process ("StubTest");
-}
-
-$test = $T->SpawnWaitKill (20);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Policies/.cvsignore b/TAO/tests/Policies/.cvsignore
deleted file mode 100644
index a3f7ddb3860..00000000000
--- a/TAO/tests/Policies/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Manipulation
diff --git a/TAO/tests/Policies/Manipulation.cpp b/TAO/tests/Policies/Manipulation.cpp
deleted file mode 100644
index d3f78ece1b0..00000000000
--- a/TAO/tests/Policies/Manipulation.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/AnyTypeCode/TAOA.h"
-#include "tao/TAOC.h"
-#include "tao/Object_T.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_time.h"
-
-ACE_RCSID(Policies, Manipulation, "$Id$")
-
-int nthreads = 5;
-int niterations = 100;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "n:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'i':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-n <nthreads> "
- "-i <niterations> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Manipulation : public ACE_Task_Base
-{
- // = TITLE
- // Run the client thread
- //
- // = DESCRIPTION
- // Use the ACE_Task_Base class to run the client threads.
- //
-public:
- Manipulation (CORBA::ORB_ptr orb,
- Test_ptr test,
- int niterations);
- // ctor
-
- virtual int svc (void);
- // The thread entry point.
-
-private:
- void perform_iteration (ACE_RANDR_TYPE &seed,
- CORBA::PolicyList_var &policies,
- CORBA::PolicyManager_ptr policy_manager,
- CORBA::PolicyCurrent_ptr policy_current
- ACE_ENV_ARG_DECL);
-
-private:
- CORBA::ORB_var orb_;
- // The ORB pointer
-
- Test_var test_;
- // The test object reference
-
- int niterations_;
- // The number of iterations on this thread
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object ("corbaloc:iiop:localhost:12345/FakeIOR"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var test =
- TAO::Narrow_Utils<Test>::unchecked_narrow (
- object.in (),
- _TAO_Test_Proxy_Broker_Factory_function_pointer);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference is nil\n"),
- 1);
- }
-
- Manipulation manipulation (orb.in (),
- test.in (),
- niterations);
- if (manipulation.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate manipulation threads\n"),
- 1);
-
- manipulation.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "threads finished\n"));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Manipulation::Manipulation (CORBA::ORB_ptr orb,
- Test_ptr test,
- int niterations)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- test_ (Test::_duplicate (test)),
- niterations_ (niterations)
-{
-}
-
-void
-Manipulation::perform_iteration (ACE_RANDR_TYPE &seed,
- CORBA::PolicyList_var &policies,
- CORBA::PolicyManager_ptr policy_manager,
- CORBA::PolicyCurrent_ptr policy_current
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- int r = ACE_OS::rand_r (seed);
-
- const int ADD_OBJECT_POLICY = 0;
- const int ADD_CURRENT_POLICY = 1;
- const int ADD_MANAGER_POLICY = 2;
-
- const int SET_OBJECT_POLICY = 3;
- const int SET_CURRENT_POLICY = 4;
- const int SET_MANAGER_POLICY = 5;
-
- const int SAVE_CURRENT_POLICIES = 6;
- const int RESTORE_CURRENT_POLICIES = 7;
- const int SAVE_MANAGER_POLICIES = 8;
- // const int RESTORE_MANAGER_POLICIES = 9;
- const int LAST_OPERATION = 10;
- int operation = r % LAST_OPERATION;
-
- if (operation == ADD_OBJECT_POLICY
- || operation == ADD_CURRENT_POLICY
- || operation == ADD_MANAGER_POLICY
- || operation == SET_OBJECT_POLICY
- || operation == SET_CURRENT_POLICY
- || operation == SET_MANAGER_POLICY)
- {
- CORBA::Policy_var policy;
-
- CORBA::Any any;
- CORBA::ULong policy_type = 0;
-
- int type = ACE_OS::rand_r (seed) % 3;
- if (type == 0)
- {
- TimeBase::TimeT value = 0;
- any <<= value;
-
- policy_type =
- Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE;
- }
- else if (type == 1)
- {
- TAO::BufferingConstraint value;
- any <<= value;
-
- policy_type =
- TAO::BUFFERING_CONSTRAINT_POLICY_TYPE;
- }
- else // type == 2 (or something else)
- {
- Messaging::SyncScope value = 0;
- any <<= value;
-
- policy_type =
- Messaging::SYNC_SCOPE_POLICY_TYPE;
- }
-
- policy = this->orb_->create_policy (policy_type,
- any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::SetOverrideType override_type = CORBA::SET_OVERRIDE;
- if (operation == ADD_OBJECT_POLICY
- || operation == ADD_CURRENT_POLICY
- || operation == ADD_MANAGER_POLICY)
- {
- override_type = CORBA::ADD_OVERRIDE;
- }
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
- policy_list[0] = CORBA::Policy::_duplicate (policy.in ());
-
- if (operation == ADD_OBJECT_POLICY
- || operation == SET_OBJECT_POLICY)
- {
- CORBA::Object_var tmp =
- this->test_->_set_policy_overrides (policy_list,
- override_type
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (operation == ADD_CURRENT_POLICY
- || operation == SET_CURRENT_POLICY)
- {
- policy_current->set_policy_overrides (policy_list,
- override_type
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- // operation == ADD_CURRENT_POLICY
- // || operation == SET_CURRENT_POLICY)
- policy_manager->set_policy_overrides (policy_list,
- override_type
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (operation == SAVE_CURRENT_POLICIES)
- {
- CORBA::PolicyTypeSeq types;
- policies =
- policy_current->get_policy_overrides (types ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (operation == SAVE_MANAGER_POLICIES)
- {
- CORBA::PolicyTypeSeq types;
- policies =
- policy_manager->get_policy_overrides (types ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (operation == RESTORE_CURRENT_POLICIES)
- {
- if (policies.ptr () != 0)
- {
- policy_current->set_policy_overrides (policies.in (),
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- else // operation == RESTORE_MANAGER_POLICIES)
- {
- if (policies.ptr () != 0)
- {
- policy_manager->set_policy_overrides (policies.in (),
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- }
- ACE_CATCHANY
- {
- // Ignore all exceptions
- }
- ACE_ENDTRY;
-}
-
-
-int
-Manipulation::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
-#ifndef ACE_LACKS_LONGLONG_T
- ACE_RANDR_TYPE seed =
- static_cast<ACE_RANDR_TYPE> (ACE_OS::gethrtime ());
-#else
- ACE_RANDR_TYPE seed =
- static_cast<ACE_RANDR_TYPE> (ACE_OS::gethrtime().lo());
-#endif
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- for (int i = 0; i != this->niterations_; ++i)
- {
- CORBA::PolicyList_var policies;
- this->perform_iteration (seed,
- policies,
- policy_manager.in (),
- policy_current.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Manipulation: exception raised");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Policies/Policies.mpc b/TAO/tests/Policies/Policies.mpc
deleted file mode 100644
index 2a982e29c45..00000000000
--- a/TAO/tests/Policies/Policies.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Policies Manipulation): taoexe, portableserver, messaging {
- exename = Manipulation
- requires += corba_messaging
-}
diff --git a/TAO/tests/Policies/README b/TAO/tests/Policies/README
deleted file mode 100644
index 8e30efc9f9d..00000000000
--- a/TAO/tests/Policies/README
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Id$
-
-Description:
-
- This is a stress test for the ORB's Policy interfaces. It
-randomly creates, removes, destroys or modifies the policy setting at
-the object, thread and ORB level. The operations are performed
-concurrently, by threads.
-
- The only output from this test is 'threads finished', anything
-else indicates a problem.
-
-How to run:
- You can use the run_test.pl script to run it or:
-
-$ ./Manipulation
diff --git a/TAO/tests/Policies/run_test.pl b/TAO/tests/Policies/run_test.pl
deleted file mode 100755
index e1c112bf13d..00000000000
--- a/TAO/tests/Policies/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$threads = '10';
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Manipulation", "-n $threads");
-}
-else {
- $T = new PerlACE::Process ("Manipulation", "-n $threads");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/Policies/test.idl b/TAO/tests/Policies/test.idl
deleted file mode 100644
index 402ff77e53d..00000000000
--- a/TAO/tests/Policies/test.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
-};
diff --git a/TAO/tests/Portable_Interceptors/AMI/.cvsignore b/TAO/tests/Portable_Interceptors/AMI/.cvsignore
deleted file mode 100644
index e17d953477e..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-TestC.cpp
-TestC.h
-TestC.i
-TestS.cpp
-TestS.h
-TestS.i
-TestS_T.cpp
-TestS_T.h
-TestS_T.i
-client
-server
-test.ior
diff --git a/TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.cpp b/TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.cpp
deleted file mode 100644
index ed90dd7815f..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * @file Client_Interceptor.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-
-#include "Client_Interceptor.h"
-#include "Shared_Interceptor.h"
-#include "tao/OctetSeqC.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-
-ACE_RCSID (AMI,
- Client_Interceptor,
- "$Id$")
-
-
-unsigned long Echo_Client_Request_Interceptor::request_count = 0;
-unsigned long Echo_Client_Request_Interceptor::reply_count = 0;
-unsigned long Echo_Client_Request_Interceptor::other_count = 0;
-unsigned long Echo_Client_Request_Interceptor::exception_count = 0;
-
-Echo_Client_Request_Interceptor::
-Echo_Client_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Echo_Client_Interceptor");
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_ERROR((LM_ERROR,
- "ERROR, unexpected interception point called send_poll()\n"));
- ACE_THROW(CORBA::BAD_PARAM ());
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- IOP::ServiceContext sc;
- sc.context_id = ::service_id;
-
- CORBA::Octet *buf = CORBA::OctetSeq::allocbuf(magic_cookie_len);
- ACE_OS::memcpy(buf, magic_cookie, magic_cookie_len);
- sc.context_data.replace (magic_cookie_len, magic_cookie_len, buf, 1);
-
- // Add this context to the service context list.
- ri->add_request_service_context (sc,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Check that the request service context can be retrieved.
- IOP::ServiceContext_var rc =
- ri->get_request_service_context (::service_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (rc->context_data.length() != magic_cookie_len
- || ACE_OS::memcmp(
- magic_cookie, rc->context_data.get_buffer(),
- magic_cookie_len) != 0
- )
- {
- ACE_THROW(CORBA::BAD_PARAM());
- }
-
- Echo_Client_Request_Interceptor::request_count++;
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Check that the request service context can be retrieved.
- IOP::ServiceContext_var rc =
- ri->get_request_service_context (::service_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (rc->context_data.length() != magic_cookie_len
- || ACE_OS::memcmp(
- magic_cookie, rc->context_data.get_buffer(),
- magic_cookie_len) != 0
- )
- {
- ACE_THROW(CORBA::BAD_PARAM());
- }
-
- Echo_Client_Request_Interceptor::reply_count++;
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Check that the request service context can be retrieved.
- IOP::ServiceContext_var rc =
- ri->get_request_service_context (::service_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (rc->context_data.length() != magic_cookie_len
- || ACE_OS::memcmp(
- magic_cookie, rc->context_data.get_buffer(),
- magic_cookie_len) != 0
- )
- {
- ACE_THROW (CORBA::BAD_PARAM ());
- }
-
- Echo_Client_Request_Interceptor::other_count++;
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- Echo_Client_Request_Interceptor::exception_count++;
-}
diff --git a/TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.h b/TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.h
deleted file mode 100644
index f775ebe2052..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Client_Interceptor.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * @file Client_Interceptor.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#ifndef Client_Interceptor__h_
-#define Client_Interceptor__h_
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor
- , public virtual TAO_Local_RefCounted_Object
-{
-public:
- Echo_Client_Request_Interceptor (void);
-
- static unsigned long request_count;
- static unsigned long reply_count;
- static unsigned long other_count;
- static unsigned long exception_count;
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-};
-
-#endif /* Client_Interceptor__h_ */
diff --git a/TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.cpp
deleted file mode 100644
index 46ecb32ca03..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * @file Client_ORBInitializer.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-
-#include "Client_ORBInitializer.h"
-#include "Client_Interceptor.h"
-
-ACE_RCSID(Portable_Interceptor_AMI, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer ()
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableInterceptor::ClientRequestInterceptor_var interceptor(
- new Echo_Client_Request_Interceptor);
-
- info->add_client_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.h
deleted file mode 100644
index 41c892cfb4f..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Client_ORBInitializer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file Client_ORBInitializer.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-
-#ifndef Client_ORBInitializer__h_
-#define Client_ORBInitializer__h_
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-class Client_ORBInitializer
- : public virtual PortableInterceptor::ORBInitializer
- , public virtual TAO_Local_RefCounted_Object
-{
-public:
- Client_ORBInitializer ();
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#include /**/ "ace/post.h"
-#endif /* Client_ORBInitializer__h_ */
diff --git a/TAO/tests/Portable_Interceptors/AMI/Echo.cpp b/TAO/tests/Portable_Interceptors/AMI/Echo.cpp
deleted file mode 100644
index 677ebee90b9..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Echo.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @file Echo.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "Echo.h"
-
-ACE_RCSID(Portable_Interceptors_AMI, Echo, "$Id$")
-
-Echo::Echo(CORBA::ORB_ptr orb)
- : orb_(CORBA::ORB::_duplicate(orb))
-{
-}
-
-char *
-Echo::echo_operation(char const * the_input
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- return CORBA::string_dup(the_input);
-}
-
-void
-Echo::shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- this->orb_->shutdown(0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Portable_Interceptors/AMI/Echo.h b/TAO/tests/Portable_Interceptors/AMI/Echo.h
deleted file mode 100644
index de20793bbde..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Echo.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @file Echo.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#ifndef Echo__h_
-#define Echo__h_
-
-#include "TestS.h"
-#include "tao/PortableServer/PortableServer.h"
-
-class Echo
- : public POA_Test::Echo
-{
-public:
- Echo(CORBA::ORB_ptr orb);
-
- virtual char * echo_operation(char const * the_input
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- virtual void shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#endif /* Echo__h_ */
diff --git a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp b/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp
deleted file mode 100644
index 3dc6be77b96..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @file Echo_Handler.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "Echo_Handler.h"
-
-
-ACE_RCSID (AMI,
- Echo_Handler,
- "$Id$")
-
-
-Echo_Handler::Echo_Handler(void)
- : replies_ (0)
-{
-}
-
-void
-Echo_Handler::echo_operation (char const *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
- ++this->replies_;
-}
-
-void
-Echo_Handler::echo_operation_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
-}
-
-void
-Echo_Handler::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
-}
-
-void
-Echo_Handler::shutdown_excep (::Messaging::ExceptionHolder *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC((CORBA::SystemException))
-{
-}
-
-CORBA::ULong
-Echo_Handler::replies (void) const
-{
- return this->replies_;
-}
diff --git a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h b/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h
deleted file mode 100644
index 76517aa76f2..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Echo_Handler.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * @file Echo_Handler.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#ifndef Echo_Handler__h_
-#define Echo_Handler__h_
-
-#include "TestS.h"
-#include "tao/PortableServer/PortableServer.h"
-
-class Echo_Handler
- : public POA_Test::AMI_EchoHandler
-{
-public:
- Echo_Handler(void);
-
- virtual void echo_operation(char const * retval
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- virtual void echo_operation_excep(::Messaging::ExceptionHolder * h
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- virtual void shutdown(ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
- virtual void shutdown_excep(::Messaging::ExceptionHolder * h
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC((CORBA::SystemException));
-
- CORBA::ULong replies (void) const;
-
-private:
- CORBA::ULong replies_;
-};
-
-#endif /* Echo_Handler__h_ */
diff --git a/TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc b/TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc
deleted file mode 100644
index f55237bc40f..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/PI_AMI.mpc
+++ /dev/null
@@ -1,23 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Client) : taoserver, ami, pi, interceptors {
- exename = client
- source_files {
- client.cpp
- Client_Interceptor.cpp
- Client_ORBInitializer.cpp
- Echo_Handler.cpp
- }
-}
-
-project(*server) : taoserver, ami, pi_server, interceptors {
- exename = server
- after += *Client
- source_files {
- server.cpp
- Server_Interceptor.cpp
- Server_ORBInitializer.cpp
- Echo.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.cpp b/TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.cpp
deleted file mode 100644
index 4e8e110e4cd..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * @file Server_Interceptor.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-
-#include "Server_Interceptor.h"
-#include "Shared_Interceptor.h"
-#include "tao/OctetSeqC.h"
-#include "ace/OS_NS_string.h"
-
-
-ACE_RCSID (AMI,
- Server_Interceptor,
- "$Id$")
-
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Echo_Server_Interceptor");
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp ("_is_a", operation.in ()) == 0)
- return;
-
- IOP::ServiceId id = ::service_id;
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (sc->context_data.length() != magic_cookie_len
- || ACE_OS::memcmp(
- magic_cookie, sc->context_data.get_buffer(),
- magic_cookie_len) != 0)
- {
- ACE_THROW(CORBA::BAD_PARAM());
- }
-}
-
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
diff --git a/TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.h b/TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.h
deleted file mode 100644
index 6ccb824bc8a..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Server_Interceptor.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * @file Server_Interceptor.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#ifndef Server_Interceptor__h_
-#define Server_Interceptor__h_
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-class Echo_Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor
- , public virtual TAO_Local_RefCounted_Object
-{
-public:
- Echo_Server_Request_Interceptor ();
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-};
-
-#endif /* Server_Interceptor__h_ */
diff --git a/TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.cpp
deleted file mode 100644
index dc409dd644e..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file Server_ORBInitializer.cpp
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-
-#include "Server_ORBInitializer.h"
-#include "Server_Interceptor.h"
-
-ACE_RCSID (AMI,
- Server_ORBInitializer,
- "$Id$")
-
-Server_ORBInitializer::Server_ORBInitializer (void)
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableInterceptor::ServerRequestInterceptor_var interceptor(
- new Echo_Server_Request_Interceptor);
-
- info->add_server_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.h
deleted file mode 100644
index f02c068b74f..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Server_ORBInitializer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file Server_ORBInitializer.h
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-
-#ifndef Server_ORBInitializer__h_
-#define Server_ORBInitializer__h_
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-class Server_ORBInitializer
- : public virtual PortableInterceptor::ORBInitializer
- , public virtual TAO_Local_RefCounted_Object
-{
-public:
- Server_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#include /**/ "ace/post.h"
-#endif /* Client_ORBInitializer__h_ */
diff --git a/TAO/tests/Portable_Interceptors/AMI/Shared_Interceptor.h b/TAO/tests/Portable_Interceptors/AMI/Shared_Interceptor.h
deleted file mode 100644
index 9bc2f8b241b..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Shared_Interceptor.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * @file Shared_Interceptor.h
- *
- * $Id$
- *
- */
-#ifndef Shared_Interceptor__h_
-#define Shared_Interceptor__h_
-
-#include "tao/IOPC.h"
-
-// Unreserved (and probably unwanted) ServiceId
-const IOP::ServiceId service_id = 0xdeadbeef;
-
-const char magic_cookie[] = "Magic Cookie";
-const CORBA::ULong magic_cookie_len = sizeof(magic_cookie);
-
-#endif /* Shared_Interceptor__h_ */
diff --git a/TAO/tests/Portable_Interceptors/AMI/Test.idl b/TAO/tests/Portable_Interceptors/AMI/Test.idl
deleted file mode 100644
index 12dc7a0df2f..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/Test.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @file Test.idl
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-
-module Test
-{
-
- interface Echo
- {
- string echo_operation(in string the_input);
-
- void shutdown();
- };
-
-};
diff --git a/TAO/tests/Portable_Interceptors/AMI/client.cpp b/TAO/tests/Portable_Interceptors/AMI/client.cpp
deleted file mode 100644
index 571ccf476a0..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/client.cpp
+++ /dev/null
@@ -1,319 +0,0 @@
-#include "Echo_Handler.h"
-#include "Client_ORBInitializer.h"
-#include "Client_Interceptor.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-#include <iostream>
-
-ACE_RCSID (AMI,
- client,
- "$Id$")
-
-
-const char *ior = "file://test.ior";
-static int exit_status = 0;
-const unsigned long ITERATIONS = 100;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-static void test_synchronous (Test::Echo_ptr echo
- ACE_ENV_ARG_DECL);
-
-static void test_ami (CORBA::ORB_ptr orb,
- Test::Echo_ptr echo
- ACE_ENV_ARG_DECL);
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- {
- PortableInterceptor::ORBInitializer_var initializer (
- new Client_ORBInitializer);
- PortableInterceptor::register_orb_initializer (initializer.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var tmp =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Echo_var echo =
- Test::Echo::_narrow (tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (echo.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Echo reference <%s>\n",
- ior),
- 1);
- }
-
- test_synchronous (echo.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_ami (orb.in (),
- echo.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- echo->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- unsigned long request_count =
- Echo_Client_Request_Interceptor::request_count;
- unsigned long response_count =
- Echo_Client_Request_Interceptor::reply_count
- + Echo_Client_Request_Interceptor::other_count
- + Echo_Client_Request_Interceptor::exception_count;
-
- if (request_count != response_count)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Mismatched count of requests and responses "
- " (request = %d, response = %d)\n",
- request_count, response_count));
- }
-
- if (request_count == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: No requests handled "));
- }
-
- if (response_count == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: No response handled "));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return exit_status;
-}
-
-static void
-test_synchronous (Test::Echo_ptr echo
- ACE_ENV_ARG_DECL)
-{
- unsigned long initial_request_count =
- Echo_Client_Request_Interceptor::request_count;
- unsigned long initial_reply_count =
- Echo_Client_Request_Interceptor::reply_count;
-
- for (unsigned long i = 0; i != ITERATIONS; ++i)
- {
- CORBA::String_var s =
- echo->echo_operation ("dummy message"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- unsigned long total_request_count =
- Echo_Client_Request_Interceptor::request_count - initial_request_count;
- unsigned long total_reply_count =
- Echo_Client_Request_Interceptor::reply_count - initial_reply_count;
-
- if (total_request_count != ITERATIONS
- || total_reply_count != ITERATIONS)
- {
- ACE_ERROR((LM_ERROR,
- "ERROR: Invalid or mismatched request/reply "
- "count (request = %d, reply = %d)\n",
- total_request_count, total_reply_count));
- exit_status = 1;
- }
-
- if (total_request_count == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: No synchronouse requests handled "));
- }
-
- if (total_reply_count == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: No synchronouse requests handled "));
- }
-}
-
-static void
-test_ami (CORBA::ORB_ptr orb,
- Test::Echo_ptr echo
- ACE_ENV_ARG_DECL)
-{
- Test::AMI_EchoHandler_var echo_handler;
- Echo_Handler * echo_handler_impl = new Echo_Handler;
-
- PortableServer::ServantBase_var safe_echo_handler = echo_handler_impl;
-
- echo_handler =
- echo_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- unsigned long initial_request_count =
- Echo_Client_Request_Interceptor::request_count;
- unsigned long initial_other_count =
- Echo_Client_Request_Interceptor::other_count;
-
- for (unsigned long i = 0; i != ITERATIONS; ++i)
- {
- echo->sendc_echo_operation (
- echo_handler.in (),
- "dummy message"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- unsigned long total_request_count =
- Echo_Client_Request_Interceptor::request_count - initial_request_count;
- unsigned long total_other_count =
- Echo_Client_Request_Interceptor::other_count - initial_other_count;
-
- if (total_request_count != ITERATIONS
- || total_other_count != ITERATIONS)
- {
- ACE_ERROR((LM_ERROR,
- "ERROR: In test_ami () unexpected request/other "
- "count (request = %d, other = %d)\n",
- total_request_count, total_other_count));
- exit_status = 1;
- }
-
- initial_request_count =
- Echo_Client_Request_Interceptor::request_count;
- unsigned long initial_reply_count =
- Echo_Client_Request_Interceptor::reply_count;
-
- while (echo_handler_impl->replies () != ITERATIONS)
- {
- CORBA::Boolean pending =
- orb->work_pending (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (pending)
- {
- orb->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- }
-
- total_request_count =
- Echo_Client_Request_Interceptor::request_count - initial_request_count;
- unsigned long total_reply_count =
- Echo_Client_Request_Interceptor::reply_count - initial_reply_count;
-
- if (total_request_count != ITERATIONS
- || total_reply_count != ITERATIONS)
- {
- ACE_ERROR((LM_ERROR,
- "ERROR: In test_ami () unexpected request/reply "
- "count (request = %d, reply = %d)\n",
- total_request_count, total_reply_count));
- exit_status = 1;
- }
-}
-
-#if 0
-static void
-wait_for_exception (CORBA::ORB_ptr orb,
- Test::Echo_ptr echo
- ACE_ENV_ARG_DECL)
-{
- ACE_Time_Value tv (1, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- bool exception_detected = false;
-
- while(!exception_detected)
- {
- ACE_TRY
- {
- CORBA::String_var dummy =
- echo->echo_operation ("foo"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- exception_detected = true;
- }
- ACE_ENDTRY;
- }
-
- tv = ACE_Time_Value (1, 0);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-#endif /*if 0*/
diff --git a/TAO/tests/Portable_Interceptors/AMI/run_test.pl b/TAO/tests/Portable_Interceptors/AMI/run_test.pl
deleted file mode 100755
index 651271d4d03..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/AMI/server.cpp b/TAO/tests/Portable_Interceptors/AMI/server.cpp
deleted file mode 100644
index 0c52ac89b18..00000000000
--- a/TAO/tests/Portable_Interceptors/AMI/server.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-#include "Echo.h"
-#include "Server_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-
-ACE_RCSID (Portable_Interceptors,
- AMI,
- "$Id$")
-
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- {
- PortableInterceptor::ORBInitializer_var initializer(
- new Server_ORBInitializer);
- PortableInterceptor::register_orb_initializer(initializer.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Echo *echo_impl;
- ACE_NEW_RETURN (echo_impl,
- Echo (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(echo_impl);
-
- Test::Echo_var echo =
- echo_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (echo.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc b/TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc
deleted file mode 100644
index d53cfd5839c..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/AdvSlot.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-project(*idl): taoidldefaults {
- IDL_Files {
- StateTransfer.idl
- }
- custom_only = 1
-}
-
-project(*Server): taoserver, pi_server, exceptions {
- after += *idl
- Source_Files {
- StateTransferS.cpp
- StateTransferC.cpp
- server.cpp
- }
- IDL_Files {
- }
-}
-
-project(*Client): taoclient, exceptions {
- after += *idl
- Source_Files {
- StateTransferC.cpp
- client.cpp
- }
- IDL_Files {
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl b/TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl
deleted file mode 100644
index 663d4c57cbc..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/StateTransfer.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// file : StateTransfer.idl
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-interface StateTransfer
-{
- short
- number ();
-
- oneway void
- shutdown ();
-};
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/client.cpp b/TAO/tests/Portable_Interceptors/AdvSlot/client.cpp
deleted file mode 100644
index 0a9b7436bf1..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/client.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "StateTransferC.h"
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- 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::Short n = server->number ();
-
- ACE_DEBUG ((LM_ERROR, "Got number %d\n", n));
-
- server->shutdown ();
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/run_test.pl b/TAO/tests/Portable_Interceptors/AdvSlot/run_test.pl
deleted file mode 100755
index 2cfe882b1b5..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("server.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "file://$file");
-
-print STDERR "\n\n==== Running advanced slot test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/AdvSlot/server.cpp b/TAO/tests/Portable_Interceptors/AdvSlot/server.cpp
deleted file mode 100644
index 6c5f5825295..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlot/server.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "ace/OS_NS_stdio.h"
-
-#include "StateTransferS.h"
-
-using namespace CORBA;
-using namespace PortableServer;
-using namespace PortableInterceptor;
-
-//
-//
-PortableInterceptor::SlotId slot_id;
-
-
-//
-//
-class StateTransferImpl: public virtual POA_StateTransfer
-{
-public:
- StateTransferImpl (ORB_ptr orb)
- : orb_ (ORB::_duplicate (orb))
- {
- }
-
- virtual Short
- number () throw (SystemException)
- {
- // Prepare state update.
- //
- Any state;
- CORBA::Long number = 5;
- state <<= number;
-
- Object_var obj (orb_->resolve_initial_references ("PICurrent"));
- PortableInterceptor::Current_var pic (
- PortableInterceptor::Current::_narrow (obj.in ()));
-
- pic->set_slot (slot_id, state);
-
- return 1;
- }
-
- virtual void
- shutdown () throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "Server is shutting down.\n"));
- this->orb_->shutdown (0);
- }
-
-private:
- ORB_var orb_;
-};
-
-
-//
-//
-class ReplicaController: public virtual ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual char*
- name () throw (SystemException)
- {
- return string_dup ("ReplicaController");
- }
-
- virtual void
- destroy () throw (SystemException)
- {
- }
-
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- virtual void
- tao_ft_interception_point (ServerRequestInfo_ptr, OctetSeq_out)
- throw (SystemException, ForwardRequest)
- {
- }
-#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
-
- virtual void
- receive_request_service_contexts (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- receive_request (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- send_reply (ServerRequestInfo_ptr ri) throw (SystemException)
- {
- Any_var state (ri->get_slot (slot_id));
- CORBA::Long n (0);
- state >>= n;
-
- if (n == 5)
- ACE_DEBUG ((LM_DEBUG, "State value is correctly %d.\n", n));
- else
- ACE_ERROR ((LM_ERROR, "ERROR: State value is incorrectly %d.\n", n));
- }
-
- virtual void
- send_exception (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- send_other (ServerRequestInfo_ptr) throw (SystemException, ForwardRequest)
- {
- }
-};
-
-
-//
-//
-class ORB_Initializer : public virtual ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (ORBInitInfo_ptr) throw (SystemException)
- {
- }
-
- virtual void
- post_init (ORBInitInfo_ptr info) throw (SystemException)
- {
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
-
-
- ServerRequestInterceptor_var interceptor (new ReplicaController ());
- info->add_server_request_interceptor (interceptor.in ());
- }
-};
-
-int
-main (int argc, char *argv[])
-{
- ORBInitializer_var orb_initializer (new ORB_Initializer ());
- register_orb_initializer (orb_initializer.in ());
-
- ORB_var orb (ORB_init (argc, argv));
-
- Object_var obj (orb->resolve_initial_references ("RootPOA"));
-
- 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);
-
- StateTransfer_var ref (impl->_this ());
- String_var ior (orb->object_to_string (ref.in ()));
-
- poa_manager->activate ();
-
-
- // Dump the ior.
- //
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in 'server.ior'\n"));
-
-
- // Run the ORB event loop.
- //
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc
deleted file mode 100644
index 0242f6d3360..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/AdvSlotDblCpy.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-project(*idl): taoidldefaults {
- IDL_Files {
- InvokeMe.idl
- }
- custom_only = 1
-}
-
-project(*Server): taoserver, pi_server, exceptions {
- after += *idl
- Source_Files {
- InvokeMeS.cpp
- InvokeMeC.cpp
- server.cpp
- }
- IDL_Files {
- }
-}
-
-project(*Client): taoclient, exceptions {
- after += *idl
- Source_Files {
- InvokeMeC.cpp
- client.cpp
- }
- IDL_Files {
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl
deleted file mode 100644
index a6f58fd0b93..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/InvokeMe.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// file : StateTransfer.idl
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-interface InvokeMe
-{
- void
- invoke_me ();
-
- oneway void
- shutdown ();
-};
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README
deleted file mode 100644
index 0ccccc13a8c..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/README
+++ /dev/null
@@ -1,60 +0,0 @@
-The test should complete without exceptions or asserts.
-
-This test checks that simply calling GetSlot works at every
-Server side interception point.
-
-This used to trigger the following assert in the send_reply
-interception point if the slot had not actually been updated
-after the RSC->TSC logical copy that occurs after the
-"receive_request_service_contexts" (such as in the
-"receive_request" or the actual IDL interface implementation
-code) before the logical copy TSC->RSC that then occurs
-before the "send_reply" interception point.
-
-send_reply -> get_slot(TSC) -> long (62) SERVER
-send_reply -> get_slot(RSC)
-ACE_ASSERT: file ...\TAO\tao\PI\PICurrent_Impl.cpp, line 53
-assertion failed for 'this->lc_slot_table_ !=
-&this->slot_table_'.Aborting...
-
-This test also checks that the set_slot(RSC) does not effect
-the TSC that exists before the first logical copy (at the end
-of receive_request_service_contexts) and after the second
-logical copy that occurs after the IDL interface implimentation
-call (i.e. during send_reply).
-
-The run should look like this:
-
-Allocated slot with id 0.
-Server is ready, IOR is in 'server.ior'
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> set_slot(RSC) -> long (62)
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(RSC) -> is long (62) -> OK
-invoke_me
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (62) -> OK
-SERVER send_reply -> set_slot(RSC) -> long (63)
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (63) -> OK
-
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is EMPTY -> OK
-SERVER receive_request_service_contexts -> set_slot(RSC) -> long (62)
-SERVER receive_request_service_contexts -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request_service_contexts -> get_slot(RSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(TSC) -> is long (62) -> OK
-SERVER receive_request -> get_slot(RSC) -> is long (62) -> OK
-invoke_me
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (62) -> OK
-SERVER send_reply -> set_slot(RSC) -> long (63)
-SERVER send_reply -> get_slot(TSC) -> is long (62) -> OK
-SERVER send_reply -> get_slot(RSC) -> is long (63) -> OK
-
-
-Server is shutting down.
-Event loop finished.
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp
deleted file mode 100644
index 8a959137c9a..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "InvokeMeC.h"
-
-namespace
-{
- class always
- {
- const InvokeMe_ptr server_;
- public:
- always(const InvokeMe_ptr x):server_(x) {}
- ~always()
- {
- ACE_DEBUG ((LM_DEBUG, "\n"));
- server_->shutdown ();
- }
- };
-}
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- 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 ());
-
- always Shutdown( server.in () ); // When goes out of scope!
- server->invoke_me ();
- ACE_DEBUG ((LM_DEBUG, "\n"));
- server->invoke_me ();
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl
deleted file mode 100755
index 6adfc99fd7b..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("server.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "file://$file");
-
-print STDERR "\n\n==== Running advanced slot double copy test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp
deleted file mode 100644
index 729804b2872..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/AnyTypeCode/AnyTypeCode_methods.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-#include "ace/OS_NS_stdio.h"
-
-#include "InvokeMeS.h"
-
-using namespace CORBA;
-using namespace PortableServer;
-using namespace PortableInterceptor;
-
-namespace
-{
- PortableInterceptor::SlotId slot_id;
-
- CORBA::Long getMySlot(
- PortableInterceptor::ServerRequestInfo_ptr ri,
- PortableInterceptor::Current_ptr pi_current,
- const char *location,
- const CORBA::Long correctTSCvalue,
- const CORBA::Long correctRSCvalue)
- {
- CORBA::Long number= 0;
- CORBA::String_var
- op= ri->operation ();
-
- const bool correctOperation=
- (0 == ACE_OS::strcmp( op.in (), "invoke_me" ));
-
- if (correctOperation)
- {
- CORBA::Any_var data;
-
- ACE_DEBUG ((LM_DEBUG, "SERVER %s -> get_slot(TSC) -> is ", location));
- data= pi_current->get_slot( slot_id );
- CORBA::TypeCode_var
- tc= data->type();
- if (tc->kind() == CORBA::tk_null)
- {
- ACE_DEBUG ((LM_DEBUG, "EMPTY -> "));
- if (0 != correctTSCvalue)
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
- }
- else if (data.in() >>= number)
- {
- ACE_DEBUG ((LM_DEBUG, "long (%d) -> ", number));
- if ((0 != correctTSCvalue) && (correctTSCvalue != number))
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "UNKNOWN TYPE\n"));
- throw INTERNAL ();
- }
-
- ACE_DEBUG ((LM_DEBUG, "SERVER %s -> get_slot(RSC) -> is ", location));
- data= ri->get_slot( slot_id );
-
- tc= data->type();
- if (tc->kind() == CORBA::tk_null)
- {
- ACE_DEBUG ((LM_DEBUG, "EMPTY -> "));
- if (0 != correctRSCvalue)
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- number= 61;
-#else
- number= 62;
-#endif /* TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 */
- }
- else if (data.in() >>= number)
- {
- ACE_DEBUG ((LM_DEBUG, "long (%d) -> ", number));
- if ((0 != correctRSCvalue) && (correctRSCvalue != number))
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG\n"));
- throw INTERNAL ();
- }
- ACE_DEBUG ((LM_DEBUG, "OK\n"));
- ++number;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "WRONG TYPE\n"));
- throw INTERNAL();
- }
- }
-
- return number;
- }
-
- void getAndSetMySlot(
- PortableInterceptor::ServerRequestInfo_ptr ri,
- PortableInterceptor::Current_ptr pi_current,
- const char *location,
- const CORBA::Long correctTSCvalue,
- const CORBA::Long correctRSCvalue)
- {
- const CORBA::Long number=
- getMySlot(
- ri,
- pi_current,
- location,
- correctTSCvalue,
- correctRSCvalue );
-
- if (number && (0 != ACE_OS::strcmp( location, "receive_request" )))
- {
- // Insert data into the RSC (request scope current).
- CORBA::Any data;
- data <<= number;
-
- ACE_DEBUG ((LM_DEBUG, "SERVER %s -> set_slot(RSC)", location));
- ri->set_slot( slot_id, data );
-
- ACE_DEBUG ((LM_DEBUG, " -> long (%d)\n", number));
-
- getMySlot(
- ri,
- pi_current,
- location,
- correctTSCvalue,
- number );
- }
- }
-}
-
-//
-//
-class InvokeMeImpl: public virtual POA_InvokeMe
-{
-public:
- InvokeMeImpl (ORB_ptr orb)
- : orb_ (ORB::_duplicate (orb))
- {
- }
-
- virtual void invoke_me() throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "invoke_me\n"));
- }
-
- virtual void
- shutdown () throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "\nServer is shutting down.\n"));
- this->orb_->shutdown (0);
- }
-
-private:
- ORB_var orb_;
-};
-
-
-//
-//
-class ReplicaController: public virtual ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- PortableInterceptor::Current_ptr pi_current_;
-public:
- ReplicaController ( PortableInterceptor::Current_ptr pi_current )
- : pi_current_( pi_current )
- {
- }
-
- virtual char*
- name () throw (SystemException)
- {
- return string_dup ("ReplicaController");
- }
-
- virtual void
- destroy () throw (SystemException)
- {
- }
-
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- virtual void
- tao_ft_interception_point (ServerRequestInfo_ptr ri, OctetSeq_out)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "tao_ft_interception_point", 0, 0 );
- }
-#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
-
- virtual void
- receive_request_service_contexts (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- getAndSetMySlot( ri, this->pi_current_, "receive_request_service_contexts", 0, 61 );
-#else
- getAndSetMySlot( ri, this->pi_current_, "receive_request_service_contexts", 0, 0 );
-#endif /* TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1 */
- }
-
- virtual void
- receive_request (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "receive_request", 62, 62 );
- }
-
- virtual void
- send_reply (ServerRequestInfo_ptr ri) throw (SystemException)
- {
- getAndSetMySlot( ri, this->pi_current_, "send_reply", 62, 62 );
- }
-
- virtual void
- send_exception (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "send_exception", 62, 62 );
- }
-
- virtual void
- send_other (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- getAndSetMySlot( ri, this->pi_current_, "send_other", 62, 62 );
- }
-};
-
-
-//
-//
-class ORB_Initializer : public virtual ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (ORBInitInfo_ptr) throw (SystemException)
- {
- }
-
- virtual void
- post_init (ORBInitInfo_ptr info) throw (SystemException)
- {
- CORBA::Object_var obj =
- info->resolve_initial_references ("PICurrent");
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in ());
-
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
-
- ServerRequestInterceptor_var
- interceptor (new ReplicaController (pi_current.in ()));
- info->add_server_request_interceptor (interceptor.in ());
- }
-};
-
-int
-main (int argc, char *argv[])
-{
- ORBInitializer_var orb_initializer (new ORB_Initializer ());
- register_orb_initializer (orb_initializer.in ());
-
- ORB_var orb (ORB_init (argc, argv));
-
- Object_var obj (orb->resolve_initial_references ("RootPOA"));
-
- POA_var root_poa (POA::_narrow (obj.in ()));
- POAManager_var poa_manager (root_poa->the_POAManager ());
-
- InvokeMeImpl* impl = new InvokeMeImpl (orb.in ());
- ServantBase_var impl_var (impl);
-
- InvokeMe_var ref (impl->_this ());
- String_var ior (orb->object_to_string (ref.in ()));
-
- poa_manager->activate ();
-
-
- // Dump the ior.
- //
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in 'server.ior'\n"));
-
-
- // Run the ORB event loop.
- //
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc b/TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc
deleted file mode 100644
index d53cfd5839c..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/AdvSlotExt.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-project(*idl): taoidldefaults {
- IDL_Files {
- StateTransfer.idl
- }
- custom_only = 1
-}
-
-project(*Server): taoserver, pi_server, exceptions {
- after += *idl
- Source_Files {
- StateTransferS.cpp
- StateTransferC.cpp
- server.cpp
- }
- IDL_Files {
- }
-}
-
-project(*Client): taoclient, exceptions {
- after += *idl
- Source_Files {
- StateTransferC.cpp
- client.cpp
- }
- IDL_Files {
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl b/TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl
deleted file mode 100644
index 663d4c57cbc..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/StateTransfer.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-// file : StateTransfer.idl
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-interface StateTransfer
-{
- short
- number ();
-
- oneway void
- shutdown ();
-};
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp b/TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp
deleted file mode 100644
index 0a9b7436bf1..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/client.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "StateTransferC.h"
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- 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::Short n = server->number ();
-
- ACE_DEBUG ((LM_ERROR, "Got number %d\n", n));
-
- server->shutdown ();
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl b/TAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl
deleted file mode 100755
index 2cfe882b1b5..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("server.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "");
-}
-else {
- $SV = new PerlACE::Process ("server", "");
-}
-$CL = new PerlACE::Process ("client", "file://$file");
-
-print STDERR "\n\n==== Running advanced slot test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp b/TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp
deleted file mode 100644
index 1a1256f6ad7..00000000000
--- a/TAO/tests/Portable_Interceptors/AdvSlotExt/server.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#include "ace/OS_NS_stdio.h"
-
-#include "StateTransferS.h"
-
-using namespace CORBA;
-using namespace PortableServer;
-using namespace PortableInterceptor;
-
-//
-//
-PortableInterceptor::SlotId slot_id;
-
-
-//
-//
-class StateTransferImpl: public virtual POA_StateTransfer
-{
-public:
- StateTransferImpl (ORB_ptr orb)
- : orb_ (ORB::_duplicate (orb))
- {
- }
-
- virtual Short
- number () throw (SystemException)
- {
- // Prepare state update.
- //
- Any state;
- CORBA::Long number = 5;
- state <<= number;
-
- Object_var obj (orb_->resolve_initial_references ("PICurrent"));
- PortableInterceptor::Current_var pic (
- PortableInterceptor::Current::_narrow (obj.in ()));
-
- pic->set_slot (slot_id, state);
-
- return 1;
- }
-
- virtual void
- shutdown () throw (SystemException)
- {
- ACE_DEBUG ((LM_DEBUG, "Server is shutting down.\n"));
- this->orb_->shutdown (0);
- }
-
-private:
- ORB_var orb_;
-};
-
-
-//
-//
-class ReplicaController: public virtual ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- ReplicaController (PortableInterceptor::Current_ptr pi_current)
- : pi_current_ (PortableInterceptor::Current::_duplicate (pi_current))
- {
- }
-
- virtual char*
- name () throw (SystemException)
- {
- return string_dup ("ReplicaController");
- }
-
- virtual void
- destroy () throw (SystemException)
- {
- }
-
-#if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
- virtual void
- tao_ft_interception_point (ServerRequestInfo_ptr, OctetSeq_out)
- throw (SystemException, ForwardRequest)
- {
- }
-#endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
-
- virtual void
- receive_request_service_contexts (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- receive_request (ServerRequestInfo_ptr ri)
- throw (SystemException, ForwardRequest)
- {
- Any state;
- CORBA::Long number = 5;
- state <<= number;
-
- // After we have set things to TSC, change the value in RSC, at this
- // moment no copy should be done anymore.
- pi_current_->set_slot (slot_id, state);
- CORBA::Long number6 = 6;
- state <<= number6;
- ri->set_slot (slot_id, state);
-
- Any_var state_get (pi_current_->get_slot (slot_id));
- CORBA::Long n (0);
- state_get >>= n;
-
- if (n == 5)
- ACE_DEBUG ((LM_DEBUG, "State value is correctly %d.\n", n));
- else
- ACE_ERROR ((LM_ERROR, "ERROR: State value is incorrectly %d.\n", n));
- }
-
- virtual void
- send_reply (ServerRequestInfo_ptr ri) throw (SystemException)
- {
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- if (ACE_OS::strcmp (op.in (), "number") != 0)
- return; // Don't mess with PICurrent if not invoking test method.
-
- Any_var state (ri->get_slot (slot_id));
- CORBA::Long n (0);
- state >>= n;
-
- if (n == 5)
- ACE_DEBUG ((LM_DEBUG, "State value is correctly %d.\n", n));
- else
- ACE_ERROR ((LM_ERROR, "ERROR: State value is incorrectly %d.\n", n));
- }
-
- virtual void
- send_exception (ServerRequestInfo_ptr)
- throw (SystemException, ForwardRequest)
- {
- }
-
- virtual void
- send_other (ServerRequestInfo_ptr) throw (SystemException, ForwardRequest)
- {
- }
- PortableInterceptor::Current_var pi_current_;
-};
-
-
-//
-//
-class ORB_Initializer : public virtual ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (ORBInitInfo_ptr) throw (SystemException)
- {
- }
-
- virtual void
- post_init (ORBInitInfo_ptr info) throw (SystemException)
- {
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
-
- CORBA::Object_var obj =
- info->resolve_initial_references ("PICurrent");
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in ());
-
- if (CORBA::is_nil (pi_current.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Could not resolve PICurrent object.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- ServerRequestInterceptor_var interceptor (new ReplicaController (pi_current.in ()));
- info->add_server_request_interceptor (interceptor.in ());
- }
-};
-
-int
-main (int argc, char *argv[])
-{
- ORBInitializer_var orb_initializer (new ORB_Initializer ());
- register_orb_initializer (orb_initializer.in ());
-
- ORB_var orb (ORB_init (argc, argv));
-
- Object_var obj (orb->resolve_initial_references ("RootPOA"));
-
- 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);
-
- StateTransfer_var ref (impl->_this ());
- String_var ior (orb->object_to_string (ref.in ()));
-
- poa_manager->activate ();
-
-
- // Dump the ior.
- //
- FILE *output_file= ACE_OS::fopen ("server.ior", "w");
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in 'server.ior'\n"));
-
-
- // Run the ORB event loop.
- //
- orb->run ();
-
- root_poa->destroy (1, 1);
- orb->destroy ();
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/.cvsignore b/TAO/tests/Portable_Interceptors/Benchmark/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.cpp
deleted file mode 100644
index 4cad9dde31b..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-#include "client_interceptors.h"
-#include "Interceptor_Type.h"
-
-ACE_RCSID (Benchmark, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (int interceptor_type)
- : interceptor_type_ (interceptor_type)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- PortableInterceptor::ClientRequestInterceptor_ptr tmp =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- switch (this->interceptor_type_)
- {
- default:
- case IT_NONE:
- return;
-
- case IT_NOOP:
- {
- // Installing the Vault interceptor
- ACE_NEW_THROW_EX (tmp,
- Vault_Client_Request_NOOP_Interceptor (),
- CORBA::NO_MEMORY ());
- break;
- }
- case IT_CONTEXT:
- {
- // Installing the Vault interceptor
- ACE_NEW_THROW_EX (tmp,
- Vault_Client_Request_Context_Interceptor (),
- CORBA::NO_MEMORY ());
- break;
- }
- case IT_DYNAMIC:
- {
- // Installing the Vault interceptor
- ACE_NEW_THROW_EX (tmp,
- Vault_Client_Request_Dynamic_Interceptor (),
- CORBA::NO_MEMORY ());
- break;
- }
- }
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var interceptor = tmp;
-
- info->add_client_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.h
deleted file mode 100644
index f26c625ffbe..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/Client_ORBInitializer.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (int interceptor_type);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- int interceptor_type_;
- // The type of interceptor that this initializer will create
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp b/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp
deleted file mode 100644
index 4d79250c2cb..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Interceptor_Type.h"
-#include "ace/OS_String.h"
-
-ACE_RCSID (Benchmark, Interceptor_Type, "$Id$")
-
-void get_interceptor_type (int argc, char *argv[],
- int &interceptor_type)
-{
- interceptor_type = IT_NONE;
- for (int i = 1; i < argc - 1; ++i)
- {
- if (ACE_OS_String::strcmp (argv[i], "-r") == 0)
- {
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("none")) == 0)
- interceptor_type = IT_NONE;
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("noop")) == 0)
- interceptor_type = IT_NOOP;
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("context")) == 0)
- interceptor_type = IT_CONTEXT;
- if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("dynamic")) == 0)
- interceptor_type = IT_DYNAMIC;
- }
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.h b/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.h
deleted file mode 100644
index aed618939fa..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_INTERCEPTOR_TYPE_H
-#define TAO_INTERCEPTOR_TYPE_H
-#include /**/ "ace/pre.h"
-
-#include "ace/config-all.h"
-
-/// The different type of interceptors have different functionality
-/// to perform.
-enum Interceptor_Type
-{
- /// Do not register an interceptor
- IT_NONE,
-
- /// Does nothing on all interception points
- IT_NOOP,
-
- /// Perform service context manipulation
- IT_CONTEXT,
-
- /// Invoke dynamic interface methods and does extraction from anys.
- IT_DYNAMIC
-};
-
-void get_interceptor_type (int argc, char *argv[],
- int &interceptor_type);
-
-#include /**/ "ace/post.h"
-#endif /* TAO_INTERCEPTOR_TYPE_H */
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc b/TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc
deleted file mode 100644
index 59737568104..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/PI_Benchmark.mpc
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- server_interceptors.cpp
- marker.cpp
- Server_ORBInitializer.cpp
- Interceptor_Type.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- client_interceptors.cpp
- marker.cpp
- Client_ORBInitializer.cpp
- Interceptor_Type.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/README b/TAO/tests/Portable_Interceptors/Benchmark/README
deleted file mode 100644
index 17bd3d2d88d..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/README
+++ /dev/null
@@ -1,10 +0,0 @@
-# $Id$
-
-This test allows you to visually check the correct invocation of
-TAO's portable interceptors, especially the Dynamic interface.
-
- To run the test, try:
-
- server -o test.ior
-
- client
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.cpp
deleted file mode 100644
index 5ab4c2336d5..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Server_ORBInitializer.h"
-#include "Interceptor_Type.h"
-#include "server_interceptors.h"
-
-ACE_RCSID (Benchmark,
- Server_ORBInitializer,
- "$Id$")
-
-Server_ORBInitializer::Server_ORBInitializer (int interceptor_type)
- : interceptor_type_ (interceptor_type)
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- PortableInterceptor::ServerRequestInterceptor_ptr tmp =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- switch (this->interceptor_type_)
- {
- default:
- case IT_NONE:
- return;
-
- case IT_NOOP:
- {
- // Installing the Vault interceptor
- ACE_NEW_THROW_EX (tmp,
- Vault_Server_Request_NOOP_Interceptor (),
- CORBA::NO_MEMORY ());
- break;
- }
- case IT_CONTEXT:
- {
- // Installing the Vault interceptor
- ACE_NEW_THROW_EX (tmp,
- Vault_Server_Request_Context_Interceptor (),
- CORBA::NO_MEMORY ());
- break;
- }
- case IT_DYNAMIC:
- {
- // Installing the Vault interceptor
- ACE_NEW_THROW_EX (tmp,
- Vault_Server_Request_Dynamic_Interceptor (),
- CORBA::NO_MEMORY ());
- break;
- }
- }
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var interceptor = tmp;
-
- info->add_server_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.h
deleted file mode 100644
index 599301a17d9..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/Server_ORBInitializer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Server ORB initializer.
-class Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Server_ORBInitializer (int interceptor_type);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- int interceptor_type_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/client.cpp b/TAO/tests/Portable_Interceptors/Benchmark/client.cpp
deleted file mode 100644
index a874f7d3121..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/client.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "marker.h"
-#include "Client_ORBInitializer.h"
-#include "Interceptor_Type.h"
-
-#include "tao/debug.h"
-#include "tao/ORBInitializer_Registry.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_errno.h"
-
-ACE_RCSID (Benchmark,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 5;
-int register_interceptor = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "ef:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'e':
- break;
- case 'f':
- ior = get_opts.opt_arg ();
- break;
- case 'n':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-v -r <register_interceptor> "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-
-
-void
-run_test (Test_Interceptors::Secure_Vault_ptr server
- ACE_ENV_ARG_DECL)
-{
- int i = 0;
- const char user[] = "root";
- Marker marker;
- ACE_Throughput_Stats throughput;
-
- ACE_DEBUG ((LM_DEBUG, "High res. timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- marker.accumulate_into (throughput, 1);
- ACE_hrtime_t throughput_base = ACE_OS::gethrtime ();
- for (i = 0; i < niterations ; ++i)
- {
- // Record current time.
- ACE_hrtime_t latency_base = ACE_OS::gethrtime ();
-
- server->ready (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Grab timestamp again.
- ACE_hrtime_t now = ACE_OS::gethrtime ();
-
- // Record statistics.
- marker.sample (now - throughput_base,
- now - latency_base,
- 1);
-
- ACE_CHECK;
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i));
- }
-
- marker.dump_stats ("Ready method ", gsf, 1);
-
- ACE_TRY
- {
- marker.accumulate_into (throughput, 2);
- throughput_base = ACE_OS::gethrtime ();
-
- for (i = 0; i < niterations ; ++i)
- {
- // Record current time.
- ACE_hrtime_t latency_base = ACE_OS::gethrtime ();
-
- server->authenticate (user ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Grab timestamp again.
- ACE_hrtime_t now = ACE_OS::gethrtime ();
-
- // Record statistics.
- marker.sample (now - throughput_base,
- now - latency_base,
- 2);
-
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i));
- }
- marker.dump_stats ("Authenticate method ", gsf, 2);
- }
- ACE_CATCH (Test_Interceptors::Invalid, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "Invalid user\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- Test_Interceptors::Secure_Vault::Record record;
- record.check_num = 1;
- record.amount = 1000;
- CORBA::Long id = 1;
-
- marker.accumulate_into (throughput, 3);
- throughput_base = ACE_OS::gethrtime ();
-
- for (i = 0; i < niterations ; ++i)
- {
- // Record current time.
- ACE_hrtime_t latency_base = ACE_OS::gethrtime ();
-
- server->update_records (id,
- record
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Grab timestamp again.
- ACE_hrtime_t now = ACE_OS::gethrtime ();
-
- // Record statistics.
- marker.sample (now - throughput_base,
- now - latency_base,
- 3);
-
- ACE_CHECK;
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i));
-
- }
-
- marker.dump_stats ("update records method ", gsf, 3);
-}
-
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- int interceptor_type;
- get_interceptor_type (argc, argv, interceptor_type);
-
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Client_ORBInitializer (interceptor_type),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Secure_Vault_var server =
- Test_Interceptors::Secure_Vault::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "\nFunctionality test begins now...\n"));
-
- // This test is useful for benchmarking the differences when
- // the same method is intercepted by different interceptors
- // wanting to achieve different functionality.
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.cpp b/TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.cpp
deleted file mode 100644
index 0086a292ed7..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.cpp
+++ /dev/null
@@ -1,495 +0,0 @@
-// $Id$
-
-#include "client_interceptors.h"
-
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Benchmark,
- client_interceptors,
- "$Id$")
-
-const CORBA::ULong request_ctx_id = 0xdead;
-//const CORBA::ULong reply_ctx_id = 0xbeef; // Never used.
-
-Vault_Client_Request_Interceptor::Vault_Client_Request_Interceptor (void)
- : myname_ ("Vault_Client_Interceptor")
-{
-}
-
-Vault_Client_Request_Interceptor::~Vault_Client_Request_Interceptor ()
-{
-}
-
-char *
-Vault_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "authenticate") == 0)
- {
- // Make the context to send the context to the target.
- IOP::ServiceContext sc;
- sc.context_id = request_ctx_id;
-
- const char passwd[] = "root123";
- CORBA::ULong string_len = sizeof (passwd) + 1;
- CORBA::Octet *buf = 0;
- ACE_NEW (buf,
- CORBA::Octet [string_len]);
- ACE_OS::strcpy (reinterpret_cast<char *> (buf), passwd);
-
- sc.context_data.replace (string_len, string_len, buf, 1);
-
- // Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test_Interceptors::Secure_Vault::Record *record;
- CORBA::Long id;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= id;
- paramlist[i].argument >>= record;
- }
-}
-
-void
-Vault_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- CORBA::Long result;
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
- }
-}
-
-void
-Vault_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Any_var any = ri->received_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var tc = any->type ();
-
- const char *id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (id, exception_id.in ()) != 0)
- ACE_ERROR ((LM_ERROR,
- "Mismatched exception IDs: %s != %s\n",
- id,
- exception_id.in ()));
-}
-
-
-////////////////////////////////// Context /////////////////////////
-
-Vault_Client_Request_Context_Interceptor::Vault_Client_Request_Context_Interceptor (void)
- : myname_ ("Vault_Client_Context_Interceptor")
-{
-}
-
-Vault_Client_Request_Context_Interceptor::~Vault_Client_Request_Context_Interceptor ()
-{
-}
-
-char *
-Vault_Client_Request_Context_Interceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Client_Request_Context_Interceptor::destroy (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Client_Request_Context_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_Context_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- // MAke the context to send the context to the target
- IOP::ServiceContext sc;
- sc.context_id = request_ctx_id;
-
- const char passwd[] = "root123";
- CORBA::ULong string_len = sizeof (passwd) + 1;
- CORBA::Octet *buf = 0;
- ACE_NEW_THROW_EX (buf,
- CORBA::Octet [string_len],
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- ACE_OS::strcpy (reinterpret_cast<char *> (buf), passwd);
-
- sc.context_data.replace (string_len, string_len, buf, 1);
-
- // Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Vault_Client_Request_Context_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_Context_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
-}
-
-void
-Vault_Client_Request_Context_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Any_var any = ri->received_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var tc = any->type ();
-
- const char *id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (id, exception_id.in ()) != 0)
- ACE_ERROR ((LM_ERROR,
- "Mismatched exception IDs %s != %s\n",
- id,
- exception_id.in ()));
-}
-
-
-///////////////////////////////////Dynamic ////////////////////////////////////
-
-Vault_Client_Request_Dynamic_Interceptor::Vault_Client_Request_Dynamic_Interceptor (void)
- : myname_ ("Vault_Client_Dynamic_Interceptor")
-{
-}
-
-Vault_Client_Request_Dynamic_Interceptor::~Vault_Client_Request_Dynamic_Interceptor ()
-{
-}
-
-char *
-Vault_Client_Request_Dynamic_Interceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Client_Request_Dynamic_Interceptor::destroy (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Client_Request_Dynamic_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_Dynamic_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "authenticate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *user;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= user;
- }
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test_Interceptors::Secure_Vault::Record *record;
- CORBA::Long id;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= id;
- paramlist[i].argument >>= record;
- }
-}
-
-void
-Vault_Client_Request_Dynamic_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "ready") == 0)
- {
- CORBA::Short result;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
- }
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- CORBA::Long result;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
- }
-}
-
-void
-Vault_Client_Request_Dynamic_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_Dynamic_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Any_var any = ri->received_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var tc = any->type ();
-
- const char *id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (id, exception_id.in ()) != 0)
- ACE_ERROR ((LM_ERROR,
- "Mismatched exception IDs %s != %s\n",
- id,
- exception_id.in ()));
-}
-
-
-//////////////////////////////NOOP///////////////////////////////////////
-
-Vault_Client_Request_NOOP_Interceptor::Vault_Client_Request_NOOP_Interceptor (void)
- : myname_ ("Vault_Client_NOOP_Interceptor")
-{
-}
-
-Vault_Client_Request_NOOP_Interceptor::~Vault_Client_Request_NOOP_Interceptor ()
-{
-}
-
-char *
-Vault_Client_Request_NOOP_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Client_Request_NOOP_Interceptor::destroy (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Client_Request_NOOP_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_NOOP_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
-}
-
-void
-Vault_Client_Request_NOOP_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Client_Request_NOOP_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
-}
-
-void
-Vault_Client_Request_NOOP_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Any_var any = ri->received_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var tc = any->type ();
-
- const char *id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (id, exception_id.in ()) != 0)
- ACE_ERROR ((LM_ERROR,
- "Mismatched exception IDs %s != %s\n",
- id,
- exception_id.in ()));
-}
-
-
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.h b/TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.h
deleted file mode 100644
index 75f8d621f40..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/client_interceptors.h
+++ /dev/null
@@ -1,207 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-
-#include "testC.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Vault_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Client_Request_Interceptor (void);
- // ctor.
- virtual ~Vault_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-class Vault_Client_Request_Context_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Client_Request_Context_Interceptor (void);
- // ctor.
- virtual ~Vault_Client_Request_Context_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-class Vault_Client_Request_Dynamic_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Client_Request_Dynamic_Interceptor (void);
- // ctor.
- virtual ~Vault_Client_Request_Dynamic_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-class Vault_Client_Request_NOOP_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Client_Request_NOOP_Interceptor (void);
- // ctor.
- virtual ~Vault_Client_Request_NOOP_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/marker.cpp b/TAO/tests/Portable_Interceptors/Benchmark/marker.cpp
deleted file mode 100644
index dda5ff3c73b..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/marker.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id$
-#include "marker.h"
-
-void
-Marker::accumulate_into (ACE_Throughput_Stats &throughput,
- int which_method) const
-{
- switch (which_method)
- {
- case 1: // method ready
- throughput.accumulate (this->throughput_method_ready_);
- break;
- case 2: // method authenticate
- throughput.accumulate (this->throughput_method_authenticate_);
- break;
- case 3: // method update_records
- throughput.accumulate (this->throughput_method_update_records_);
- break;
- default:
- break;
- }
-
-}
-
-void
-Marker::dump_stats (const char* msg,
- ACE_UINT32 gsf,
- int which_method)
-{
- switch (which_method)
- {
- case 1: // method ready
- this->throughput_method_ready_.dump_results (msg, gsf);
- break;
- case 2: // method authentciate
- this->throughput_method_authenticate_.dump_results (msg, gsf);
- break;
- case 3: // method update_records
- this->throughput_method_update_records_.dump_results (msg, gsf);
- break;
- default:
- break;
- }
-}
-
-void
-Marker::sample (ACE_hrtime_t throughput_diff,
- ACE_hrtime_t latency_diff,
- int which_method)
-{
- switch (which_method)
- {
- case 1: // method ready
- this->throughput_method_ready_.sample (throughput_diff,
- latency_diff);
- break;
- case 2: // method authentciate
- this->throughput_method_authenticate_.sample (throughput_diff,
- latency_diff);
- break;
- case 3: // method update_records
- this->throughput_method_update_records_.sample (throughput_diff,
- latency_diff);
- break;
- default:
- break;
- }
-
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/marker.h b/TAO/tests/Portable_Interceptors/Benchmark/marker.h
deleted file mode 100644
index 8afb698337e..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/marker.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-
-class Marker
-{
- public:
-
- void accumulate_into (ACE_Throughput_Stats &throughput,
- int which_method) const;
- // Accumulate the throughput statistics into <throughput>
-
- void dump_stats (const char* msg,
- ACE_UINT32 gsf,
- int which_method);
- // Print stats
-
- void sample (ACE_hrtime_t throughput_diff,
- ACE_hrtime_t latency_diff,
- int which_method);
- // get the sample.
-
- private:
- ACE_Throughput_Stats throughput_method_ready_;
- // Keep throughput statistics on a per-thread basis
- ACE_Throughput_Stats throughput_method_authenticate_;
- // Keep throughput statistics on a per-thread basis
- ACE_Throughput_Stats throughput_method_update_records_;
- // Keep throughput statistics on a per-thread basis
-};
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/run_test.pl b/TAO/tests/Portable_Interceptors/Benchmark/run_test.pl
deleted file mode 100755
index 32b233a0ed9..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/run_test.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-$SV = new PerlACE::Process ("server", "-ORBobjrefstyle url -o $file");
-$CL = new PerlACE::Process ("client", "-ORBobjrefstyle url -f file://$file");
-
-print STDERR "\n\n==== Running interceptor Benchmark test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit 0;
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/server.cpp b/TAO/tests/Portable_Interceptors/Benchmark/server.cpp
deleted file mode 100644
index c556aed2940..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/server.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "Server_ORBInitializer.h"
-#include "Interceptor_Type.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Benchmark, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-int register_interceptor = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> -r <register_interceptor>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int interceptor_type;
- get_interceptor_type (argc, argv, interceptor_type);
-
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer (interceptor_type),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Secure_Vault_i server_impl (orb.in ());
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Secure_Vault_var server =
- Test_Interceptors::Secure_Vault::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Test_Interceptors::Secure_Vault: <%s>\n",
- ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.cpp b/TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.cpp
deleted file mode 100644
index a11b66691d3..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.cpp
+++ /dev/null
@@ -1,405 +0,0 @@
-// $Id$
-
-#include "server_interceptors.h"
-
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Benchmark,
- server_interceptors,
- "$Id$")
-
-const CORBA::ULong request_ctx_id = 0xdead;
-//const CORBA::ULong reply_ctx_id = 0xbeef; // Never used.
-
-Vault_Server_Request_Interceptor::Vault_Server_Request_Interceptor (void)
- : myname_ ("Vault_Server_Interceptor")
-{
-}
-
-Vault_Server_Request_Interceptor::~Vault_Server_Request_Interceptor ()
-{
-}
-
-char *
-Vault_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "authenticate") == 0)
- {
- IOP::ServiceId id = request_ctx_id;
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf, "root123") != 0)
- ACE_THROW (CORBA::NO_PERMISSION ());
- }
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test_Interceptors::Secure_Vault::Record *record;
- CORBA::Long id;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= id;
- paramlist[i].argument >>= record;
- }
-}
-
-void
-Vault_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- CORBA::Long result;
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
- }
-}
-
-void
-Vault_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
-
-void
-Vault_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
-
-
-////////////////////////////////// Context /////////////////////////
-
-Vault_Server_Request_Context_Interceptor::Vault_Server_Request_Context_Interceptor (void)
- : myname_ ("Vault_Server_Context_Interceptor")
-{
-}
-
-Vault_Server_Request_Context_Interceptor::~Vault_Server_Request_Context_Interceptor ()
-{
-}
-
-char *
-Vault_Server_Request_Context_Interceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Server_Request_Context_Interceptor::destroy (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Server_Request_Context_Interceptor::receive_request_service_contexts(
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Server_Request_Context_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- IOP::ServiceId id = request_ctx_id;
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf, "root123") !=0)
- ACE_THROW (CORBA::NO_PERMISSION ());
-}
-
-void
-Vault_Server_Request_Context_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
-}
-
-void
-Vault_Server_Request_Context_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Vault_Server_Request_Context_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
-
-///////////////////////////////////Dynamic ////////////////////////////////////
-
-Vault_Server_Request_Dynamic_Interceptor::Vault_Server_Request_Dynamic_Interceptor (void)
- : myname_ ("Vault_Server_Dynamic_Interceptor")
-{
-}
-
-Vault_Server_Request_Dynamic_Interceptor::~Vault_Server_Request_Dynamic_Interceptor ()
-{
-}
-
-char *
-Vault_Server_Request_Dynamic_Interceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Server_Request_Dynamic_Interceptor::destroy (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Server_Request_Dynamic_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "authenticate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *user;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= user;
- }
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test_Interceptors::Secure_Vault::Record *record;
- CORBA::Long id;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= id;
- paramlist[i].argument >>= record;
- }
-}
-
-void
-Vault_Server_Request_Dynamic_Interceptor::receive_request_service_contexts(
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Server_Request_Dynamic_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "ready") == 0)
- {
- CORBA::Short result;
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
- }
-
- if (ACE_OS::strcmp (op.in (), "update_records") == 0)
- {
- CORBA::Long result;
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
- }
-}
-
-void
-Vault_Server_Request_Dynamic_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Vault_Server_Request_Dynamic_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
-
-//////////////////////////////NOOP///////////////////////////////////////
-
-Vault_Server_Request_NOOP_Interceptor::Vault_Server_Request_NOOP_Interceptor (void)
- : myname_ ("Vault_Server_NOOP_Interceptor")
-{
-}
-
-Vault_Server_Request_NOOP_Interceptor::~Vault_Server_Request_NOOP_Interceptor ()
-{
-}
-
-char *
-Vault_Server_Request_NOOP_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Vault_Server_Request_NOOP_Interceptor::destroy (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Vault_Server_Request_NOOP_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Vault_Server_Request_NOOP_Interceptor::receive_request_service_contexts(
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Vault_Server_Request_NOOP_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
-}
-
-void
-Vault_Server_Request_NOOP_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Vault_Server_Request_NOOP_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.h b/TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.h
deleted file mode 100644
index 3adc2fe8424..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/server_interceptors.h
+++ /dev/null
@@ -1,215 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_SERVER_INTERCEPTOR_H
-#define TAO_SERVER_INTERCEPTOR_H
-
-#include "testC.h"
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Vault_Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Server_Request_Interceptor (void);
- // cotr.
- ~Vault_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-class Vault_Server_Request_Context_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Server_Request_Context_Interceptor (void);
- // cotr.
- ~Vault_Server_Request_Context_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-class Vault_Server_Request_Dynamic_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Server_Request_Dynamic_Interceptor (void);
- // cotr.
- ~Vault_Server_Request_Dynamic_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-class Vault_Server_Request_NOOP_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side Vault interceptor. For checking interceptor visually only.
-public:
- Vault_Server_Request_NOOP_Interceptor (void);
- // cotr.
- ~Vault_Server_Request_NOOP_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_SERVER_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/test.idl b/TAO/tests/Portable_Interceptors/Benchmark/test.idl
deleted file mode 100644
index 734ad8e5301..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/test.idl
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- IDL -*-
-//
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Invalid {};
-
- interface Secure_Vault
- {
- // = TITLE
- // A test idl for checking interceptor with the aim of
- // performing benchmarks.
- //
- // = DESCRIPTION
- // A secure vault into which one can store transaction details.
-
- struct Record
- {
- long check_num;
- long amount;
- };
-
- short ready ();
- // No args/exceptions operation.
-
- void authenticate (in string user) raises (Invalid);
- // throws a user exception.
-
- long update_records (in long id, in Record val);
- // Normal operation with a return val.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/test_i.cpp b/TAO/tests/Portable_Interceptors/Benchmark/test_i.cpp
deleted file mode 100644
index f94c81f5efd..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/test_i.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "marker.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Benchmark, test_i, "$Id$")
-
-Secure_Vault_i::Secure_Vault_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-// ctor
-
-CORBA::Short
-Secure_Vault_i::ready (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 1;
-}
-
-void
-Secure_Vault_i::authenticate (const char * user
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Invalid))
-{
- if (ACE_OS::strcmp (user, "root") != 0)
- ACE_THROW (Test_Interceptors::Invalid ());
-
-}
-
-CORBA::Long
-Secure_Vault_i::update_records (CORBA::Long,
- const Test_Interceptors::Secure_Vault::Record &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-return 1;
-}
-
-void
-Secure_Vault_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/test_i.h b/TAO/tests/Portable_Interceptors/Benchmark/test_i.h
deleted file mode 100644
index 1e91333a22d..00000000000
--- a/TAO/tests/Portable_Interceptors/Benchmark/test_i.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors/Benchmark
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Nanbor Wang
-//
-// ============================================================================
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-class Secure_Vault_i : public POA_Test_Interceptors::Secure_Vault
-{
- // = DESCRIPTION
- // Implements the Secure_Vault interface in test.idl
-
-public:
- Secure_Vault_i (CORBA::ORB_ptr orb);
- // ctor
-
- virtual CORBA::Short ready (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void authenticate (const char * user
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Invalid));
- // Passwd sent in the service context list
-
- virtual CORBA::Long update_records (CORBA::Long id,
- const Test_Interceptors::Secure_Vault::Record & val
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
- CORBA::ORB_var orb_;
- // The ORB pointer (for shutdown.)
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/.cvsignore b/TAO/tests/Portable_Interceptors/Bug_1559/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc b/TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc
deleted file mode 100644
index 2e992878fcb..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/Bug_1559.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- Server_ORBInitializer.cpp
- server_interceptor.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- Client_ORBInitializer.cpp
- client_interceptor.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.cpp
deleted file mode 100644
index fd053e810f0..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-#include "client_interceptor.h"
-
-ACE_RCSID (Service_Context_Manipulation, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (void)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor (orb_id.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.h
deleted file mode 100644
index 569419fb346..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/Client_ORBInitializer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.cpp
deleted file mode 100644
index b5590a28f3b..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Server_ORBInitializer.h"
-
-ACE_RCSID (Bug_1559,
- Server_ORBInitializer,
- "$Id$")
-
-Server_ORBInitializer::Server_ORBInitializer (void)
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (this->server_interceptor_,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var interceptor =
- this->server_interceptor_;
-
- info->add_server_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-Echo_Server_Request_Interceptor *
-Server_ORBInitializer::server_interceptor (void)
-{
- return this->server_interceptor_;
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.h
deleted file mode 100644
index 1cd2c636db6..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/Server_ORBInitializer.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-#include "server_interceptor.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Server ORB initializer.
-class Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Server_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the created server request interceptor. Only valid after
- /// post_init(), i.e. ORB_init(), has been called.
- Echo_Server_Request_Interceptor * server_interceptor (void);
-
-private:
- /// Pointer to the server request interceptor. ORB is responsible
- /// for storage.
- Echo_Server_Request_Interceptor * server_interceptor_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
deleted file mode 100644
index 09231faacf2..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/client.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID(Interceptors, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "ef:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'e':
- break;
- case 'f':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-v "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-void
-run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
-
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "\"normal\" operation done\n"));
-
- server->nothing (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "\"nothing\" operation done\n"));
-
- ACE_TRY
- {
- server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
deleted file mode 100644
index a9ea659b832..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
+++ /dev/null
@@ -1,386 +0,0 @@
-// $Id$
-
-#include "client_interceptor.h"
-#include "tao/OctetSeqC.h"
-#include "ace/Log_Msg.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Bug_1559,
- client_interceptor,
- "$Id$")
-
-const IOP::ServiceId service_id = 0xdeadbeef;
-const char *request_msg = "REQUEST message";
-const char *reply_msg = "REPLY message";
-const char *forward_msg = "FORWARD message";
-int send_request_count = 0;
-int exception_count = 0;
-
-Echo_Client_Request_Interceptor::
-Echo_Client_Request_Interceptor (const char *id)
- : myname_ ("Echo_Client_Interceptor"),
- orb_id_ (CORBA::string_dup (id))
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do Nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target =
- ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_request "
- "from \"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
-
- send_request_count++;
-
- ACE_TRY_NEW_ENV
- {
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::BAD_PARAM, error)
- {
- // This is supposed to happen
- exception_count++;
- }
- ACE_ENDTRY;
-
- if (send_request_count == 1)
- {
- if (exception_count != 1)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected exception_count is <1>\n"));
- }
- ACE_ASSERT (exception_count == 1);
- // Populate target member of the ClientRequestInfo.
-
- // Make the context to send the context to the target
- IOP::ServiceContext sc;
- sc.context_id = ::service_id;
-
- CORBA::ULong string_len = ACE_OS::strlen (request_msg) + 1;
- CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len);
- ACE_OS::strcpy (reinterpret_cast<char *> (buf), request_msg);
-
- sc.context_data.replace (string_len, string_len, buf, 1);
-
- // Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Check that the request service context can be retrieved.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
- }
- else if (send_request_count == 2)
- {
- ACE_DEBUG ((LM_DEBUG, "Exception count: %i\n", exception_count));
- if (exception_count != 2)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected exception_count is <2>\n"));
- }
- ACE_ASSERT (exception_count == 2);
- // Populate target member of the ClientRequestInfo.
-
- // Make the context to send the context to the target
- IOP::ServiceContext sc;
- sc.context_id = ::service_id;
-
- CORBA::ULong string_len = ACE_OS::strlen (forward_msg) + 1;
- CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len);
- ACE_OS::strcpy (reinterpret_cast<char *> (buf), forward_msg);
-
- sc.context_data.replace (string_len, string_len, buf, 1);
- // Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Check that the request service context can be retrieved.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, forward_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- forward_msg,
- buf2));
- }
- }
- else
- {
- // Something's wrong
- }
-
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target =
- ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_reply from "
- "\"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
-
- // Check that the reply service context was received as
- // expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- " Received reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that no one has messed with the request service context.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, forward_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- forward_msg,
- buf2));
- }
- send_request_count = 0;
- exception_count = 0;
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ());
- }
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_other from "
- "\"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
-
- // Check that no one has messed with the request service context.
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.received_exception "
- "from \"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
-
- // Check that the reply service context was received as
- // expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- " Received reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that no one has messed with the request service context.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, forward_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- forward_msg,
- buf2));
- }
- send_request_count = 0;
- exception_count = 0;
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.h b/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.h
deleted file mode 100644
index 2503a4b75b7..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Client_Request_Interceptor (const char *orb_id);
- // ctor.
-
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-
- CORBA::String_var orb_id_;
- // The ID of the ORB where this interceptor was created, usually
- // obtained from the ORBInitInfo
-
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/run_test.pl b/TAO/tests/Portable_Interceptors/Bug_1559/run_test.pl
deleted file mode 100755
index fa204e17d8c..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-f file://$file");
-
-print STDERR "\n\n==== Running interceptor test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
deleted file mode 100644
index 35f0c3ada75..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/server.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "test_i.h"
-#include "Server_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- Server_ORBInitializer * temp_initializer = 0;
-
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now we can create the ORB
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Visual_i server_impl (orb.in ());
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a second object to receive forwarded requests
- Visual_i forward_server_impl (orb.in ());
-
- PortableServer::ObjectId_var forward_id =
- root_poa->activate_object (&forward_server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var forward_test_obj =
- root_poa->id_to_reference (forward_id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Echo_Server_Request_Interceptor * server_interceptor =
- temp_initializer->server_interceptor ();
-
- if (server_interceptor == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Could not obtain reference to "
- "server request interceptor.\n"),
- -1);
-
- server_interceptor->forward_reference (forward_test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Test_Interceptors::Visual: <%s>\n",
- ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp
deleted file mode 100644
index 7739e548ed1..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp
+++ /dev/null
@@ -1,286 +0,0 @@
-// $Id$
-
-#include "server_interceptor.h"
-#include "tao/OctetSeqC.h"
-#include "ace/Log_Msg.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Bug_1559,
- server_interceptor,
- "$Id$")
-
-const IOP::ServiceId service_id = 0xdeadbeef;
-const char *request_msg = "REQUEST message";
-const char *reply_msg = "REPLY message";
-const char *forward_msg = "FORWARD message";
-int send_request_count = 0;
-int exception_count = 0;
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (CORBA::Object_ptr forward_location)
- : myname_ ("Echo_Server_Interceptor"),
- forward_location_ (CORBA::Object::_duplicate (forward_location))
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor (void)
-{
-}
-
-void
-Echo_Server_Request_Interceptor::forward_reference (CORBA::Object_ptr forward_location
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (CORBA::is_nil (forward_location))
- ACE_THROW (CORBA::INV_OBJREF (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- EINVAL),
- CORBA::COMPLETED_NO));
- this->forward_location_ = CORBA::Object::_duplicate (forward_location);
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_request_service_contexts from "
- "\"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Ignore the "_is_a" operation since it may have been invoked
- // locally on the server side as a side effect of another call,
- // meaning that the client hasn't added the service context yet.
- // Same goes for the shutdown call
- if (ACE_OS_String::strcmp ("shutdown", operation.in ()) == 0)
- return;
-
- IOP::ServiceId id = ::service_id;
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- " Received service context: %s\n",
- buf));
- if (ACE_OS::strcmp (buf, request_msg) == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Sending LOCATION_FORWARD\n"));
- ACE_THROW (PortableInterceptor::ForwardRequest (this->forward_location_));
- }
- else if (ACE_OS::strcmp (buf, forward_msg) == 0)
- {
- // Make the context to send the context to the client
- IOP::ServiceContext scc;
-
- scc.context_id = ::service_id;
-
- CORBA::ULong string_len = ACE_OS::strlen (reply_msg) + 1;
- CORBA::Octet *buff = CORBA::OctetSeq::allocbuf (string_len);
-
- ACE_OS::strcpy (reinterpret_cast<char *> (buff), reply_msg);
-
- scc.context_data.replace (string_len, string_len, buff, 1);
-
- // Add this context to the service context list.
- ri->add_reply_service_context (scc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::receive_request_service_contexts: "
- "Expected request service context to be: %s or %s\n",
- request_msg,
- forward_msg));
- }
-}
-
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_reply from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Check that the reply service context is set as expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- " Reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_reply: "
- "Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that the request service context hasn't been changed.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, forward_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_reply: "
- "Expected request service context to be: %s.\n"
- " Got: %s\n",
- forward_msg,
- buf2));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_exception from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Check that the reply service context is set as expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- " Reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_exception: "
- "Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that the request service context hasn't been changed.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, forward_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_exception: "
- "Expected request service context to be: %s.\n"
- " Got: %s\n",
- forward_msg,
- buf2));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_other from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Check that the request service context hasn't been changed.
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_reply: "
- "Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf));
- }
-
- // If we get this far then we should have received a
- // LOCATION_FORWARD reply.
-
- // This will throw an exception if a location forward has not
- // occured. If an exception is thrown then something is wrong with
- // the PortableInterceptor::ForwardRequest support.
- CORBA::Object_var forward = ri->forward_reference (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (forward.in ()))
- ACE_THROW (CORBA::INTERNAL ());
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h b/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h
deleted file mode 100644
index 81924ce2902..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/server_interceptor.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_SERVER_INTERCEPTOR_H
-#define TAO_SERVER_INTERCEPTOR_H
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
-
- Echo_Server_Request_Interceptor (CORBA::Object_ptr forward_location);
-
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- void forward_reference (CORBA::Object_ptr forward_location
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
- CORBA::Object_ptr forward_location_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_SERVER_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/test.idl b/TAO/tests/Portable_Interceptors/Bug_1559/test.idl
deleted file mode 100644
index 79a06a14351..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/test.idl
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- // = TITLE
- // A test idl for checking interceptor visually.
- //
- // = DESCRIPTION
- //
-
- void normal (in long arg);
- // Normal operation.
-
- void nothing ();
- // Normal operation without return.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/test_i.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/test_i.cpp
deleted file mode 100644
index 503c7a5b423..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/test_i.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- test_i,
- "$Id$")
-
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Visual_i::normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-void
-Visual_i::nothing (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::nothing\n"));
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/test_i.h b/TAO/tests/Portable_Interceptors/Bug_1559/test_i.h
deleted file mode 100644
index 5a6df58c457..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_1559/test_i.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Nanbor Wang
- */
-//=============================================================================
-
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class Visual_i
- *
- * Implements the Visual interface in test.idl
- */
-class Visual_i : public POA_Test_Interceptors::Visual
-{
-
-public:
-
- Visual_i (CORBA::ORB_ptr orb);
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void nothing (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// The ORB pseudo-reference (for shutdown).
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_2088/Bug_2088.mpc b/TAO/tests/Portable_Interceptors/Bug_2088/Bug_2088.mpc
deleted file mode 100644
index 87022b449ba..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2088/Bug_2088.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Client): taoclient, pi, interceptors {
- Source_Files {
- Client_ORBInitializer.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.cpp
deleted file mode 100644
index db9719164d0..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-
-ACE_RCSID (Bug_2088, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (void) :
- pre_init_called (false),
- post_init_called (false)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- pre_init_called = true;
-
- ACE_THROW (CORBA::NO_MEMORY ());
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- post_init_called = true;
-
- ACE_THROW (CORBA::NO_MEMORY ());
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.h
deleted file mode 100644
index 9e1d7b79009..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2088/Client_ORBInitializer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- bool pre_init_called;
- bool post_init_called;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_2088/client.cpp b/TAO/tests/Portable_Interceptors/Bug_2088/client.cpp
deleted file mode 100644
index 2b3ff3f6fbb..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2088/client.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID(Interceptors, client, "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- Client_ORBInitializer* initializer1 = 0;
- Client_ORBInitializer* initializer2 = 0;
- bool caught_exception = false;
-
- ACE_NEW_RETURN (initializer1,
- Client_ORBInitializer,
- -1); // No exceptions yet!
-
- ACE_NEW_RETURN (initializer2,
- Client_ORBInitializer,
- -1); // No exceptions yet!
-
- PortableInterceptor::ORBInitializer_var initializer_var1 =
- initializer1;
-
- PortableInterceptor::ORBInitializer_var initializer_var2 =
- initializer2;
-
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::register_orb_initializer (initializer_var1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableInterceptor::register_orb_initializer (initializer_var2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCH (CORBA::NO_MEMORY, ex)
- {
- // Initializer1 throws this exception and we should get it here
- caught_exception = true;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- // Only the pre init for initalizer 1 must be called, other initializers
- // shouldn't be caught
- ACE_ASSERT (initializer1->pre_init_called == true);
- ACE_ASSERT (initializer2->pre_init_called == false);
- ACE_ASSERT (initializer1->post_init_called == false);
- ACE_ASSERT (initializer2->post_init_called == false);
- ACE_ASSERT (caught_exception == true);
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_2088/run_test.pl b/TAO/tests/Portable_Interceptors/Bug_2088/run_test.pl
deleted file mode 100755
index 6cbfb81a45c..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2088/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("client");
-}
-else {
- $CL = new PerlACE::Process ("client");
-}
-print STDERR "\n==== Running bug 2088 test\n";
-
-$client = $CL->SpawnWaitKill (5);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Bug_2510_Regression.mpc b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Bug_2510_Regression.mpc
deleted file mode 100644
index a49d6902aa6..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Bug_2510_Regression.mpc
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- Client_ORBInitializer.cpp
- client_interceptor.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.cpp
deleted file mode 100644
index acceb91568b..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-#include "client_interceptor.h"
-
-ACE_RCSID (Bug_2510_Regression, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (void)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableInterceptor::SlotId slot_id = info->allocate_slot_id ();
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor (),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_UNUSED_ARG (slot_id);
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.h
deleted file mode 100644
index 569419fb346..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/Client_ORBInitializer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
deleted file mode 100644
index 7e502f3bb75..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Synch.h"
-#include "testC.h"
-#include "Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID(Bug_2510_Regression, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "ef:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'e':
- break;
- case 'f':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-v "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-static ACE_THR_FUNC_RETURN run_test(void* pData)
-{
- Test_Interceptors::Visual_ptr server = static_cast<Test_Interceptors::Visual_ptr>(pData);
-
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- return (ACE_THR_FUNC_RETURN)0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- ACE_hthread_t threadHandle;
- if ( ACE_Thread::spawn( run_test,
- static_cast<void*>(server.in()),
- THR_NEW_LWP | THR_JOINABLE ,
- 0,
- & threadHandle
- ) == -1 )
- {
- ACE_ERROR_RETURN ((LM_ERROR,"Cannot start thread"), 1);
- }
-
- ACE_Thread::join (threadHandle);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in client:");
- return 1;
- }
-
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.cpp
deleted file mode 100644
index 8b6c9a89a5c..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-
-#include "client_interceptor.h"
-#include "tao/OctetSeqC.h"
-#include "ace/Log_Msg.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Bug_2510_Regression,
- client_interceptor,
- "$Id$")
-
-const IOP::ServiceId service_id = 0xdeadbeef;
-const char *request_msg = "REQUEST message";
-const char *reply_msg = "REPLY message";
-const char *forward_msg = "FORWARD message";
-
-Echo_Client_Request_Interceptor::
-Echo_Client_Request_Interceptor ()
- : myname_ ("Echo_Client_Interceptor")
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do Nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target =
- ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,"%s.send_request from %s\n", this->myname_, operation.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target =
- ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,"%s.receive_reply from %s\n", this->myname_, operation.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,"%s.receive_other from %s\n", this->myname_, operation.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,"%s.receive_exception from %s\n", this->myname_, operation.in ()));
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.h b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.h
deleted file mode 100644
index 95c3e21346f..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client_interceptor.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Client_Request_Interceptor ();
- // ctor.
-
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/run_test.pl b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/run_test.pl
deleted file mode 100755
index fa204e17d8c..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-f file://$file");
-
-print STDERR "\n\n==== Running interceptor test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp
deleted file mode 100644
index 4043ed02514..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/server.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "test_i.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (Bug_2510_Regression,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Now create an ORB
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Visual_i server_impl (orb.in ());
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Test_Interceptors::Visual: <%s>\n",
- ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test.idl b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test.idl
deleted file mode 100644
index d895106d35a..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test.idl
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- // = TITLE
- // A test idl for checking interceptor visually.
- //
- // = DESCRIPTION
- //
-
- void normal (in long arg);
- // Normal operation.
-
- void nothing ();
- // Normal operation without return.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.cpp
deleted file mode 100644
index 39039d4e834..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID (Bug_2510_Regression,
- test_i,
- "$Id$")
-
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Visual_i::normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-void
-Visual_i::nothing (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::nothing\n"));
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.h b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.h
deleted file mode 100644
index 5a6df58c457..00000000000
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/test_i.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Nanbor Wang
- */
-//=============================================================================
-
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class Visual_i
- *
- * Implements the Visual interface in test.idl
- */
-class Visual_i : public POA_Test_Interceptors::Visual
-{
-
-public:
-
- Visual_i (CORBA::ORB_ptr orb);
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void nothing (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// The ORB pseudo-reference (for shutdown).
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/.cvsignore b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/.cvsignore
deleted file mode 100644
index 307259b4b57..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Collocated_Test
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp
deleted file mode 100644
index aa829e678f1..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "testC.h"
-#include "interceptors.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var object =
- corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- this->input_),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-
-void
-Client_Task::run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long one = 1, two = 1;
- (void) server->calculate (one,
- two
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- (void) server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h
deleted file mode 100644
index def1f6d2bb4..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Client_Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef COLLOCATED_TEST_CLIENT_TASK_H
-#define COLLOCATED_TEST_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-#include "testS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/// Implement a Task to run the client as a thread
-class Client_Task : public ACE_Task_Base
-{
-public:
-
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- void run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL);
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
deleted file mode 100644
index 1aaceae2c8c..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-//$Id$
-
-#include "Server_Task.h"
-#include "Client_Task.h"
-#include "Echo_Collocated_ORBInitializer.h"
-#include "interceptors.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-
-const char *output = "test.ior";
-const char *input = "file://test.ior";
-ACE_CString server_orb;
-ACE_CString client_orb;
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o");
- 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 '?':
- default:
- // This is a hack but that is okay!
- return 0;
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- server_orb.set ("server_orb");
- client_orb.set ("client_orb");
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Collocated_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- sorb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong number_called =
- Echo_Server_Request_Interceptor::server_interceptor_check_;
-
- if (number_called != 10)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Server Side Interceptors not"
- " called properly, called %d times, expected 10\n",
- number_called));
- }
-
- if (Echo_Client_Request_Interceptor::client_interceptor_check_ != 10)
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR:Client Interceptors not called"
- " properly\n"));
-
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp
deleted file mode 100644
index 879b3549b22..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Collocated_ORBInitializer.h"
-#include "interceptors.h"
-
-#include "ace/OS_NS_string.h"
-
-void
-Echo_Collocated_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Collocated_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!ACE_OS::strcmp (orb_id.in (), "client_orb"))
- {
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- else if (!ACE_OS::strcmp (orb_id.in (), "server_orb"))
- {
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- info->add_server_request_interceptor (server_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- }
-
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h
deleted file mode 100644
index 7a18eb9b37a..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Echo_Collocated_ORBInitializer.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-#define TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-#include "tao/orbconf.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Collocated_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/PI_Dynamic.mpc b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/PI_Dynamic.mpc
deleted file mode 100644
index e116424db27..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/PI_Dynamic.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Collocated): taoserver, pi, pi_server, interceptors {
- exename = Collocated_Test
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- interceptors.cpp
- Echo_Collocated_ORBInitializer.cpp
- Collocated_Test.cpp
- Client_Task.cpp
- Server_Task.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
deleted file mode 100644
index a9db6a71b8a..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "test_i.h"
-#include "interceptors.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Collocated_Test,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var poa_object =
- sorb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Visual_i * server_impl = 0;
- ACE_NEW_RETURN (server_impl, Visual_i (sorb_.in ()), 1);
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test_Interceptors::Visual: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (output_ != 0)
- {
- 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);
- }
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h
deleted file mode 100644
index 2101f9a9a15..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/Server_Task.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef COLLOCATED_SERVER_TASK_H
-#define COLLOCATED_SERVER_TASK_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.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 char *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 char *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/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp
deleted file mode 100644
index 907a3e1193f..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-// $Id$
-
-#include "interceptors.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Dynamic,
- interceptors,
- "$Id$")
-
-const char *request_msg = "The Echo_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Request_Interceptor reply message";
-CORBA::ULong Echo_Client_Request_Interceptor::client_interceptor_check_ = 0;
-CORBA::ULong Echo_Server_Request_Interceptor::server_interceptor_check_ = 0;
-
-Echo_Client_Request_Interceptor::Echo_Client_Request_Interceptor (void)
- : myname_ ("Echo_Client_Interceptor")
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request from "
- "\"%s\"\n",
- op.in ()));
-
-#endif /*if 0*/
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
-#endif /*if 0*/
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_other "
- "from \"%s\"\n",
- op.in ()));
-#endif /*if 0*/
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_reply "
- "from \"%s\"\n",
- op.in ()));
-#endif /*if 0*/
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- }
- else if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
-#endif /*if 0*/
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::received_exception "
- "from \"%s\"\n",
- op.in ()));
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id.in ()));
-}
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ObjectId_var test_oid =
- ri->object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::receive_request from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
-
- }
-
- CORBA::String_var tmdi =
- ri->target_most_derived_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Target most derived interface: %s\n",
- tmdi.in ()));
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_reply from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-
- if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result = 0;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_exception "
- "from \"%s\"\n",
- op.in ()));
-
-
- CORBA::Any_var any =
- ri->sending_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var type = any->type ();
-
- const char *exception_id = type->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id));
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h
deleted file mode 100644
index 244270d4a37..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/interceptors.h
+++ /dev/null
@@ -1,139 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_INTERCEPTORS_H
-#define TAO_INTERCEPTORS_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
-
- Echo_Client_Request_Interceptor (void);
- // ctor.
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong client_interceptor_check_;
-private:
- const char *myname_;
-};
-
-class Echo_Server_Request_Interceptor
- : public PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong server_interceptor_check_;
-
-private:
- const char *myname_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_INTERCEPTORS_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/run_test.pl b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/run_test.pl
deleted file mode 100755
index 011ef650c65..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/run_test.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("Collocated_Test", "-ORBObjRefStyle url");
-}
-else {
- $SV = new PerlACE::Process ("Collocated_Test", "-ORBObjRefStyle url");
-}
-
-print STDERR "\n\n==== Running interceptor collocated Dynamic test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$collocated = $SV->WaitKill (5);
-
-if ($collocated != 0) {
- print STDERR "ERROR: Collocated_Test returned $collocated\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test.idl b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test.idl
deleted file mode 100644
index 8671f9b0a97..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- /// Normal operation.
- void normal (in long arg);
-
- /// Normal operation with a return val.
- long calculate (in long one, in long two);
-
- /// throws a user exception.
- void user ()
- raises (Silly);
-
- /// throws a system exception.
- void system ();
-
- /// shutdown the ORB
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
deleted file mode 100644
index 949bea21eb6..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Dynamic, test_i, "$Id$")
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
- // ctor
-
-void
-Visual_i::normal (CORBA::Long
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-CORBA::Long
-Visual_i::calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
- return (one + two);
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwning Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // 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 ();
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h b/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h
deleted file mode 100644
index f31756fb10a..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Dynamic/test_i.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors/Dynamic
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Nanbor Wang
-//
-// ============================================================================
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-class Visual_i : public POA_Test_Interceptors::Visual
-{
- // = DESCRIPTION
- // Implements the Visual interface in test.idl
-
-public:
- Visual_i (CORBA::ORB_ptr orb);
- // ctor
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::Long calculate (
- CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB pointer (for shutdown.)
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/.cvsignore b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/.cvsignore
deleted file mode 100644
index 9b04cc7c341..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-collocated
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.cpp
deleted file mode 100644
index c068138c6b8..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "testC.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var obj =
- this->corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- input_),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->corb_->destroy();
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-Client_Task::run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-
- server->nothing (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.h b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.h
deleted file mode 100644
index 080096a550b..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Client_Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// $Id$
-//
-
-#ifndef SERVICE_CONTEXT_MANIPULATION_COLLOCATED_CLIENT_TASK_H
-#define SERVICE_CONTEXT_MANIPULATION_COLLOCATED_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"
-
-#include "testS.h"
-
-
-/// Implement a Task to run the client as a thread
-class Client_Task : public ACE_Task_Base
-{
-public:
-
- /// Constructor
- Client_Task (const char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- void run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL);
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
-};
-
-#include /**/ "ace/post.h"
-#endif /* SERVICE_CONTEXT_MANIPULATION_COLLOCATED_CLIENT_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.cpp
deleted file mode 100644
index b53c358a387..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id$
-
-#include "Collocated_ORBInitializer.h"
-#include "interceptors.h"
-#include "ace/OS_NS_string.h"
-
-Collocated_ORBInitializer::Collocated_ORBInitializer (void)
-{
-}
-
-void
-Collocated_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Collocated_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!ACE_OS::strcmp (orb_id.in (), "client_orb"))
- {
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor (orb_id.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- else if (!ACE_OS::strcmp (orb_id.in (), "server_orb"))
- {
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- info->add_server_request_interceptor (server_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- else
- {
- //Throw exception?
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.h
deleted file mode 100644
index 42b2ea926a4..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_ORBInitializer.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-#ifndef SERVICE_CONTEXT_MANIPULATION_COLLOCATED_ORBINITIALIZER_H
-#define SERVICE_CONTEXT_MANIPULATION_COLLOCATED_ORBINITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Collocated ORB initializer.
-class Collocated_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Collocated_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* SERVICE_CONTEXT_MANIPULATION_COLLOCATED_ORBINITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp
deleted file mode 100644
index 27644baab31..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Collocated_Test.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-//$Id$
-
-#include "Server_Task.h"
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-#include "test_i.h"
-#include "interceptors.h"
-#include "Collocated_ORBInitializer.h"
-
-const char *output = "test.ior";
-const char *input = "file://test.ior";
-ACE_CString server_orb;
-ACE_CString client_orb;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:o");
- 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 '?':
- default:
- // This is a hack but that is okay!
- return 0;
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- server_orb.set ("server_orb");
- client_orb.set ("client_orb");
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Collocated_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
- }
- ACE_CATCHANY
- {
- // Ignore exceptions..
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc
deleted file mode 100644
index fcf3dbabb25..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Collocated): taoserver, pi, pi_server, interceptors {
- exename = collocated
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- Collocated_ORBInitializer.cpp
- interceptors.cpp
- Client_Task.cpp
- Server_Task.cpp
- Collocated_Test.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp
deleted file mode 100644
index e25f9e30637..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "test_i.h"
-#include "ace/OS_NS_time.h"
-#include "ace/Manual_Event.h"
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var poa_object =
- this->sorb_->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Visual_i *vi = 0;
- ACE_NEW_RETURN (vi, Visual_i (sorb_.in ()), 1);
- PortableServer::ServantBase_var server_impl = vi;
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (server_impl.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- sorb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- if (output_ != 0)
- {
- FILE *output_file= ACE_OS::fopen (output_, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- output_),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- struct timespec ts = {0,250000000}; // quarter second
- ACE_OS::nanosleep (&ts);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server task - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->sorb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h
deleted file mode 100644
index e048b0f737d..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/Server_Task.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-
-#ifndef SERVICE_CONTEXT_MANIPULATION_COLLOCATED_SERVER_TASK_H
-#define SERVICE_CONTEXT_MANIPULATION_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 char *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 char *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 /* SERVICE_CONTEXT_MANIPULATION_COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp
deleted file mode 100644
index 58260168b5e..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp
+++ /dev/null
@@ -1,492 +0,0 @@
-// $Id$
-
-#include "interceptors.h"
-#include "tao/OctetSeqC.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- interceptors,
- "$Id$")
-
-const IOP::ServiceId service_id = 0xdeadbeef;
-const char *request_msg = "The Echo_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Request_Interceptor reply message";
-
-Echo_Client_Request_Interceptor::
-Echo_Client_Request_Interceptor (const char *id)
- : myname_ ("Echo_Client_Interceptor"),
- orb_id_ (CORBA::string_dup (id))
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do Nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_request "
- "from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Populate target member of the ClientRequestInfo.
-
- // Make the context to send the context to the target
- IOP::ServiceContext sc;
- sc.context_id = ::service_id;
-
- CORBA::ULong string_len = ACE_OS::strlen (request_msg) + 1;
- CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len);
- ACE_OS::strcpy (reinterpret_cast<char *> (buf), request_msg);
-
- sc.context_data.replace (string_len, string_len, buf, 1);
-
- // Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Check that the request service context can be retrieved.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- ACE_UNUSED_ARG (buf2);
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target =
- ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_reply from "
- "\"%s\"\n",
- this->myname_,
- operation.in ()));
-
- ACE_TRY
- {
- // Check that the reply service context was received as
- // expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- "Received reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that no one has messed with the request service context.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
- }
- ACE_CATCH (CORBA::BAD_PARAM, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Service Context Error \n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_other\n",
- this->myname_));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.received_exception "
- "from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- ACE_TRY
- {
- // Check that the reply service context was received as
- // expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- "Received reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that no one has messed with the request service context.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
- }
- ACE_CATCH (CORBA::BAD_PARAM, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Service Context Error \n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor (void)
-{
- ACE_DEBUG ((LM_DEBUG,"(%P|%t) ~Echo_Server_Request_Interceptor\n"));
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t)%s.receive_request_service_contexts from "
- "\"%s\"\n",
- this->myname_,
- operation.in ()));
-
- IOP::ServiceId id = ::service_id;
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Received service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::receive_request_service_contexts: "
- "Expected request service context to be: %s\n",
- request_msg));
- }
-
- // Make the context to send the context to the client
- IOP::ServiceContext scc;
-
- scc.context_id = ::service_id;
-
- CORBA::ULong string_len = ACE_OS::strlen (reply_msg) + 1;
- CORBA::Octet *buff = CORBA::OctetSeq::allocbuf (string_len);
-
- ACE_OS::strcpy (reinterpret_cast<char *> (buff), reply_msg);
-
- scc.context_data.replace (string_len, string_len, buff, 1);
-
- // Add this context to the service context list.
- ri->add_reply_service_context (scc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t)%s.send_reply from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Check that the reply service context is set as expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_reply: "
- "Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that the request service context hasn't been changed.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_reply: "
- "Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t)%s.send_exception from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Check that the reply service context is set as expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Reply service context: %s\n",
- buf));
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_exception: "
- "Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that the request service context hasn't been changed.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_exception: "
- "Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.h b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.h
deleted file mode 100644
index 29904bf2b55..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// $Id$
-
-#ifndef SERVICE_CONTEXT_MANIPULATION_COLLOCATED_INTERCEPTORS_H
-#define SERVICE_CONTEXT_MANIPULATION_COLLOCATED_INTERCEPTORS_H
-
-#include "tao/PI/PI.h"
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Client_Request_Interceptor (const char *orb_id);
- // ctor.
-
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-
- CORBA::String_var orb_id_;
- // The ID of the ORB where this interceptor was created, usually
- // obtained from the ORBInitInfo
-
- CORBA::ORB_var orb_;
-};
-
-class Echo_Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
-
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVICE_CONTEXT_MANIPULATION_COLLOCATED_INTERCEPTORS_H */
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/run_test.pl b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/run_test.pl
deleted file mode 100755
index b639e4068e3..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/run_test.pl
+++ /dev/null
@@ -1,82 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("collocated");
-}
-else {
- $SV = new PerlACE::Process ("collocated");
-}
-
-print STDERR "======== Running in default mode \n";
-# $SV->Arguments ("-o $iorfile -k file://$iorfile");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with per-orb \n";
-$SV->Arguments ("-ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running with no collocation \n";
-$SV->Arguments ("-ORBCollocation no");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in default mode and two ORBS \n";
-$SV->Arguments ("-n");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in per-orb mode and two ORBS \n";
-$SV->Arguments ("-n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-print STDERR "======== Running in no collocation mode and two ORBS \n";
-$SV->Arguments ("-n -ORBCollocation per-orb");
-$sv = $SV->SpawnWaitKill (60);
-
-if ($sv != 0) {
- print STDERR "ERROR in Collocated_Test\n";
- $status = 1;
-}
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test.idl b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test.idl
deleted file mode 100644
index e9ed51b50c7..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test.idl
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test collocated portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- // = TITLE
- // A test idl for checking interceptor visually.
- //
- // = DESCRIPTION
- //
-
- void normal (in long arg);
- // Normal operation.
-
- void nothing ();
- // Normal operation without return.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp
deleted file mode 100644
index 0b76048e39b..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- test_i,
- "$Id$")
-
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Visual_i::normal (CORBA::Long
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-// ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-void
-Visual_i::nothing (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-// ACE_DEBUG ((LM_DEBUG, "Visual::nothing\n"));
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- // ACE_CHECK;
- ACE_DEBUG ((LM_DEBUG,"(%P|%t) visual_i::shutdown\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.h b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.h
deleted file mode 100644
index 76a767d6a6a..00000000000
--- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/test_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Nanbor Wang
- */
-//=============================================================================
-
-
-#ifndef SERVICE_CONTEXT_MANIPULATION_COLLOCATED_TEST_I_H
-#define SERVICE_CONTEXT_MANIPULATION_COLLOCATED_TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class Visual_i
- *
- * Implements the Visual interface in test.idl
- */
-class Visual_i : public virtual POA_Test_Interceptors::Visual
-{
-
-public:
-
- Visual_i (CORBA::ORB_ptr orb);
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void nothing (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// The ORB pseudo-reference (for shutdown).
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* SERVICE_CONTEXT_MANIPULATION_COLLOCATED_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/.cvsignore b/TAO/tests/Portable_Interceptors/Dynamic/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.cpp
deleted file mode 100644
index e67eb2afb3c..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Client_ORBInitializer.h"
-
-ACE_RCSID (Dynamic, Echo_Client_ORBInitializer, "$Id$")
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "client_interceptor.h"
-
-void
-Echo_Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-}
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.h
deleted file mode 100644
index cd09fcce9bd..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Client_ORBInitializer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-#define TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.cpp
deleted file mode 100644
index cdb8f91338e..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Server_ORBInitializer.h"
-
-ACE_RCSID (Dynamic, Echo_Server_ORBInitializer, "$Id$")
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "server_interceptor.h"
-
-void
-Echo_Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- info->add_server_request_interceptor (server_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-}
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.h
deleted file mode 100644
index 26b483304c7..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/Echo_Server_ORBInitializer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_SERVER_ORB_INITIALIZER_H
-#define TAO_ECHO_SERVER_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo server ORB initializer.
-class Echo_Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc b/TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc
deleted file mode 100644
index a55faf91bbf..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/PI_Dynamic.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- server_interceptor.cpp
- Echo_Server_ORBInitializer.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- client_interceptor.cpp
- Echo_Client_ORBInitializer.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/README b/TAO/tests/Portable_Interceptors/Dynamic/README
deleted file mode 100644
index 4abad34898c..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/README
+++ /dev/null
@@ -1,10 +0,0 @@
-# $Id$
-
-This test allows you to visually check the correct invocation of
-TAO's pseudo-portable interceptors, especially the Dynamic interface.
-
- To run the test, try:
-
- server -o test.ior
-
- client
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/client.cpp b/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
deleted file mode 100644
index c3d906faeb3..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/client.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-
-#include "testC.h"
-#include "Echo_Client_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (Dynamic,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "ef:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'e':
- break;
- case 'f':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-v "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-void
-run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var msg;
-
- server->normal (10,
- msg.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long one = 1, two = 1, result = 0;
- result = server->calculate (one,
- two
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "calculate() result = %d\n",
- result));
-
- Test_Interceptors::Visual::VarLenStruct_var v =
- server->the_structure (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "the_structure() result is:\n"
- " flag = %d\n"
- " message = %s\n",
- v->flag,
- v->message.in ()));
-
- ACE_TRY
- {
- server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
-#if TAO_HAS_INTERCEPTORS == 1
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.cpp
deleted file mode 100644
index 40b8274fa4e..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.cpp
+++ /dev/null
@@ -1,255 +0,0 @@
-// $Id$
-
-#include "client_interceptor.h"
-#include "testC.h"
-
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Dynamic,
- client_interceptor,
- "$Id$")
-
-Echo_Client_Request_Interceptor::Echo_Client_Request_Interceptor (void)
- : myname_ ("Echo_Client_Interceptor")
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request from "
- "\"%s\"\n",
- op.in ()));
-
- // For the "normal" operation, get the argument list.
- if (ACE_OS::strcmp (op.in (),
- "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (paramlist->length () != 2)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) All parameters not available \n"));
-
- }
-
- CORBA::ULong first = 0, second = 1; // If you dont understand
- // why this is done, then
- // try changing it.
- if (paramlist[first].mode != CORBA::PARAM_IN ||
- paramlist[second].mode != CORBA::PARAM_OUT)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR in the extracted argument list \n"));
- }
-
- CORBA::Long param = 0;
- paramlist[first].argument >>= param;
-
- if (param != 10)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR in send_request while checking ",
- "the value of the extracted ",
- "arguments \n"));
- }
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_other "
- "from \"%s\"\n",
- op.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_reply "
- "from \"%s\"\n",
- op.in ()));
-
- // For the "normal" operation, get the argument list.
- if (ACE_OS::strcmp (op.in (),
- "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (paramlist->length () != 2)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) All parameters not available \n"));
-
- }
-
- CORBA::ULong first = 0, second = 1; // If you dont understand
- // why this is done, then
- // try changing it.
- if (paramlist[first].mode != CORBA::PARAM_IN ||
- paramlist[second].mode != CORBA::PARAM_OUT)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR in the extracted argument list \n"));
- }
-
- CORBA::Long param = 0;
- paramlist[first].argument >>= param;
-
- if (param != 10)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR in send_request while checking ",
- "the value of the extracted ",
- "arguments \n"));
- }
-
- const char *str = 0;
-
- paramlist[second].argument >>= str;
-
- CORBA::String_var transfer (str);
-
- if (ACE_OS::strcmp (str,
- "DO_NOT_INSULT_MY_INTELLIGENCE") != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR in send_request while checking ",
- "the value of the extracted ",
- "out arguments \n"));
- }
- }
-
- if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate() is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-
- if (ACE_OS::strcmp (op.in (), "_get_the_structure") == 0)
- {
- CORBA::Any_var a = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test_Interceptors::Visual::VarLenStruct * v;
-
- (a.in ()) >>= v;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of the_structure() is:\n"
- " flag = %d\n"
- " message = %s\n",
- v->flag,
- v->message.in ()));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::received_exception "
- "from \"%s\"\n",
- op.in ()));
-
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id.in ()));
-}
-
-
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.h b/TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.h
deleted file mode 100644
index d2de8b3455a..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/client_interceptor.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
-
- Echo_Client_Request_Interceptor (void);
- // ctor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-protected:
-
- virtual ~Echo_Client_Request_Interceptor (void);
- // dtor.
-
-private:
- const char *myname_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl b/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl
deleted file mode 100755
index b974ed8a4be..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-f file://$file");
-
-print STDERR "\n\n==== Running interceptor Dynamic test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/server.cpp b/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
deleted file mode 100644
index 2197bc560bb..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/server.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "Echo_Server_ORBInitializer.h"
-#include "ace/OS_NS_stdio.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (Dynamic,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
-#if TAO_HAS_INTERCEPTORS == 1
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Server_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Visual_i server_impl (orb.in ());
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test_Interceptors::Visual: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp
deleted file mode 100644
index 3e1cf79ca24..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// $Id$
-
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-
-#include "server_interceptor.h"
-#include "testC.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Dynamic,
- server_interceptor,
- "$Id$")
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::receive_request from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
-
- }
-
- CORBA::String_var tmdi =
- ri->target_most_derived_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Target most derived interface: %s\n",
- tmdi.in ()));
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_reply from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-
- if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result = 0;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_exception "
- "from \"%s\"\n",
- op.in ()));
-
-
- CORBA::Any_var any =
- ri->sending_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var type = any->type ();
-
- const char *exception_id = type->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id));
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.h b/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.h
deleted file mode 100644
index f536de965c0..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/server_interceptor.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_SERVER_INTERCEPTOR_H
-#define TAO_SERVER_INTERCEPTOR_H
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Server_Request_Interceptor
- : public PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
-protected:
-
- virtual ~Echo_Server_Request_Interceptor (void);
- // dotr.
-
-private:
- const char *myname_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_SERVER_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/test.idl b/TAO/tests/Portable_Interceptors/Dynamic/test.idl
deleted file mode 100644
index e46baae1473..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/test.idl
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- IDL -*-
-// $Id$
-
-// ===================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * Simple IDL file to test portable interceptor support.
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-// ===================================================================
-
-module Test_Interceptors
-{
- exception Silly {};
-
- /**
- * @class Visual
- *
- * @brief Test interface for checking interceptor visually.
- *
- * Test interface for checking interceptor visually.
- */
- interface Visual
- {
- /**
- * @class VarLenStruct
- *
- * @brief Variable length structure
- *
- * This structure is designed to exercise memory management in the
- * @c PortableInterceptor::RequestInfo::result() method.
- */
- struct VarLenStruct
- {
- octet flag;
- string message;
- };
-
- /// Normal operation.
- void normal (in long arg, out string msg);
-
- /// Normal operation with a return val.
- long calculate (in long one, in long two);
-
- readonly attribute VarLenStruct the_structure;
-
- /// Throws a user exception.
- void user () raises (Silly);
-
- /// Throws a system exception.
- void system ();
-
- /// Shutdown the ORB.
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/test_i.cpp b/TAO/tests/Portable_Interceptors/Dynamic/test_i.cpp
deleted file mode 100644
index 80c51203166..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/test_i.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID (Dynamic,
- test_i,
- "$Id$")
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
- // ctor
-
-void
-Visual_i::normal (CORBA::Long arg,
- CORBA::String_out msg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
- msg = CORBA::string_dup ("DO_NOT_INSULT_MY_INTELLIGENCE");
-}
-
-CORBA::Long
-Visual_i::calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
- return (one + two);
-}
-
-Test_Interceptors::Visual::VarLenStruct *
-Visual_i::the_structure (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Test_Interceptors::Visual::VarLenStruct * s;
-
- ACE_NEW_THROW_EX (s,
- Test_Interceptors::Visual::VarLenStruct,
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- Test_Interceptors::Visual::VarLenStruct_var safe_s = s;
-
- s->flag = 135;
- s->message = CORBA::string_dup ("Oh Captain, my Captain!");
-
- return safe_s._retn ();
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/test_i.h b/TAO/tests/Portable_Interceptors/Dynamic/test_i.h
deleted file mode 100644
index b174c34a422..00000000000
--- a/TAO/tests/Portable_Interceptors/Dynamic/test_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-
-// ===================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-// ===================================================================
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-class Visual_i : public POA_Test_Interceptors::Visual
-{
-public:
- Visual_i (CORBA::ORB_ptr orb);
-
- virtual CORBA::Long calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void normal (CORBA::Long arg,
- CORBA::String_out msg
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual Test_Interceptors::Visual::VarLenStruct * the_structure (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException, Test_Interceptors::Silly));
-
- virtual void system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/.cvsignore b/TAO/tests/Portable_Interceptors/ForwardRequest/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.cpp
deleted file mode 100644
index 4845a04bed7..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// -*- C++ -*-
-
-#include "Client_ORBInitializer.h"
-
-ACE_RCSID (ForwardRequest,
- Client_ORBInitializer,
- "$Id$")
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "Client_Request_Interceptor.h"
-
-#include "tao/StringSeqC.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_string.h"
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var orb_id = info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::StringSeq_var args = info->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var forward_str;
-
- // Extract the last forward reference from the argument list.
- CORBA::ULong args_len = args->length ();
- for (CORBA::ULong i = 0; i < args_len; ++i)
- if (ACE_OS::strcmp ("-k", args[i]) == 0
- && i < (args_len - 1))
- forward_str = args[i + 1];
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the client request interceptor.
- ACE_NEW_THROW_EX (interceptor,
- Client_Request_Interceptor (orb_id.in (),
- forward_str.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-}
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.h
deleted file mode 100644
index 10386969df0..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_ORBInitializer.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Client_ORBInitializer.h
- *
- * $Id$
- *
- * Implementation header for the PortableInterceptor::ForwardRequest
- * exception test client side ORB initializer.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client side ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.cpp
deleted file mode 100644
index 949746c9d36..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-// -*- C++ -*-
-
-#include "Client_Request_Interceptor.h"
-#include "testC.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (ForwardRequest,
- Client_Request_Interceptor,
- "$Id$")
-
-Client_Request_Interceptor::Client_Request_Interceptor (
- const char *orb_id,
- const char *forward_str)
- : orb_id_ (CORBA::string_dup (orb_id)),
- orb_ (),
- request_count_ (0),
- forward_str_ (CORBA::string_dup (forward_str))
-{
-}
-
-char *
-Client_Request_Interceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Client_Request_Interceptor");
-}
-
-void
-Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++this->request_count_;
-
- CORBA::Boolean response_expected =
- ri->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!response_expected) // A one-way request.
- return;
-
- // Request 1 -- non-forwarded
- // Request 2 -- forwarded by this interception point.
-
- if (this->request_count_ == 2)
- {
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc,
- 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::Object_var forward =
- this->orb_->string_to_object (this->forward_str_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var forward_str =
- this->orb_->object_to_string (forward.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "CLIENT (%P|%t) Request %d will be forwarded "
- "to object 2\n"
- "CLIENT (%P|%t) via send_request().\n",
- this->request_count_));
-
- // Notice that this is not a permanent forward.
- ACE_THROW (PortableInterceptor::ForwardRequest (forward.in ()));
- }
-}
-
-void
-Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Boolean response_expected =
- ri->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Oneway
- if (!response_expected)
- return;
-
- PortableInterceptor::ReplyStatus reply_status =
- ri->reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (reply_status == PortableInterceptor::TRANSPORT_RETRY)
- return;
-
- // If we get this far then we should have received a
- // LOCATION_FORWARD reply, either from another client request
- // interceptor (not this one) or from the server.
-
- // This will throw an exception if a location forward has not
- // occured. If an exception is thrown then something is wrong with
- // the PortableInterceptor::ForwardRequest support.
- CORBA::Object_var forward = ri->forward_reference (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (forward.in ()))
- ACE_THROW (CORBA::INTERNAL ());
-
- ACE_DEBUG ((LM_DEBUG,
- "CLIENT (%P|%t) Received LOCATION_FORWARD reply.\n"));
-}
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.h b/TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.h
deleted file mode 100644
index b39c5ae1297..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Client_Request_Interceptor.h
- *
- * $Id$
- *
- * Implementation header for the client request interceptor for the
- * PortableInterceptor::ForwardRequest test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef CLIENT_REQUEST_INTERCEPTOR_H
-#define CLIENT_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-#include "tao/CORBA_String.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class Client_Request_Interceptor
- *
- * @brief Client request interceptor that exercises
- * PortableInterceptor::ForwardRequest support.
- *
- * This client request interceptor forwards a request to a secondary
- * object by throwing the PortableInterceptor::ForwardRequest
- * exception from within the send_request() interception point. It
- * only forwards the initial request. See the README file for
- * details.
- */
-class Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- Client_Request_Interceptor (const char *orb_id,
- const char *forward_str);
-
- /**
- * @name Methods Required by the Client Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all client request interceptors.
- */
- //@{
- /// Return the name of this ClientRequestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- ///The ID of the ORB this interceptor is registered with.
- CORBA::String_var orb_id_;
-
- /// Pseudo-reference to the ORB this interceptor is registered
- /// with.
- CORBA::ORB_var orb_;
-
- /// The number of requests intercepted by this interceptor.
- CORBA::ULong request_count_;
-
- /// Stringified reference to the object the initial request will be
- /// forwarded to by this interceptor.
- CORBA::String_var forward_str_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* CLIENT_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc b/TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc
deleted file mode 100644
index 57393219165..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/PI_ForwardRequest.mpc
+++ /dev/null
@@ -1,24 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, valuetype, pi, pi_server, interceptors {
-
- Source_Files {
- test_i.cpp
- Server_ORBInitializer.cpp
- Server_Request_Interceptor.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, valuetype, pi, pi_server, interceptors {
- after += *Server
-
- Source_Files {
- testC.cpp
- Client_ORBInitializer.cpp
- Client_Request_Interceptor.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/README b/TAO/tests/Portable_Interceptors/ForwardRequest/README
deleted file mode 100644
index bdc4e51263d..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/README
+++ /dev/null
@@ -1,72 +0,0 @@
-# $Id$
-
-This test verifies that the PortableInterceptor::ForwardRequest
-exception support is working properly. There are three cases that it
-tests:
-
- - PortableInterceptor::ForwardRequest exception thrown from a client
- request interception point.
- - PortableInterceptor::ForwardRequest exception thrown from the
- receive_request_service_contexts() server request interception
- point.
- - PortableInterceptor::ForwardRequest exception thrown from the
- receive_request() server request interception point.
-
-The reason why there are two server side cases is because the
-receive_request_service_contexts() interception point occurs before
-the operation is dispatched to the servant. Hence, the implementation
-of the PortableInterceptor::ForwardRequest-to-LOCATION_FORWARD GIOP
-reply conversion in that interception point differs from the
-conversion that occurs in interception points in servant skeletons.
-
-Two servants are activated. Their corresponding references are then
-passed to the client. The following sequence of operations then
-occurs:
-
- 1) Issue client request.
- 2) Intercept the request on the client side.
- 3) Forward the request to servant two by throwing the
- PortableInterceptor::ForwardRequest in the
- ClientRequestInterceptor::send_reply() interception point.
- 4) The server will receive the request.
- 5) However, it will be intercepted by the server request
- interceptor.
- 6) The ServerRequestInterceptor::receive_request_service_contexts()
- then forwards the client request back to servant one by throwing
- the PortableInterceptor::ForwardRequest exception.
- 7) That exception will be converted to a LOCATION_FORWARD GIOP
- reply.
- 8) The client will receive the LOCATION_FORWARD reply, and then
- transparently forward its request to servant one.
- 9) The ServerRequestInterceptor::receive_request() interception
- point will then throw the PortableInterceptor::ForwardRequest
- exception to cause the request to be forwarded back to servant
- two.
- 10) At this point, the request will actually be handled by servant
- two.
-
-Test output should be similar to the following:
-
-==== Running PortableInterceptor::ForwardRequest test
-
-ForwardRequestTest::test servant 1: <IOR:010000002000...>
-ForwardRequestTest::test servant 2: <IOR:010000002001...>
-CLIENT: Issuing request 1.
-CLIENT: Request 1 handled by object 1.
-CLIENT: Issuing request 2.
-CLIENT (1376|1540) Request 2 will be forwarded to object 2
-CLIENT (1376|1540) via send_request().
-CLIENT: Request 2 handled by object 2.
-CLIENT: Issuing request 3.
-SERVER (1604|1276) Request 3 will be forwarded to object 1
-SERVER (1604|1276) via receive_request_service_contexts().
-CLIENT (1376|1540) Received LOCATION_FORWARD reply.
-CLIENT: Request 3 handled by object 1.
-CLIENT: Issuing request 4.
-SERVER (1604|1276) Request 4 will be forwarded to object 2
-SERVER (1604|1276) via receive_request().
-CLIENT (1376|1540) Received LOCATION_FORWARD reply.
-CLIENT: Request 4 handled by object 2.
-Server is shutting down via object 2.
-Event loop finished.
-PortableInterceptor::ForwardRequest test passed.
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.cpp
deleted file mode 100644
index af8304f1cbb..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- C++ -*-
-
-#include "Server_ORBInitializer.h"
-
-ACE_RCSID (ForwardRequest,
- Server_ORBInitializer,
- "$Id$")
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "Server_Request_Interceptor.h"
-
-#include "tao/ORB_Constants.h"
-
-Server_ORBInitializer::Server_ORBInitializer (void)
- : server_interceptor_ ()
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor;
- // Install the server request interceptor.
- ACE_NEW_THROW_EX (interceptor,
- Server_Request_Interceptor,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- this->server_interceptor_ = interceptor;
-
- info->add_server_request_interceptor (interceptor
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableInterceptor::ServerRequestInterceptor_ptr
-Server_ORBInitializer::server_interceptor (void)
-{
- return
- PortableInterceptor::ServerRequestInterceptor::_duplicate (
- this->server_interceptor_.in ());
-}
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.h
deleted file mode 100644
index 90be3b9571a..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_ORBInitializer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Server_ORBInitializer.h
- *
- * $Id$
- *
- * Implementation header for the PortableInterceptor::ForwardRequest
- * exception test server side ORB initializer.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-// Forward declaration.
-class Server_Request_Interceptor;
-
-/// Server side ORB initializer.
-class Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- Server_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the created server request interceptor. Only valid after
- /// post_init(), i.e. ORB_init(), has been called.
- PortableInterceptor::ServerRequestInterceptor_ptr server_interceptor (void);
-
-private:
-
- /// Pointer to the server request interceptor. ORB is responsible
- /// for storage.
- PortableInterceptor::ServerRequestInterceptor_var server_interceptor_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.cpp
deleted file mode 100644
index 10ad41353cf..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-// -*- C++ -*-
-
-#include "Server_Request_Interceptor.h"
-
-#include "tao/ORB_Constants.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (ForwardRequest,
- Server_Request_Interceptor,
- "$Id$")
-
-Server_Request_Interceptor::Server_Request_Interceptor (void)
- : request_count_ (0)
-{
- this->obj_[0] = CORBA::Object::_nil ();
- this->obj_[1] = CORBA::Object::_nil ();
-}
-
-Server_Request_Interceptor::~Server_Request_Interceptor (void)
-{
-}
-
-void
-Server_Request_Interceptor::forward_references (
- CORBA::Object_ptr obj1,
- CORBA::Object_ptr obj2
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (CORBA::is_nil (obj1) || CORBA::is_nil (obj2))
- ACE_THROW (CORBA::INV_OBJREF (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- EINVAL),
- CORBA::COMPLETED_NO));
-
- this->obj_[0] = CORBA::Object::_duplicate (obj1);
- this->obj_[1] = CORBA::Object::_duplicate (obj2);
-}
-
-char *
-Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Server_Request_Interceptor");
-}
-
-void
-Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::release (this->obj_[0]);
- CORBA::release (this->obj_[1]);
-}
-
-void
-Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- this->request_count_++;
-
- CORBA::Boolean response_expected =
- ri->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!response_expected) // A one-way request.
- return;
-
- // Request 1 -- non-forwarded
- // Request 2 -- forwarded by client request interceptor
- // Request 3 -- forwarded by this interception point
-
- if (this->request_count_ == 3)
- {
- // The client request interceptor should have already forwarded
- // the request to obj_[1], so we re-forward the request back to
- // obj_[0].
-
- ACE_DEBUG ((LM_DEBUG,
- "SERVER (%P|%t) Request %d will be forwarded "
- "to object 1\n" // "object 1" as in "obj_[0]"
- "SERVER (%P|%t) via "
- "receive_request_service_contexts().\n",
- this->request_count_));
-
- ACE_THROW (PortableInterceptor::ForwardRequest (this->obj_[0]));
- }
-}
-
-void
-Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::Boolean response_expected =
- ri->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!response_expected) // A one-way request.
- return;
-
- // Request 1 -- non-forwarded
- // Request 2 -- forwarded by client request interceptor
- // Request 3 -- forwarded by receive_request_service_contexts()
- // Request 4 -- non-forwarded (give client chance to print result)
- // Request 5 -- forwarded by this interception point
-
- if (this->request_count_ == 5)
- {
- // This interceptor should have already forwarded the request to
- // obj_[0] so re-forward it to obj_[1]. This will be the last
- // location forward.
-
-
- ACE_DEBUG ((LM_DEBUG,
- "SERVER (%P|%t) Request %d will be forwarded "
- "to object 2\n" // "object 2" as in "obj_[1]"
- "SERVER (%P|%t) via receive_request().\n",
- this->request_count_ - 1));
- // "request_count_ - 1" is used above since there was a location
- // forward.
-
- ACE_THROW (PortableInterceptor::ForwardRequest (this->obj_[1]));
- }
-}
-
-void
-Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::Boolean response_expected =
- ri->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!response_expected) // A one-way request.
- return;
-
- // If we get this far then we should have received a
- // LOCATION_FORWARD reply.
-
- // This will throw an exception if a location forward has not
- // occured. If an exception is thrown then something is wrong with
- // the PortableInterceptor::ForwardRequest support.
- CORBA::Object_var forward = ri->forward_reference (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (forward.in ()))
- ACE_THROW (CORBA::INTERNAL ());
-}
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.h b/TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.h
deleted file mode 100644
index 382097c50a0..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/Server_Request_Interceptor.h
+++ /dev/null
@@ -1,137 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Server_Request_Interceptor.h
- *
- * $Id$
- *
- * Implementation header for the server request interceptor for the
- * PortableInterceptor::ForwardRequest test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_REQUEST_INTERCEPTOR_H
-#define SERVER_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "testC.h"
-#include "tao/LocalObject.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/PI_Server/PI_Server.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class Server_Request_Interceptor
- *
- * @brief Simple concrete server request interceptor.
- *
- * This server request interceptor forwards an initial client request
- * to the primary server since the client request interceptor should
- * have attempted to forward a request to the secondary server. That
- * request will then be forwarded back to the primary server, at which
- * point the request will be handled.
- *
- * The PortableInterceptor::ForwardRequest code for the
- * receive_request_service_contexts() interception point (which is not
- * in the servant skeleton) is slightly different from the
- * corresponding code in the server skeleton. Hence,
- * PortableInterceptor::ForwardRequest support is tested for both
- * cases by throwing that exception in the
- * receive_request_service_contexts() and the receive_request()
- * interception points.
- *
- * See the README file for test details.
- */
-class Server_Request_Interceptor
- : public virtual ForwardRequestTest::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- Server_Request_Interceptor (void);
-
- /// Set the references to which requests will be forwarded.
- virtual void forward_references (CORBA::Object_ptr obj1,
- CORBA::Object_ptr obj2
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /**
- * @name Methods Required by the Server Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all server request interceptors.
- */
- //@{
- /// Return the name of this ServerRequestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-protected:
-
- /// Destructor.
- ~Server_Request_Interceptor (void);
-
-private:
-
- /// The number of requests intercepted by this interceptor.
- CORBA::ULong request_count_;
-
- /// References to the two objects used in this test.
- CORBA::Object_ptr obj_[2];
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
deleted file mode 100644
index c04cfbaf890..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/client.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "testC.h"
-#include "Client_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (ForwardRequest,
- client,
- "$Id$")
-
-const char *ior1 = 0;
-const char *ior2 = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- if (argc != 5) // foo -k IOR_1 -k IOR_2
- ACE_ERROR_RETURN ((LM_ERROR,
- "Wrong number of arguments.\n"),
- -1);
-
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
-
- if (ior1 == 0)
- ior1 = get_opts.opt_arg ();
- else if (ior2 == 0)
- ior2 = get_opts.opt_arg ();
-
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-k IOR_1 -k IOR_2\n",
- argv[0]),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int status = 0;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
-#if TAO_HAS_INTERCEPTORS == 1
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- "Client ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (::parse_args (argc, argv) != 0)
- return -1;
-
- // Start out with the first IOR. Interaction with the second
- // IOR occurs during the various interceptions executed during
- // this test.
- CORBA::Object_var object =
- orb->string_to_object (ior1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ForwardRequestTest::test_var server =
- ForwardRequestTest::test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior1),
- 1);
- }
-
- // Invoke the operation four times. By design, the last three
- // invocations in this test will cause
- // PortableInterceptor::ForwardRequest exceptions to be thrown,
- // thus causing the request to be forwarded to another object.
-
- CORBA::Short old_number = 0; // Previous invocation result.
- CORBA::Short number = 0; // New invocation result.
- for (int i = 1; i <= 4; ++i)
- {
- ACE_DEBUG ((LM_INFO,
- "CLIENT: Issuing request %d.\n",
- i));
-
- if (i > 1)
- old_number = number;
-
- number = server->number (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "CLIENT: Request %d handled by object %d.\n",
- i,
- number));
-
- // Check if the new result is the same as the previous
- // result.
- //
- // This test is designed so that no two sequential
- // invocation results are the same. If they are the same,
- // then the requests were invoked on the same object, one
- // after the other. This means that forwarding did not
- // occur, which is of course a failure in the
- // PortableInterceptor::ForwardRequest support.
- if (i > 1 && old_number == number)
- {
- status = -1;
-
- ACE_ERROR ((LM_ERROR,
- "TEST FAILED: Request was not "
- "forwarded.\n"));
- break;
- }
- }
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- if (status != -1)
- ACE_DEBUG ((LM_INFO,
- "PortableInterceptor::ForwardRequest test passed.\n"));
-
- return status;
-}
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl b/TAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl
deleted file mode 100755
index 79926e14db6..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-#
-# $Id$
-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$file1 = PerlACE::LocalFile ("test1.ior");
-$file2 = PerlACE::LocalFile ("test2.ior");
-
-unlink $file1;
-unlink $file2;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test1.ior -o test2.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file1 -o $file2");
-}
-$CL = new PerlACE::Process ("client", "-k file://$file1 -k file://$file2");
-
-$status = 0;
-
-print STDERR "\n\n==== Running PortableInterceptor::ForwardRequest test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file1, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file1>\n";
- $SV->Kill ();
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($file2, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file2>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file1;
-unlink $file2;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp
deleted file mode 100644
index 286a18b98c0..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/server.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "test_i.h"
-#include "Server_ORBInitializer.h"
-#include "Server_Request_Interceptor.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (ForwardRequest,
- server,
- "$Id$")
-
-const char *ior1_file = 0;
-const char *ior2_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- if (argc != 5) // foo -o IOR_1 -o IOR_2
- ACE_ERROR_RETURN ((LM_ERROR,
- "Wrong number of arguments.\n"),
- -1);
-
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- int ior_count = 1;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
-
- if (ior_count == 1)
- {
- ior1_file = get_opts.opt_arg ();
- ++ior_count;
- }
- else if (ior_count == 2)
- {
- ior2_file = get_opts.opt_arg ();
- ++ior_count;
- }
-
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-o IOR_1 -o IOR_2\n",
- argv[0]),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
-#if TAO_HAS_INTERCEPTORS == 1
- Server_ORBInitializer *temp_initializer = 0;
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "Server ORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (::parse_args (argc, argv) != 0)
- return -1;
-
- CORBA::PolicyList policies; // Empty policy list.
-
- // Servant 1
- test_i servant1 (1, orb.in ());
-
- PortableServer::POA_var first_poa =
- root_poa->create_POA ("first POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var oid1 =
- first_poa->activate_object (&servant1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj1 =
- first_poa->servant_to_reference (&servant1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior1 =
- orb->object_to_string (obj1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "ForwardRequestTest::test servant 1: <%s>\n",
- ior1.in ()));
-
- // Servant 2
- test_i servant2 (2, orb.in ());
-
- PortableServer::POA_var second_poa =
- root_poa->create_POA ("second POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var oid2 =
- second_poa->activate_object (&servant2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj2 =
- second_poa->servant_to_reference (&servant2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior2 =
- orb->object_to_string (obj2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "ForwardRequestTest::test servant 2: <%s>\n",
- ior2.in ()));
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-#if TAO_HAS_INTERCEPTORS == 1
- // Set the forward references in the server request interceptor.
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = temp_initializer->server_interceptor ();
-
- ForwardRequestTest::ServerRequestInterceptor_var interceptor =
- ForwardRequestTest::ServerRequestInterceptor::_narrow (
- server_interceptor.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (interceptor.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Could not obtain reference to "
- "server request interceptor.\n"),
- -1);
-
- interceptor->forward_references (obj1.in (),
- obj2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- // Write each IOR to a file.
-
- // IOR 1
- FILE *output_file= ACE_OS::fopen (ior1_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior1.in ()),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior1.in ());
- ACE_OS::fclose (output_file);
-
- // IOR 2
- output_file= ACE_OS::fopen (ior2_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior2.in ()),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior2.in ());
- ACE_OS::fclose (output_file);
-
- // Run the ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/test.idl b/TAO/tests/Portable_Interceptors/ForwardRequest/test.idl
deleted file mode 100644
index 0b9ab7f0190..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/test.idl
+++ /dev/null
@@ -1,41 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * Simple IDL file to test PortableInterceptor::ForwardRequest
- * support.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#include "tao/PI_Server/PI_Server_include.pidl"
-
-module ForwardRequestTest
-{
-
- interface test
- {
- /// Return the number assigned to the current object. For
- /// example, object one will return "1," and object two will
- /// return "2."
- short number ();
-
- oneway void shutdown ();
- };
-
- local interface ServerRequestInterceptor
- : PortableInterceptor::ServerRequestInterceptor
- {
-
- /// Set the references to which requests will be forwarded.
- void forward_references (in Object obj1,
- in Object obj2);
-
- };
-
-};
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/test_i.cpp b/TAO/tests/Portable_Interceptors/ForwardRequest/test_i.cpp
deleted file mode 100644
index adafe5be28d..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/test_i.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- C++ -*-
-
-#include "test_i.h"
-
-ACE_RCSID (ForwardRequest,
- test_i,
- "$Id$")
-
-test_i::test_i (CORBA::Short num,
- CORBA::ORB_ptr orb)
- : number_ (num),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-test_i::~test_i (void)
-{
-}
-
-CORBA::Short
-test_i::number (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->number_;
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Server is shutting down via object %d.\n",
- this->number_));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/test_i.h b/TAO/tests/Portable_Interceptors/ForwardRequest/test_i.h
deleted file mode 100644
index 51c142c2de3..00000000000
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/test_i.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * Implementation header for the "test" IDL interface for the
- * PortableInterceptor::ForwardRequest test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TEST_I_H
-#define TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class test_i
- *
- * @brief Simple test class.
- *
- * This class implements the "test" interface used in this test.
- */
-class test_i : public virtual POA_ForwardRequestTest::test
-{
-public:
-
- /// Constructor.
- test_i (CORBA::Short num,
- CORBA::ORB_ptr orb);
-
- /// Destructor.
- ~test_i (void);
-
- /// Return the number assigned to this object.
- virtual CORBA::Short number (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Shutdown the ORB.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// The number assigned to this object.
- CORBA::Short number_;
-
- /// Pseudo-reference to the ORB.
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/.cvsignore b/TAO/tests/Portable_Interceptors/IORInterceptor/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp
deleted file mode 100644
index 2bf02d1ef30..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-#include "FOO_ClientRequestInterceptor.h"
-#include "testC.h"
-
-#include "ace/Log_Msg.h"
-
-#include "tao/AnyTypeCode/TypeCode_Constants.h"
-
-ACE_RCSID (IORInterceptor,
- FOO_ClientRequestInterceptor,
- "$Id$")
-
-
-FOO_ClientRequestInterceptor::FOO_ClientRequestInterceptor (
- IOP::Codec_ptr codec)
- : codec_ (IOP::Codec::_duplicate (codec))
-{
-}
-
-char *
-FOO_ClientRequestInterceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("FOO_ClientRequestInterceptor");
-}
-
-void
-FOO_ClientRequestInterceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-FOO_ClientRequestInterceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Verify that the tagged component that was supposed to be embedded
- // into the IOR by the FOO_IORInterceptor is actually in the IOR
- // profile.
- IOP::TaggedComponent_var component =
- ri->get_effective_component (FOO::COMPONENT_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // The correct tagged component appears to exist. Display the
- // contents of the component data, which should be a NULL terminated
- // string. In the case of this test, that string should be the name
- // of the IORInterceptor that added the tagged component to the IOR.
-
- if (component->component_data.length () == 0)
- {
- // This should never happen because the IORInterceptor name is
- // not an empty string.
- ACE_ERROR ((LM_ERROR,
- "Internal test error. Empty tagged component.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- CORBA::ULong maximum = component->component_data.maximum ();
- CORBA::ULong length = component->component_data.length ();
- CORBA::Octet * buffer = component->component_data.get_buffer ();
- CORBA::Boolean release = 0; // TaggedComponent retains ownership.
-
- CORBA::OctetSeq data (maximum, length, buffer, release);
-
- // Extract the data from the octet sequence.
- CORBA::Any_var decoded_data =
- this->codec_->decode_value (data,
- CORBA::_tc_string
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char * name = 0;
-
- if (!(decoded_data.in () >>= name))
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Unable to extract tagged component "
- "data from Any.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) String extracted from tagged component "
- "data: %s\n",
- name));
-}
-
-void
-FOO_ClientRequestInterceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-FOO_ClientRequestInterceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-FOO_ClientRequestInterceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-FOO_ClientRequestInterceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.h b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.h
deleted file mode 100644
index abe9074a545..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_ClientRequestInterceptor.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file FOO_ClientRequestInterceptor.h
- *
- * $Id$
- *
- * Implementation header for the "FOO" client request test
- * interceptor.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef FOO_CLIENT_REQUEST_INTERCEPTOR_H
-#define FOO_CLIENT_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class FOO_ClientRequestInterceptor
- *
- * @brief Simple concrete client request interceptor.
- *
- * This is a test client request interceptor that extracts a tagged
- * component that should have been embedded in the server IOR by an
- * IOR interceptor. It displays the contents of that tagged
- * component.
- */
-class FOO_ClientRequestInterceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor
- FOO_ClientRequestInterceptor (IOP::Codec_ptr codec);
-
- /**
- * @name Methods Required by the Client Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all client request interceptors.
- */
- //@{
- /// Return the name of this ClientRequestInterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- /// The CDR encapsulation coder/decoder used to retrieve data
- /// from the CDR encapsulation in the tagged component.
- IOP::Codec_var codec_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* FOO_CLIENT_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp
deleted file mode 100644
index f999b2f22bb..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "FOO_Client_ORBInitializer.h"
-#include "FOO_ClientRequestInterceptor.h"
-
-#include "tao/ORB_Constants.h"
-#include "tao/CodecFactory/CodecFactory.h"
-
-ACE_RCSID (IORInterceptor,
- FOO_Client_ORBInitializer,
- "$Id$")
-
-
-void
-FOO_Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr /* info */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-FOO_Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- IOP::CodecFactory_var codec_factory =
- info->codec_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Set up a structure that contains information necessary to
- // create a GIOP 1.2 CDR encapsulation Codec.
- IOP::Encoding encoding;
- encoding.format = IOP::ENCODING_CDR_ENCAPS;
- encoding.major_version = 1;
- encoding.minor_version = 2;
-
- // Obtain the CDR encapsulation Codec.
- IOP::Codec_var codec =
- codec_factory->create_codec (encoding
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_ptr foo;
- ACE_NEW_THROW_EX (foo,
- FOO_ClientRequestInterceptor (codec.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var interceptor =
- foo;
-
- info->add_client_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.h
deleted file mode 100644
index a047658b5a8..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file FOO_Client_ORBInitializer.h
- *
- * $Id$
- *
- * Implementation header for the "FOO" IOR test interceptor ORB
- * initializer.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef FOO_CLIENT_ORB_INITIALIZER_H
-#define FOO_CLIENT_ORB_INITIALIZER_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class FOO_Client_ORBInitializer
- *
- * @brief Simple concrete ORB initializer.
- *
- * This is a test ORB initializer that registers an Client for
- * this test.
- */
-class FOO_Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the ORBInitializer Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all ORB initializers.
- */
- //@{
- /// The pre-initialization hook.
- virtual void pre_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// The post-initialization hook.
- virtual void post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* FOO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp
deleted file mode 100644
index c29013285ff..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-#include "FOO_IORInterceptor.h"
-#include "testS.h"
-
-#include "tao/ORB_Constants.h"
-
-ACE_RCSID (IORInterceptor,
- FOO_IORInterceptor,
- "$Id$")
-
-
-FOO_IORInterceptor::FOO_IORInterceptor (IOP::Codec_ptr codec)
- : codec_ (IOP::Codec::_duplicate (codec))
-{
-}
-
-char *
-FOO_IORInterceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("FOO_IORInterceptor");
-}
-
-void
-FOO_IORInterceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-FOO_IORInterceptor::establish_components (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // According to the Portable Interceptors specification,
- // IORInterceptor::establish_components() must not throw an
- // exception. We check for exceptions despite this fact. The ORB
- // does the right thing, and ignores any IOR interceptors that throw
- // an exception.
-
- CORBA::String_var name = this->name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Any data;
- data <<= name.in ();
-
- CORBA::OctetSeq_var encoded_data =
- this->codec_->encode_value (data
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Construct a tagged component.
- IOP::TaggedComponent component;
-
- component.tag = FOO::COMPONENT_ID;
-
- const CORBA::ULong maximum = encoded_data->maximum ();
- const CORBA::ULong length = encoded_data->length ();
- CORBA::Octet * buffer = encoded_data->get_buffer ();
- const CORBA::Boolean release = 0; // OctetSeq retains ownership.
-
- ACE_ASSERT (maximum > 1); // Sanity check.
- ACE_ASSERT (length > 1); // Sanity check.
-
- component.component_data.replace (maximum, length, buffer, release);
-
- ACE_ASSERT (component.component_data.length () == length);
-
- // Add the tagged component to all profiles.
- info->add_ior_component (component
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Added tagged component containing the\n"
- "(%P|%t) string \"%s\" to all profiles.\n",
- name.in ()));
-
-
- // Add the tagged component to all IIOP profiles.
- info->add_ior_component_to_profile (component,
- IOP::TAG_INTERNET_IOP
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Added tagged component containing the\n"
- "(%P|%t) string \"%s\" to all IIOP profiles.\n",
- name.in ()));
-
-
- ACE_TRY
- {
- // Verify that policy retrieval internals work, and do not cause
- // memory access violations.
- CORBA::Policy_var policy =
- info->get_effective_policy (PortableServer::THREAD_POLICY_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Successfully retrieved effective policy.\n"));
- }
- ACE_CATCH (CORBA::INV_POLICY, ex)
- {
- if (ex.minor () != (CORBA::OMGVMCID | 3))
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-FOO_IORInterceptor::components_established (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Construct a dummy tagged component.
- IOP::TaggedComponent component;
-
- component.tag = 0;
- component.component_data.length (1);
-
-
- ACE_TRY_EX (ALL)
- {
- // Add the tagged component to all profiles.
- //
- // This call should fail since it shouldn't be possible to add
- // an IOR component after establish_components() has been
- // called.
- info->add_ior_component (component
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (ALL);
-
- // The above call should NOT have succeeded.
- ACE_TRY_THROW_EX (CORBA::INTERNAL (), ALL);
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
- {
- if (ex.minor () != (CORBA::OMGVMCID | 14))
- {
- ACE_PRINT_EXCEPTION (ex,
- "Unexpected exception");
-
- ACE_RE_THROW_EX (ALL);
- }
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (PROFILE)
- {
- // Add the tagged component to all profiles.
- //
- // This call should fail since it shouldn't be possible to add
- // an IOR component after establish_components() has been
- // called.
- info->add_ior_component_to_profile (component,
- IOP::TAG_INTERNET_IOP
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (PROFILE);
-
- // The above call should NOT have succeeded.
- ACE_TRY_THROW_EX (CORBA::INTERNAL (), PROFILE);
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
- {
- if (ex.minor () != (CORBA::OMGVMCID | 14))
- {
- ACE_PRINT_EXCEPTION (ex,
- "Unexpected exception");
-
- ACE_RE_THROW_EX (PROFILE);
- }
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-FOO_IORInterceptor::adapter_manager_state_changed (
- const char *,
- PortableInterceptor::AdapterState
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-FOO_IORInterceptor:: adapter_state_changed (
- const PortableInterceptor::ObjectReferenceTemplateSeq &,
- PortableInterceptor::AdapterState
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h
deleted file mode 100644
index 4fc980070d1..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file FOO_IORInterceptor.h
- *
- * $Id$
- *
- * Implementation header for the "FOO" IOR test interceptor.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef FOO_IOR_INTERCEPTOR_H
-#define FOO_IOR_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/IORInterceptor/IORInterceptor.h"
-#include "tao/CodecFactory/CodecFactory.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class FOO_IORInterceptor
- *
- * @brief Simple concrete IOR interceptor.
- *
- * This is a test IOR interceptor that embeds a tagged component in an
- * IOR. That tagged component will then be verified on the client
- * side to ensure that IOR interceptor support is functioning
- * properly.
- */
-class FOO_IORInterceptor
- : public virtual PortableInterceptor::IORInterceptor_3_0,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor
- FOO_IORInterceptor (IOP::Codec_ptr codec);
-
- /**
- * @name Methods Required by the IOR Interceptor Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all IOR interceptors.
- */
- //@{
- /// Return the name of this IORInterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Cleanup resources acquired by this IORInterceptor.
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Add the tagged components to the IOR.
- virtual void establish_components (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void components_established (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void adapter_manager_state_changed (
- const char * id,
- PortableInterceptor::AdapterState state
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- virtual void adapter_state_changed (
- const PortableInterceptor::ObjectReferenceTemplateSeq & templates,
- PortableInterceptor::AdapterState state
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- //@}
-
-private:
-
- /// The CDR encapsulation coder/decoder used to encapsulate data
- /// into a CDR encapsulation.
- IOP::Codec_var codec_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* FOO_IOR_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp
deleted file mode 100644
index 1930da1d6b0..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- C++ -*-
-
-#include "FOO_IORInterceptor_ORBInitializer.h"
-#include "FOO_IORInterceptor.h"
-
-#include "tao/ORB_Constants.h"
-#include "tao/CodecFactory/CodecFactory.h"
-
-ACE_RCSID (IORInterceptor,
- FOO_IORInterceptor_ORBInitializer,
- "$Id$")
-
-void
-FOO_IORInterceptor_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr /* info */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-FOO_IORInterceptor_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- IOP::CodecFactory_var codec_factory =
- info->codec_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Set up a structure that contains information necessary to
- // create a GIOP 1.2 CDR encapsulation Codec.
- IOP::Encoding encoding;
- encoding.format = IOP::ENCODING_CDR_ENCAPS;
- encoding.major_version = 1;
- encoding.minor_version = 2;
-
- // Obtain the CDR encapsulation Codec.
- IOP::Codec_var codec =
- codec_factory->create_codec (encoding
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::IORInterceptor_ptr foo;
- ACE_NEW_THROW_EX (foo,
- FOO_IORInterceptor (codec.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::IORInterceptor_var ior_interceptor =
- foo;
-
- info->add_ior_interceptor (ior_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.h b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.h
deleted file mode 100644
index 62daa94f1ae..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file FOO_IORInterceptor_ORBInitializer.h
- *
- * $Id$
- *
- * Implementation header for the "FOO" IOR test interceptor ORB
- * initializer.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef FOO_IOR_INTERCEPTOR_ORB_INITIALIZER_H
-#define FOO_IOR_INTERCEPTOR_ORB_INITIALIZER_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class FOO_IORInterceptor_ORBInitializer
- *
- * @brief Simple concrete ORB initializer.
- *
- * This is a test ORB initializer that registers an IORInterceptor for
- * this test.
- */
-class FOO_IORInterceptor_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the ORBInitializer Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all ORB initializers.
- */
- //@{
- /// The pre-initialization hook.
- virtual void pre_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// The post-initialization hook.
- virtual void post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* FOO_IOR_INTERCEPTOR_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc b/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
deleted file mode 100644
index fddc7298207..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iorinterceptor, interceptors {
- Source_Files {
- test_i.cpp
- FOO_IORInterceptor_ORBInitializer.cpp
- FOO_IORInterceptor.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- FOO_Client_ORBInitializer.cpp
- FOO_ClientRequestInterceptor.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/README b/TAO/tests/Portable_Interceptors/IORInterceptor/README
deleted file mode 100644
index fe3af0388b9..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/README
+++ /dev/null
@@ -1,28 +0,0 @@
-# $Id$
-
-This test verifies that IOR interceptor support is working properly.
-It does so by adding a unique tagged component to the IOR. If the
-IOR interceptor support is working properly, then the it should be
-possible to extract that tagged component from the IOR on the client
-side via the
-
- PortableInterceptor::ClientRequestInfo::get_effective_component()
-
-method from within a ClientRequestInterceptor, for example.
-
-Run the test as follows:
-
- $ perl run_test.pl
-
-Output should be very similar to the following:
-
-==== Running IORInterceptor test
-(4956|16384) Added tagged component containing the
-(4956|16384) string "FOO_IORInterceptor" to all profiles.
-(4956|16384) Added tagged component containing the
-(4956|16384) string "FOO_IORInterceptor" to all IIOP profiles.
-(4956|16384) Successfully retrieved effective policy.
-FOO::test: <IOR:...>
-(4957|16384) String extracted from tagged component data: FOO_IORInterceptor
-"test_i" is shutting down.
-Event loop finished.
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
deleted file mode 100644
index a482b81963e..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/client.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "testC.h"
-#include "FOO_Client_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (IORInterceptor,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-k IOR "
- "\n",
- argv[0]),
- -1);
- }
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
-#if TAO_HAS_INTERCEPTORS == 1
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- FOO_Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "client_orb" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var obj =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- FOO::test_var server =
- FOO::test::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil.\n",
- ior),
- 1);
- }
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "IORInterceptor test (client-side):");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl b/TAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl
deleted file mode 100755
index d6c417c48cb..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-# $Id$
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-k file://$file");
-
-print STDERR "\n\n==== Running IORInterceptor test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp
deleted file mode 100644
index a91cf021548..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/server.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "test_i.h"
-#include "FOO_IORInterceptor_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (IORInterceptor,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-o <iorfile>"
- "\n",
- argv[0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
-#if TAO_HAS_INTERCEPTORS == 1
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- FOO_IORInterceptor_ORBInitializer,
- -1); // No CORBA exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- "test_orb"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to obtain RootPOA reference.\n"),
- -1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- test_i server_impl (orb.in ());
-
- obj = server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- FOO::test_var server = FOO::test::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to obtain reference to FOO::test "
- "object.\n"),
- -1);
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO, "FOO::test: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the IOR to it.
- if (ior_output_file != 0)
- {
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing "
- "IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO, "Event loop finished.\n"));
-
- // The interceptors will be destroyed when we call this
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "IORInterceptor test (server-side):");
-
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/test.idl b/TAO/tests/Portable_Interceptors/IORInterceptor/test.idl
deleted file mode 100644
index f6914d3edcc..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/test.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * "test" IDL interface for the IORInterceptor test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#include "tao/IOP.pidl"
-
-module FOO
-{
-
- interface test
- {
- oneway void shutdown ();
- };
-
- // @@ Hopefully, this tagged component ID won't be reserved by
- // anything, anytime soon.
- const IOP::ComponentId COMPONENT_ID = 3456;
-
-};
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/test_i.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/test_i.cpp
deleted file mode 100644
index ecdb6b3560f..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/test_i.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- C++ -*-
-
-#include "test_i.h"
-
-ACE_RCSID (IORInterceptors,
- test_i,
- "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "\"test_i\" is shutting down.\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/test_i.h b/TAO/tests/Portable_Interceptors/IORInterceptor/test_i.h
deleted file mode 100644
index a712ff5c8d7..00000000000
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/test_i.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * Implementation header for the "test" IDL interface for the
- * IORInterceptor test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TEST_I_H
-#define TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class test_i
- *
- * @brief Simple test class.
- *
- * This class exists only to make it possible to generate an IOR to
- * which the test IOR interceptor will add a tagged component.
- */
-class test_i : public virtual POA_FOO::test
-{
-public:
-
- /// Constructor.
- test_i (CORBA::ORB_ptr orb);
-
- /// Shutdown the ORB.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// Pseudo-reference to the ORB.
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/.cvsignore b/TAO/tests/Portable_Interceptors/ORB_Shutdown/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc b/TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc
deleted file mode 100644
index 600ba5c118b..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/PI_ORB_Shutdown.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-//
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- Server_ORBInitializer.cpp
- Server_Request_Interceptor.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
-
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/README b/TAO/tests/Portable_Interceptors/ORB_Shutdown/README
deleted file mode 100644
index 285817b4223..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/README
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Id$
-
-This test verifies that the ServerRequestInterceptor::destroy() method
-is not called prematurely, e.g. during ORB::shutdown() and before
-ending interception points have been called.
-
-See bug report 1642 in our bug tracking system for complete details.
-
-Test output should be similar to the following:
-
-==== Running PortableInterceptor ORB::shutdown() test
-test servant: <IOR:010000000...>
-Hello!
-Shutting down ORB.
-Event loop finished.
-PortableInterceptor ORB::shutdown() test passed.
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.cpp
deleted file mode 100644
index 04262d84180..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- C++ -*-
-
-#include "Server_ORBInitializer.h"
-
-ACE_RCSID (ForwardRequest,
- Server_ORBInitializer,
- "$Id$")
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "Server_Request_Interceptor.h"
-
-#include "tao/ORB_Constants.h"
-
-Server_ORBInitializer::Server_ORBInitializer (bool & destroy_called)
- : destroy_called_ (destroy_called)
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor;
- ACE_NEW_THROW_EX (interceptor,
- Server_Request_Interceptor (this->destroy_called_),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var server_interceptor =
- interceptor;
-
- info->add_server_request_interceptor (interceptor
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.h
deleted file mode 100644
index 1498e7c020c..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_ORBInitializer.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Server_ORBInitializer.h
- *
- * $Id$
- *
- * Implementation header for the PortableInterceptor ORB::shutdown()
- * test server side ORB initializer.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-
-#include "tao/LocalObject.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "tao/PI/PI.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-// Forward declaration.
-class Server_Request_Interceptor;
-
-/// Server side ORB initializer.
-class Server_ORBInitializer
- : public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- Server_ORBInitializer (bool & destroy_called);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// Flag that states whether this interceptor's @c destroy() method
- /// was called.
- bool & destroy_called_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.cpp b/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.cpp
deleted file mode 100644
index d7cd081e6d3..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-#include "Server_Request_Interceptor.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (ORB_Shutdown,
- Server_Request_Interceptor,
- "$Id$")
-
-Server_Request_Interceptor::Server_Request_Interceptor (bool & destroy_called)
- : destroy_called_ (destroy_called)
-{
- this->destroy_called_ = false; // Sanity check.
-}
-
-Server_Request_Interceptor::~Server_Request_Interceptor (void)
-{
- // ORB::destroy() should have been called, which in turn should have
- // called the Interceptor::destroy() method in all registered
- // interceptors.
- ACE_ASSERT (this->destroy_called_ == true);
-}
-
-char *
-Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Server_Request_Interceptor");
-}
-
-void
-Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->destroy_called_ = true;
-}
-
-void
-Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Interceptor::destroy() should not have been called yet.
- ACE_ASSERT (this->destroy_called_ == false);
-}
-
-void
-Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-
-{
- // Interceptor::destroy() should not have been called yet.
- ACE_ASSERT (this->destroy_called_ == false);
-}
-
-void
-Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Interceptor::destroy() should not have been called yet.
- ACE_ASSERT (this->destroy_called_ == false);
-}
-
-void
-Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Interceptor::destroy() should not have been called yet.
- ACE_ASSERT (this->destroy_called_ == false);
-}
-
-void
-Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Interceptor::destroy() should not have been called yet.
- ACE_ASSERT (this->destroy_called_ == false);
-}
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.h b/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.h
deleted file mode 100644
index 10e3add572b..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/Server_Request_Interceptor.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Server_Request_Interceptor.h
- *
- * $Id$
- *
- * Implementation header for the server request interceptor for the
- * PortableInterceptor ORB::shutdown() test.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_REQUEST_INTERCEPTOR_H
-#define SERVER_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class Server_Request_Interceptor
- *
- * @brief Simple concrete server request interceptor.
- *
- * This server request interceptor simply determines if its @c
- * destroy() method is invoked out of order.
- *
- * See the README file for test details.
- */
-class Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- Server_Request_Interceptor (bool & destroy_called);
-
- /**
- * @name Methods Required by the Server Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all server request interceptors.
- */
- //@{
- /// Return the name of this ServerRequestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-protected:
-
- /// Destructor.
- ~Server_Request_Interceptor (void);
-
-private:
-
- /// Flag that states whether this interceptor's @c destroy() method
- /// was called.
- bool & destroy_called_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp b/TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp
deleted file mode 100644
index ca70543c315..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/client.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "testC.h"
-
-
-ACE_RCSID (ORB_Shutdown,
- client,
- "$Id$")
-
-
-const char *ior = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
-
- if (ior == 0)
- ior = get_opts.opt_arg ();
-
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-k IOR\n",
- argv[0]),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- "Client ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (::parse_args (argc, argv) != 0)
- return -1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var server = test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- server->hello (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_INFO,
- "PortableInterceptor ORB::shutdown() test passed.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/run_test.pl b/TAO/tests/Portable_Interceptors/ORB_Shutdown/run_test.pl
deleted file mode 100755
index 6c03ec53a45..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/run_test.pl
+++ /dev/null
@@ -1,53 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-#
-# $Id$
-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-k file://$file");
-
-$status = 0;
-
-print STDERR "\n\n==== Running PortableInterceptor ORB::shutdown() test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp b/TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp
deleted file mode 100644
index 000fda92d76..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/server.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-#include "ace/Get_Opt.h"
-
-#include "test_i.h"
-#include "Server_ORBInitializer.h"
-#include "Server_Request_Interceptor.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "ace/OS_NS_stdio.h"
-
-
-ACE_RCSID (ORB_Shutdown,
- server,
- "$Id$")
-
-
-const char *ior_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_file = get_opts.opt_arg ();
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-o IOR\n",
- argv[0]),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- bool destroy_called = false;
-
-#if TAO_HAS_INTERCEPTORS == 1
- Server_ORBInitializer *temp_initializer = 0;
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer (destroy_called),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "Server ORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (::parse_args (argc, argv) != 0)
- return -1;
-
- test_i servant (orb.in ());
-
- CORBA::Object_var obj =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "test servant: <%s>\n",
- ior.in ()));
-
- // Write IOR to a file.
- FILE *output_file= ACE_OS::fopen (ior_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- // Run the ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (destroy_called == true);
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/test.idl b/TAO/tests/Portable_Interceptors/ORB_Shutdown/test.idl
deleted file mode 100644
index a186afb08e8..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/test.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * Simple IDL file to test PortableInterceptor/ORB::shutdown()
- * semantics.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-interface test
-{
- void hello ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.cpp b/TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.cpp
deleted file mode 100644
index 8e96015a4c1..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "test_i.h"
-
-
-ACE_RCSID (ORB_Shutdown,
- test_i,
- "$Id$")
-
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-test_i::~test_i (void)
-{
-}
-
-void
-test_i::hello (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Hello!\n"));
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Shutting down ORB.\n"));
-
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.h b/TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.h
deleted file mode 100644
index 4ada828b0c2..00000000000
--- a/TAO/tests/Portable_Interceptors/ORB_Shutdown/test_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * Implementation header for the "test" IDL interface for the
- * PortableInterceptor ORB::shutdown() test.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TEST_I_H
-#define TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class test_i
- *
- * @brief Simple test class.
- *
- * This class implements the "test" interface used in this test.
- */
-class test_i : public virtual POA_test
-{
-public:
-
- /// Constructor.
- test_i (CORBA::ORB_ptr orb);
-
- /// Destructor.
- ~test_i (void);
-
- /// Say hello.
- virtual void hello (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Shutdown the ORB.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// Pseudo-reference to the ORB.
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/.cvsignore b/TAO/tests/Portable_Interceptors/PICurrent/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.cpp
deleted file mode 100644
index 425c916436e..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// -*- C++ -*-
-
-#include "ClientORBInitializer.h"
-#include "ClientRequestInterceptor.h"
-
-#include "tao/ORB_Constants.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (PICurrent,
- ClientORBInitializer,
- "$Id$")
-
-
-PortableInterceptor::SlotId slot_id = 2093843211;
-
-
-void
-ClientORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr /* info */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ClientORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Object_var obj =
- info->resolve_initial_references ("PICurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (pi_current.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Could not resolve PICurrent object.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- ::slot_id = info->allocate_slot_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_ptr foo;
- ACE_NEW_THROW_EX (foo,
- ClientRequestInterceptor (::slot_id,
- pi_current.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var interceptor =
- foo;
-
- info->add_client_request_interceptor (interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.h b/TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.h
deleted file mode 100644
index f540262ca7b..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientORBInitializer.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ClientORBInitializer.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef CLIENT_ORB_INITIALIZER_H
-#define CLIENT_ORB_INITIALIZER_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-
-// Test's SlotId made global for ease of implementation.
-// It is initialized to a large number to make it obvious when the
-// SlotId is invalid.
-//
-// Don't do this if you have more than one ORB in your application or
-// if thread-safety is an issue!!!
-extern PortableInterceptor::SlotId slot_id;
-
-
-/**
- * @class ClientORBInitializer
- *
- * @brief Simple concrete ORB initializer.
- *
- * This is a test ORB initializer that registers an
- * ClientRequestInterceptor for this test.
- */
-class ClientORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the ORBInitializer Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all ORB initializers.
- */
- //@{
- /// The pre-initialization hook.
- virtual void pre_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// The post-initialization hook.
- virtual void post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp
deleted file mode 100644
index 66a253f3074..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-#include "ClientRequestInterceptor.h"
-
-#include "tao/CORBA_String.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-
-ACE_RCSID (PICurrent,
- ClientRequestInterceptor,
- "$Id$")
-
-
-ClientRequestInterceptor::ClientRequestInterceptor (
- PortableInterceptor::SlotId id,
- PortableInterceptor::Current_ptr pi_current)
- : slot_id_ (id),
- pi_current_ (PortableInterceptor::Current::_duplicate (pi_current))
-{
-}
-
-char *
-ClientRequestInterceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("ClientRequestInterceptor");
-}
-
-void
-ClientRequestInterceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ClientRequestInterceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "invoke_me") != 0)
- return; // Don't mess with PICurrent if not invoking test method.
-
- ACE_TRY
- {
- // Retrieve data from the RSC (request scope current).
- CORBA::Long number = 0;
-
- CORBA::Any_var data =
- ri->get_slot (this->slot_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(data.in () >>= number))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Unable to extract data from Any.\n"));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Extracted <%d> from RSC slot %u\n",
- number,
- this->slot_id_));
-
- CORBA::Any new_data;
- CORBA::String_var s = CORBA::string_dup ("Et tu Brute?");
-
- new_data <<= s.in ();
-
- // Now reset the contents of our slot in the thread-scope
- // current (TSC).
- this->pi_current_->set_slot (this->slot_id_,
- new_data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now retrieve the data from the RSC again. It should not have
- // changed!
- CORBA::Long number2 = -1;
-
- CORBA::Any_var data2 =
- ri->get_slot (this->slot_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(data2.in () >>= number2)
- || number != number2)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: RSC was modified after "
- "TSC was modified.\n"));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
-
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "send_request()\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) Client side RSC/TSC semantics appear "
- "to be correct.\n"));
-}
-
-void
-ClientRequestInterceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ClientRequestInterceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ClientRequestInterceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-ClientRequestInterceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h
deleted file mode 100644
index c4709fff0a6..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h
+++ /dev/null
@@ -1,113 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ClientRequestInterceptor.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef CLIENT_REQUEST_INTERCEPTOR_H
-#define CLIENT_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class ClientRequestInterceptor
- *
- * @brief Simple concrete client request interceptor.
- *
- * This is a test client request interceptor that verifies that the
- * client side PICurrent semantics are correct. In particular, it
- * verifies that the request-scope current (RSC) is not modified after
- * the contents of the thread-scope current (TSC) are copied to it.
- * This is particularly important for ORBs that initially perform a
- * logical copy for performance reasons.
- */
-class ClientRequestInterceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- ClientRequestInterceptor (PortableInterceptor::SlotId slot_id,
- PortableInterceptor::Current_ptr pi_current);
-
- /**
- * @name Methods Required by the Client Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all client request interceptors.
- */
- //@{
- /// Return the name of this ClientRequestInterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- /// The PICurrent slot ID allocated to this application during ORB
- /// initialization.
- PortableInterceptor::SlotId slot_id_;
-
- /// Reference to the PICurrent object.
- PortableInterceptor::Current_var pi_current_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* CLIENT_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.cpp
deleted file mode 100644
index 5eae8540505..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-#include "ClientRequestInterceptor2.h"
-
-#include "tao/CORBA_String.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (PICurrent,
- ClientRequestInterceptor2,
- "$Id$")
-
-
-ClientRequestInterceptor2::ClientRequestInterceptor2 (
- PortableInterceptor::SlotId id)
- : slot_id_ (id)
-{
-}
-
-char *
-ClientRequestInterceptor2::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("ClientRequestInterceptor2");
-}
-
-void
-ClientRequestInterceptor2::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ClientRequestInterceptor2::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "invoke_you") != 0)
- return; // Don't mess with PICurrent if not invoking test method.
-
- ACE_TRY
- {
- // The goal of this test is to verify that a request scope
- // current was successfully shallow copied from a TSC that
- // itself was shallow copied from a ServerRequestInfo's RSC.
- // Specifically, verify that the RSC->TSC->RSC sequence of
- // copies occurred correctly.
-
- // Retrieve data from the RSC (request scope current).
- CORBA::Long number = 0;
-
- CORBA::Any_var data =
- ri->get_slot (this->slot_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!(data.in () >>= number))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Unable to extract data from "
- "CORBA::Any retrieved from RSC.\n"));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Extracted <%d> from RSC slot %u\n",
- number,
- this->slot_id_));
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "send_request()\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) RSC->TSC->RSC copying appears to be working.\n"));
-}
-
-void
-ClientRequestInterceptor2::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ClientRequestInterceptor2::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ClientRequestInterceptor2::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-ClientRequestInterceptor2::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.h b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.h
deleted file mode 100644
index cfca53a52d6..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor2.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ClientRequestInterceptor2.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef CLIENT_REQUEST_INTERCEPTOR2_H
-#define CLIENT_REQUEST_INTERCEPTOR2_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class ClientRequestInterceptor2
- *
- * @brief Simple concrete client request interceptor.
- *
- * This is a test client request interceptor that verifies that is
- * used when verifying that the RSC->TSC->RSC copying semantics work
- * as expected.
- */
-class ClientRequestInterceptor2
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- ClientRequestInterceptor2 (PortableInterceptor::SlotId slot_id);
-
- /**
- * @name Methods Required by the Client Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all client request interceptors.
- */
- //@{
- /// Return the name of this ClientRequestInterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- /// The PICurrent slot ID allocated to this application during ORB
- /// initialization.
- PortableInterceptor::SlotId slot_id_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* CLIENT_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc b/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
deleted file mode 100644
index 39a60cd5c75..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
+++ /dev/null
@@ -1,23 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- ServerORBInitializer.cpp
- ServerRequestInterceptor.cpp
- ClientRequestInterceptor2.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- ClientORBInitializer.cpp
- ClientRequestInterceptor.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/README b/TAO/tests/Portable_Interceptors/PICurrent/README
deleted file mode 100644
index 275a73e9974..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/README
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# $Id$
-#
-
-This test verifies that the "PICurrent" object semantics are correct
-on both the client side and the server side. In particular, it
-attempts to make sure the request scope current (RSC) and thread scope
-current (TSC) copying semantics are correct when transitioning between
-the two scopes on both the client and server sides. This is
-accomplished by setting and getting elements of different types in the
-RSC and TSC slot tables at various points during the course of an
-invocation.
-
-Expected output is along the lines of the following:
-
-==== Running PICurrent test
-PICurrentTest::test: <IOR:010000001b000000...>
-(9378|1078768288) Extracted <46> from RSC slot 0
-(9378|1078768288) Client side RSC/TSC semantics appear to be correct.
-(9377|1080582944) Inserted number <62> into RSC.
-Test method invoked.
-(9377|1080582944) Retrieved number <62> from TSC.
-(9377|1080582944) Extracted <62> from RSC slot 0
-(9377|1080582944) RSC->TSC->RSC copying appears to be working.
-(9377|1080582944) String "Drink milk!" inserted into TSC.
-(9377|1080582944) Retrieved "Drink milk!" from the RSC.
-(9377|1080582944) Server side RSC/TSC semantics appear to be correct.
-(9378|1078768288) Retrieved "Et tu Brute?" from the TSC.
-(9377|1080582944) Server is shutting down.
-Event loop finished.
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp
deleted file mode 100644
index daa05dfb4ad..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// -*- C++ -*-
-
-#include "ServerORBInitializer.h"
-#include "ServerRequestInterceptor.h"
-#include "ClientRequestInterceptor2.h"
-#include "tao/PI/ORBInitInfo.h"
-#include "tao/ORB_Core.h"
-
-ACE_RCSID (PICurrent,
- ServerORBInitializer,
- "$Id$")
-
-PortableInterceptor::SlotId slot_id = 2093843221;
-
-void
-ServerORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr /* info */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ServerORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Object_var obj =
- info->resolve_initial_references ("PICurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (pi_current.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Could not resolve PICurrent object.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- ::slot_id = info->allocate_slot_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_ptr server_tmp;
- ACE_NEW_THROW_EX (server_tmp,
- ServerRequestInterceptor (::slot_id,
- pi_current.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var server_interceptor =
- server_tmp;
-
- info->add_server_request_interceptor (server_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_ptr client_tmp;
- ACE_NEW_THROW_EX (client_tmp,
- ClientRequestInterceptor2 (::slot_id),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var client_interceptor =
- client_tmp;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Disable collocation -- TAO-specific!!!
- //
- // Collocation optimizations must be disabled since TAO doesn't
- // implement interceptor support for THRU_POA collocated
- // invocations yet, and we need to force a client request
- // interceptor to be invoked in this server.
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- tao_info->orb_core ()->optimize_collocation_objects (0);
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.h b/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.h
deleted file mode 100644
index 9c997d45f6c..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ServerORBInitializer.h
- *
- * $Id$
- *
- * Implementation header for the PICurrentTest server-side ORB
- * initializer.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_ORB_INITIALIZER_H
-#define SERVER_ORB_INITIALIZER_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-// Test's SlotId made global for ease of implementation.
-// It is initialized to a large number to make it obvious when the
-// SlotId is invalid.
-//
-// Don't do this if you have more than one ORB in your application or
-// if thread-safety is an issue!!!
-extern PortableInterceptor::SlotId slot_id;
-
-/**
- * @class ServerORBInitializer
- *
- * @brief Simple concrete ORB initializer.
- *
- * This is a test ORB initializer that registers an IORInterceptor for
- * this test.
- */
-class ServerORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the ORBInitializer Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all ORB initializers.
- */
- //@{
- /// The pre-initialization hook.
- virtual void pre_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// The post-initialization hook.
- virtual void post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
deleted file mode 100644
index a76d1d5b774..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-// -*- C++ -*-
-
-#include "ServerRequestInterceptor.h"
-
-#include "tao/CORBA_String.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (PICurrent,
- ServerRequestInterceptor,
- "$Id$")
-
-ServerRequestInterceptor::ServerRequestInterceptor (
- PortableInterceptor::SlotId id,
- PortableInterceptor::Current_ptr pi_current)
- : slot_id_ (id),
- pi_current_ (PortableInterceptor::Current::_duplicate (pi_current))
-{
-}
-
-char *
-ServerRequestInterceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("ServerRequestInterceptor");
-}
-
-void
-ServerRequestInterceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-ServerRequestInterceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "invoke_me") != 0)
- return; // Don't mess with PICurrent if not invoking test method.
-
- ACE_TRY
- {
- // Insert data into the RSC (request scope current).
-
- CORBA::Long number = 62;
-
- CORBA::Any data;
- data <<= number;
-
- ri->set_slot (this->slot_id_, data ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Inserted number <%d> into RSC.\n",
- number));
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "receive_request_service_contexts()\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-ServerRequestInterceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ACE_TRY
- {
- CORBA::Any new_data;
- CORBA::Long number = 19;
- new_data <<= number;
-
- // Set a value in RSC, this should not effect TSC anymore
- ri->set_slot (this->slot_id_,
- new_data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now retrieve the data from the TSC again. It should not have
- // changed to the new value
- CORBA::Any_var data2 =
- this->pi_current_->get_slot (this->slot_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Long number2 = 0;
- if ((data2.in () >>= number2)
- && number == number2)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: TSC was modified because "
- "RSC was modified.\n"));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "send_reply()\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) Server side RSC/TSC semantics appear "
- "to be correct.\n"));
-
-}
-
-void
-ServerRequestInterceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (op.in (), "invoke_me") != 0)
- return; // Don't mess with PICurrent if not invoking test method.
-
- ACE_TRY
- {
- CORBA::Any_var data;
-
- // Retrieve the data stored in the RSC. This data (a string)
- // should be different from the original data (a CORBA::Long)
- // stored into the RSC by the receive_request_service_contexts()
- // interception point.
- data = ri->get_slot (this->slot_id_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The original data in the RSC was of type CORBA::Long. If the
- // following extraction from the CORBA::Any fails, then the
- // original data in the RSC was not replaced with the data in
- // the TSC after the test method completed.
- const char *str = 0;
- if (data.in () >>= str)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Retrieved \"%s\" from the RSC.\n",
- str));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Unable to extract data (a string) "
- "from the RSC.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- // Now verify that the RSC is truly independent of the TSC. In
- // particular, modifying the TSC at this point should not cause
- // the RSC to be modified.
- CORBA::Any new_data;
- CORBA::Long number = 19;
-
- new_data <<= number;
-
- // Now reset the contents of our slot in the thread-scope
- // current (TSC).
- this->pi_current_->set_slot (this->slot_id_,
- new_data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now retrieve the data from the RSC again. It should not have
- // changed!
- CORBA::Any_var data2 =
- ri->get_slot (this->slot_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *str2 = 0;
- if (!(data2.in () >>= str2)
- || ACE_OS::strcmp (str, str2) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: RSC was modified after "
- "TSC was modified.\n"));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "send_reply()\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) Server side RSC/TSC semantics appear "
- "to be correct.\n"));
-}
-
-void
-ServerRequestInterceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-ServerRequestInterceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h
deleted file mode 100644
index b9cd7bf2c5d..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h
+++ /dev/null
@@ -1,113 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file ServerRequestInterceptor.h
- *
- * $Id$
- *
- * Implementation header for the server request interceptor for the
- * PortableInterceptor::Current test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_REQUEST_INTERCEPTOR_H
-#define SERVER_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class ServerRequestInterceptor
- *
- * @brief Simple concrete server request interceptor.
- *
- * This server request interceptor
- */
-class ServerRequestInterceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- ServerRequestInterceptor (PortableInterceptor::SlotId id,
- PortableInterceptor::Current_ptr pi_current);
-
- /**
- * @name Methods Required by the Server Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all server request interceptors.
- */
- //@{
- /// Return the name of this ServerRequestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- /// The PICurrent slot ID allocated to this application during ORB
- /// initialization.
- PortableInterceptor::SlotId slot_id_;
-
- /// Reference to the PICurrent object.
- PortableInterceptor::Current_var pi_current_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp b/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
deleted file mode 100644
index 4d98648a2ac..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "testC.h"
-#include "ClientORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "tao/PI/PI.h"
-
-ACE_RCSID (PICurrent,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-k IOR "
- "\n",
- argv[0]),
- -1);
- }
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- ClientORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- "client_orb"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Get the PICurrent object.
- CORBA::Object_var obj =
- orb->resolve_initial_references ("PICurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (pi_current.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) ERROR: Could not resolve "
- "PICurrent object.\n"),
- -1);
- }
-
- // Insert some data into the allocated PICurrent slot.
- CORBA::Any data;
- CORBA::Long number = 46;
-
- data <<= number;
-
- // Now reset the contents of our slot in the thread-scope
- // current (TSC).
- pi_current->set_slot (::slot_id,
- data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Resolve the target object, and perform the invocation.
- obj =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PICurrentTest::test_var server =
- PICurrentTest::test::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil.\n",
- ior),
- 1);
- }
-
- server->invoke_me (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var new_data =
- pi_current->get_slot (::slot_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The original data in the TSC was of type CORBA::Long. If the
- // following extraction from the CORBA::Any fails, then the
- // original data in the TSC was not replaced within the client
- // request interceptor, as this test should do.
- const char *str = 0;
- if (new_data.in () >>= str)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Retrieved \"%s\" from the TSC.\n",
- str));
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Unable to extract data (a string) "
- "from the TSC.\n"));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
-
- server->invoke_we (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "PICurrent test (client-side):");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/run_test.pl b/TAO/tests/Portable_Interceptors/PICurrent/run_test.pl
deleted file mode 100755
index 8c021fc59c4..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-# $Id$
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-k file://$file");
-
-print STDERR "\n\n==== Running PICurrent test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/server.cpp b/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
deleted file mode 100644
index 3e0b650480f..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "test_i.h"
-#include "ServerORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "tao/PI/PI.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (PICurrent,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-extern PortableInterceptor::SlotId slot_id;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-o <iorfile>"
- "\n",
- argv[0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- ServerORBInitializer,
- -1); // No CORBA exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- "test_orb"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to obtain RootPOA reference.\n"),
- -1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- obj = orb->resolve_initial_references ("PICurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableInterceptor::Current_var pi_current =
- PortableInterceptor::Current::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (pi_current.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to obtain PICurrent reference.\n"),
- -1);
-
- test_i server_impl (pi_current.in (),
- ::slot_id,
- orb.in ());
-
- obj = server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PICurrentTest::test_var server =
- PICurrentTest::test::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to obtain reference to "
- "PICurrentTest::test object.\n"),
- -1);
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO, "PICurrentTest::test: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the IOR to it.
- if (ior_output_file != 0)
- {
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing "
- "IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO, "Event loop finished.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "PICurrent test (server-side):");
-
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/test.idl b/TAO/tests/Portable_Interceptors/PICurrent/test.idl
deleted file mode 100644
index a0f4dacae13..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/test.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * Simple IDL file to test PortableInterceptor::Current
- * support.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-module PICurrentTest
-{
-
- interface test
- {
- void invoke_me ();
-
- void invoke_you ();
-
- void invoke_we ();
-
- oneway void shutdown ();
- };
-
-};
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp b/TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp
deleted file mode 100644
index 453c16429aa..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-// -*- C++ -*-
-
-#include "test_i.h"
-
-ACE_RCSID (PICurrent,
- test_i,
- "$Id$")
-
-test_i::test_i (PortableInterceptor::Current_ptr current,
- PortableInterceptor::SlotId id,
- CORBA::ORB_ptr orb)
- : current_ (PortableInterceptor::Current::_duplicate (current)),
- slot_id_ (id),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-test_i::~test_i (void)
-{
-}
-
-void
-test_i::invoke_me (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Test method invoked.\n"));
-
- // @note "TSC" is "thread scope current"
- // "RSC" is "request scope current"
-
- // ----------------------------------------------------
-
- // Verify that the following RSC->TSC->RSC copying scenario works:
- //
- // 1. ServerRequestInterceptor::receive_request_service_contexts()
- // a. ServerRequestInfo::set_slot()
- // b. RSC->TSC shallow copy
- // 2. servant implementation invokes method on another server
- // a. TSC->RSC shallow copy
- // b. ClientRequestInterceptor::send_request()
- // i. ClientRequestInfo::get_slot()
-
- // By this point all of step 1 has occurred. Step 2 will now
- // occur.
- PICurrentTest::test_var my_ref =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // ----------------------------------------------------
-
- CORBA::Any_var retrieved_any;
-
- ACE_TRY
- {
- // Retrieve data placed into RSC PICurrent by the
- // receive_request_service_contexts() interception point, and
- // then copied into the TSC current.
- retrieved_any =
- this->current_->get_slot (this->slot_id_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "test_i::invoke_me() when calling "
- "Current::get_slot\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception\n");
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- CORBA::Long retrieved;
- if (retrieved_any.in() >>= retrieved)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Retrieved number <%d> from TSC.\n",
- retrieved));
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Problem extracting data from "
- "CORBA::Any retrieved from TSC.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
- // ----------------------------------------------------
-
- // Note that the invocation must occur through the object
- // reference to force the client request interceptor
- // (ClientRequestInterceptor2) to be invoked. This assumes that
- // DIRECT collocation (and possibly THRU_POA collocation) is
- // disabled.
- my_ref->invoke_you (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // ----------------------------------------------------
-
- // Insert some data into the TSC PICurrent object.
- const char str[] = "Drink milk!";
-
- CORBA::Any data;
-
- data <<= str;
-
- ACE_TRY_EX (foo)
- {
- this->current_->set_slot (this->slot_id_,
- data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (foo);
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "test_i::invoke_me() when calling "
- "Current::set_slot\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW_EX (CORBA::INTERNAL (), foo);
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) String \"%s\" inserted into TSC.\n",
- str));
-}
-
-void
-test_i::invoke_you (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Nothing to be tested here. This method is here just so that we
- // have a different method
-}
-
-void
-test_i::invoke_we (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Insert some data into the TSC PICurrent object.
- const char str[] = "We drink milk!";
-
- CORBA::Any data;
-
- data <<= str;
-
- ACE_TRY_EX (foo)
- {
- this->current_->set_slot (this->slot_id_,
- data
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (foo);
- }
- ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
- {
- ACE_PRINT_EXCEPTION (ex,
- "Exception thrown in "
- "test_i::invoke_me() when calling "
- "Current::set_slot\n");
-
- ACE_DEBUG ((LM_DEBUG,
- "Invalid slot: %u\n",
- this->slot_id_));
-
- ACE_TRY_THROW_EX (CORBA::INTERNAL (), foo);
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) String \"%s\" inserted into TSC.\n",
- str));
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Server is shutting down.\n"));
-
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/test_i.h b/TAO/tests/Portable_Interceptors/PICurrent/test_i.h
deleted file mode 100644
index c9de94d10a0..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/test_i.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * Implementation header for the "test" IDL interface for the
- * PortableInterceptor::Current test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TEST_I_H
-#define TEST_I_H
-
-#include "testS.h"
-
-#include "tao/PortableInterceptorC.h"
-#include "tao/PI/PI.h"
-
-/**
- * @class test_i
- *
- * @brief Simple test class.
- *
- * This class implements the "test" interface used in this test.
- */
-class test_i : public virtual POA_PICurrentTest::test
-{
-public:
-
- /// Constructor.
- test_i (PortableInterceptor::Current_ptr current,
- PortableInterceptor::SlotId id,
- CORBA::ORB_ptr orb);
-
- /// Destructor.
- ~test_i (void);
-
- /// Main servant test method.
- virtual void invoke_me (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// No-op method used so that a client request interceptor will be
- /// invoked when invoking this method from the above invoke_me()
- /// method. Say that 10 times fast. :-)
- virtual void invoke_you (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Test just a set slot
- virtual void invoke_we (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Shutdown the ORB.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// Reference to the PICurrent object.
- PortableInterceptor::Current_var current_;
-
- /// SlotId in the PICurrent object assigned to this test.
- PortableInterceptor::SlotId slot_id_;
-
- /// Pseudo-reference to the ORB.
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/.cvsignore b/TAO/tests/Portable_Interceptors/PolicyFactory/.cvsignore
deleted file mode 100644
index 254defddb53..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-server
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp
deleted file mode 100644
index 5c9cae1b492..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include "IORInterceptor.h"
-#include "testC.h"
-
-
-ACE_RCSID (PolicyFactory,
- IORInterceptor,
- "$Id$")
-
-
-IORInterceptor::IORInterceptor (void)
- : success_ (false)
-{
-}
-
-IORInterceptor::~IORInterceptor (void)
-{
- ACE_ASSERT (this->success_);
-}
-
-char *
-IORInterceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("");
-}
-
-void
-IORInterceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_ASSERT (this->success_);
-}
-
-void
-IORInterceptor::establish_components (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_TRY
- {
- PortableInterceptor::ObjectReferenceTemplate_var t =
- info->adapter_template (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableInterceptor::AdapterName_var a =
- t->adapter_name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Only execute if POA is not RootPOA. The RootPOA will not
- // have our custom policy, but the child POA we created will.
- if (a->length () > 1)
- {
- CORBA::Policy_var policy (
- info->get_effective_policy (Test::POLICY_TYPE
- ACE_ENV_ARG_PARAMETER));
- ACE_TRY_CHECK;
-
- Test::Policy_var test_policy (Test::Policy::_narrow (
- policy.in ()
- ACE_ENV_ARG_PARAMETER));
- ACE_TRY_CHECK;
-
- this->success_ = true;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "EXCEPTION: "
- "IORInterceptor::establish_components:");
-
- ACE_ASSERT (false);
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h b/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h
deleted file mode 100644
index c2ab7cf6602..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/IORInterceptor.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file IORInterceptor.h
- *
- * $Id$
- *
- * Implementation header for the IOR test interceptor.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef IOR_INTERCEPTOR_H
-#define IOR_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/IORInterceptor/IORInterceptor.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class IORInterceptor
- *
- * @brief Simple concrete IOR interceptor.
- *
- * This is a test IOR interceptor that embeds a tagged component in an
- * IOR. That tagged component will then be verified on the client
- * side to ensure that IOR interceptor support is functioning
- * properly.
- */
-class IORInterceptor
- : public virtual PortableInterceptor::IORInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor
- IORInterceptor (void);
-
- /**
- * @name Methods Required by the IOR Interceptor Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all IOR interceptors.
- */
- //@{
- /// Return the name of this IORInterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Cleanup resources acquired by this IORInterceptor.
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Add the tagged components to the IOR.
- virtual void establish_components (
- PortableInterceptor::IORInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-protected:
-
- /// Destructor.
- /**
- * Protected destructor to enforce proper memory management through
- * the reference counting mechanism.
- */
- ~IORInterceptor (void);
-
-private:
-
- /// IORInterceptor successfully called and executed.
- bool success_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* IOR_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/PI_PolicyFactory.mpc b/TAO/tests/Portable_Interceptors/PolicyFactory/PI_PolicyFactory.mpc
deleted file mode 100644
index c625755ff58..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/PI_PolicyFactory.mpc
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- MPC -*-
-//
-// $Id$
-
-project(*Server): taoserver, iorinterceptor, interceptors {
- Source_Files {
- testC.cpp
- Policy.cpp
- PolicyFactory.cpp
- Server_ORBInitializer.cpp
- IORInterceptor.cpp
- server.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/Policy.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/Policy.cpp
deleted file mode 100644
index 5c9266495e9..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/Policy.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-
-#include "Policy.h"
-
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (PolicyFactory,
- Policy,
- "$Id$")
-
-
-Policy::Policy (CORBA::ULong val)
- : value_ (val)
-{
-}
-
-Policy::~Policy (void)
-{
-}
-
-CORBA::ULong
-Policy::value (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->value_;
-}
-
-CORBA::PolicyType
-Policy::policy_type (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return Test::POLICY_TYPE;
-}
-
-CORBA::Policy_ptr
-Policy::copy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Policy_ptr p;
- ACE_NEW_THROW_EX (p,
- Policy (this->value_),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (CORBA::Policy::_nil ());
-
- return p;
-}
-
-void
-Policy::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/Policy.h b/TAO/tests/Portable_Interceptors/PolicyFactory/Policy.h
deleted file mode 100644
index 834e8918745..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/Policy.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Policy.h
- *
- * $Id$
- *
- * Implementation header for the test Policy.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef POLICY_H
-#define POLICY_H
-
-#include "testC.h"
-#include "tao/LocalObject.h"
-
-/**
- * @class Policy
- *
- * @brief Implementation of the Test::Policy interface.
- *
- * This policy merely returns the value that was passed to it when it
- * was constructed.
- */
-class Policy
- : public virtual Test::Policy,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- Policy (CORBA::ULong val);
-
- /// Test method defined in test IDL.
- virtual CORBA::ULong value (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
-
- /// Destructor.
- /**
- * Protected destructor to enforce proper memory management through
- * the reference counting mechanism.
- */
- ~Policy (void);
-
-private:
-
- /// Pseudo-reference to the ORB.
- const CORBA::ULong value_;
-
-};
-
-#endif /* POLICY_H */
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp
deleted file mode 100644
index 495bc24a325..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id$
-
-#include "PolicyFactory.h"
-#include "Policy.h"
-
-ACE_RCSID (PolicyFactory,
- PolicyFactory,
- "$Id$")
-
-
-CORBA::Policy_ptr
-PolicyFactory::create_policy (CORBA::PolicyType type,
- const CORBA::Any & value
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- CORBA::PolicyError))
-{
- // Sanity check since this condition should be caught earlier by the
- // TAO_PolicyFactory_Registry.
- if (type != Test::POLICY_TYPE)
- ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE),
- CORBA::Policy::_nil ());
-
- CORBA::ULong val;
- if (!(value >>= val))
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- CORBA::Policy::_nil ());
-
- Policy * p = 0;
- ACE_NEW_THROW_EX (p,
- Policy (val),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (CORBA::Policy::_nil ());
-
- return p;
-}
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.h b/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.h
deleted file mode 100644
index 62baa04f807..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file PolicyFactory.h
- *
- * $Id$
- *
- * Implementation header for the test policy factory.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef POLICY_FACTORY_H
-#define POLICY_FACTORY_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class PolicyFactory
- *
- * @brief Simple concrete PolicyFactory.
- *
- * This is a test PolicyFactory that constructs a Test::Policy
- * object.
- */
-class PolicyFactory
- : public virtual PortableInterceptor::PolicyFactory,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the PolicyFactory Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all PolicyFactory sub-classes.
- */
- //@{
-
- /// Construct a Test::Policy object as a test.
- virtual CORBA::Policy_ptr create_policy (CORBA::PolicyType type,
- const CORBA::Any & value
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- CORBA::PolicyError));
-
- //@}
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* POLICY_FACTORY_H */
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/README b/TAO/tests/Portable_Interceptors/PolicyFactory/README
deleted file mode 100644
index b9ba6219524..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/README
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id$
-
-This test verifies that PolicyFactory support is working properly.
-Working PolicyFactory support requires the following on the server side:
-
-1) Ability to register a PolicyFactory through the
- ORBInitInfo::register_policy_factory() method.
-2) Ability to create a policy through that PolicyFactory.
-3) Ability to create a POA containing that policy, even if the policy
- is not meant to be used by the POA.
-4) Retrieve the created policy from the POA's policy list via the
- IORInfo::get_effective_policy() method.
-
-The client side only requires a subset of this list, i.e. items (1)
-and (2), for working PolicyFactory support, so testing the server side
-is enough.
-
-Run the test as follows:
-
- $ perl run_test.pl
-
-Output should be very similar to the following:
-
-==== Running PolicyFactory test
-
-PolicyFactory test succeeded.
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.cpp
deleted file mode 100644
index e6369e699fa..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-
-#include "Server_ORBInitializer.h"
-#include "IORInterceptor.h"
-#include "PolicyFactory.h"
-#include "testC.h"
-
-#include "tao/ORB_Constants.h"
-
-#include "ace/OS_NS_string.h"
-
-
-ACE_RCSID (PolicyFactory,
- Server_ORBInitializer,
- "$Id$")
-
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr /* info */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableInterceptor::PolicyFactory_ptr p;
- ACE_NEW_THROW_EX (p,
- PolicyFactory,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::PolicyFactory_var policy_factory (p);
-
- info->register_policy_factory (Test::POLICY_TYPE,
- policy_factory.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::IORInterceptor_ptr i;
- ACE_NEW_THROW_EX (i,
- IORInterceptor,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::IORInterceptor_var ior_interceptor (i);
-
- info->add_ior_interceptor (ior_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.h
deleted file mode 100644
index 89be36a2898..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/Server_ORBInitializer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Server_ORBInitializer.h
- *
- * $Id$
- *
- * Implementation header for the IOR test interceptor ORB
- * initializer.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_ORB_INITIALIZER_H
-#define SERVER_ORB_INITIALIZER_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class Server_ORBInitializer
- *
- * @brief Simple concrete ORB initializer.
- *
- * This is a test ORB initializer that registers a PolicyFactory and
- * IORInterceptor for this test.
- */
-class Server_ORBInitializer
- : public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the ORBInitializer Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all ORB initializers.
- */
- //@{
- /// The pre-initialization hook.
- virtual void pre_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// The post-initialization hook.
- virtual void post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl b/TAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl
deleted file mode 100755
index 58fa821c094..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/run_test.pl
+++ /dev/null
@@ -1,32 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-#
-# $Id$
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-print STDERR "\n\n==== Running PolicyFactory test\n";
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp
deleted file mode 100644
index 1a52aa6b982..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/server.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// -*- C++ -*-
-
-#include "Server_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "testC.h"
-
-#include "tao/PortableServer/PortableServer.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (PolicyFactory,
- server,
- "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer,
- -1); // No CORBA exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- "test_orb"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create the test policy.
-
- const CORBA::ULong val = 40442;
- CORBA::Any any;
- any <<= val;
-
- CORBA::Policy_var p (orb->create_policy (Test::POLICY_TYPE,
- any
- ACE_ENV_ARG_PARAMETER));
- ACE_TRY_CHECK;
-
- const CORBA::PolicyType ptype =
- p->policy_type (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Sanity check.
- if (ptype != Test::POLICY_TYPE)
- ACE_TRY_THROW (CORBA::INTERNAL ());
-
- Test::Policy_var policy (Test::Policy::_narrow (p.in ()
- ACE_ENV_ARG_PARAMETER));
- ACE_TRY_CHECK;
-
- const CORBA::ULong pval = policy->value (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Sanity check.
- if (val != pval)
- ACE_TRY_THROW (CORBA::INTERNAL ());
-
- CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to obtain RootPOA reference.\n"),
- -1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies (1);
- policies.length (1);
-
- policies[0] = policy->copy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("Test POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_INFO,
- "\n"
- "PolicyFactory test succeeded.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "PolicyFactory test:");
-
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/test.idl b/TAO/tests/Portable_Interceptors/PolicyFactory/test.idl
deleted file mode 100644
index 0f82a951fc0..00000000000
--- a/TAO/tests/Portable_Interceptors/PolicyFactory/test.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * "test" IDL interface for the PolicyFactory test.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-
-#include "tao/Policy.pidl"
-
-module Test
-{
-
- // Hopefully this test policy type number doesn't conflict with any
- // other reserved PolicyTypes.
- const CORBA::PolicyType POLICY_TYPE = 3456;
-
- local interface Policy : CORBA::Policy
- {
- /// Returns value passed to PolicyFactory.
- readonly attribute unsigned long value;
- };
-
-};
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp
deleted file mode 100644
index fca62b6fe50..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "testC.h"
-#include "interceptors.h"
-
-ACE_RCSID(Muxing, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var object =
- corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- this->input_),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-
-void
-Client_Task::run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long one = 1, two = 1;
- (void) server->calculate (one,
- two
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- (void) server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h
deleted file mode 100644
index 49074e04e89..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Client_Task.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef COLLOCATED_TEST_CLIENT_TASK_H
-#define COLLOCATED_TEST_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-#include "testS.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 char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- void run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp
deleted file mode 100644
index 41d8c39fec7..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-//$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"
-#include "Echo_Collocated_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "interceptors.h"
-
-const char *output = "test.ior";
-const char *input = "file://test.ior";
-
-ACE_CString server_proc_mode_str;
-ACE_CString client_proc_mode_str;
-ACE_CString server_orb;
-ACE_CString client_orb;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "s:c:k:o");
- int c;
-
- server_proc_mode_str.set ("LOCAL_AND_REMOTE");
- client_proc_mode_str.set ("LOCAL_AND_REMOTE");
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 's':
- server_proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'c':
- client_proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'o':
- output = get_opts.opt_arg ();
- break;
- case 'k':
- input = get_opts.opt_arg ();
- break;
- case '?':
- default:
- return 0;
- }
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- server_orb.set ("server_orb");
- client_orb.set ("client_orb");
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- // Set up our default expectations.
- CORBA::ULong expected_server_interceptor_check = 10;
- CORBA::ULong expected_client_interceptor_check = 10;
-
- PortableInterceptor::ProcessingMode client_proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (client_proc_mode_str == "LOCAL_ONLY")
- {
- client_proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for client-side ProcessingMode.\n"));
- }
- else if (client_proc_mode_str == "REMOTE_ONLY")
- {
- client_proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for client-side ProcessingMode.\n"));
-
- // Since all of the calls are collocated, setting the client-side
- // ProcessingMode to REMOTE_ONLY will cause the client request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // client interceptor.
- expected_client_interceptor_check = 0;
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for client-side ProcessingMode.\n"));
- }
-
- PortableInterceptor::ProcessingMode server_proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (server_proc_mode_str == "LOCAL_ONLY")
- {
- server_proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for server-side ProcessingMode.\n"));
- }
- else if (server_proc_mode_str == "REMOTE_ONLY")
- {
- server_proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for server-side ProcessingMode.\n"));
-
- // Since all of the calls are collocated, setting the server-side
- // ProcessingMode to REMOTE_ONLY will cause the server request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // server interceptor.
- expected_server_interceptor_check = 0;
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for server-side ProcessingMode.\n"));
- }
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Collocated_ORBInitializer (server_proc_mode,
- client_proc_mode),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- sorb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- bool failed_check = false;
-
- CORBA::ULong number_called =
- Echo_Server_Request_Interceptor::server_interceptor_check_;
-
- if (number_called != expected_server_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Server-Side Interceptors not "
- "called properly, called %d times, expected %d.\n",
- number_called, expected_server_interceptor_check));
- failed_check = true;
- }
-
- number_called =
- Echo_Client_Request_Interceptor::client_interceptor_check_;
-
- if (number_called != expected_client_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR:Client-Side Interceptors not called "
- "properly, called %d times, expected %d.\n",
- number_called, expected_client_interceptor_check));
- failed_check = true;
- }
-
- if (failed_check)
- {
- return 1;
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Some exception was caught in main().\n"));
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp
deleted file mode 100644
index b9773fde351..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Collocated_ORBInitializer.h"
-#include "interceptors.h"
-#include "tao/PI/ORBInitInfo.h"
-#include "tao/ORB_Core.h"
-#include "ace/OS_NS_string.h"
-
-Echo_Collocated_ORBInitializer::Echo_Collocated_ORBInitializer (
- PortableInterceptor::ProcessingMode server_proc_mode,
- PortableInterceptor::ProcessingMode client_proc_mode)
- : server_processing_mode_(server_proc_mode),
- client_processing_mode_(client_proc_mode)
-{
-}
-
-void
-Echo_Collocated_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Collocated_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // TAO-Specific way to get to the ORB Core (and thus, the ORB).
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB::_duplicate(tao_info->orb_core()->orb());
-
- if (CORBA::is_nil(orb.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ORBInitInfo_3_1_var info_3_1 =
- PortableInterceptor::ORBInitInfo_3_1::_narrow(info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(info_3_1.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- if (!ACE_OS::strcmp (orb_id.in (), "client_orb"))
- {
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- CORBA::Any client_proc_mode_as_any;
- client_proc_mode_as_any <<= this->client_processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- client_proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_client_request_interceptor_with_policy (
- client_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
- }
- else if (!ACE_OS::strcmp (orb_id.in (), "server_orb"))
- {
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- CORBA::Any server_proc_mode_as_any;
- server_proc_mode_as_any <<= this->server_processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- server_proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_server_request_interceptor_with_policy (
- server_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
- }
- else
- {
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h
deleted file mode 100644
index 57d361b7b9a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Echo_Collocated_ORBInitializer.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-#define TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/orbconf.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PI/ProcessingModePolicyC.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Collocated_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- Echo_Collocated_ORBInitializer
- (PortableInterceptor::ProcessingMode server_proc_mode,
- PortableInterceptor::ProcessingMode client_proc_mode);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- PortableInterceptor::ProcessingMode server_processing_mode_;
- PortableInterceptor::ProcessingMode client_processing_mode_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc
deleted file mode 100644
index 0e1f9788ad5..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/PI_ProcMode_Collocated.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Collocated): taoserver, pi, pi_server, interceptors {
- exename = PI_ProcMode_Collocated_Test
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- interceptors.cpp
- Echo_Collocated_ORBInitializer.cpp
- Collocated_Test.cpp
- Client_Task.cpp
- Server_Task.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp
deleted file mode 100644
index a9db6a71b8a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "test_i.h"
-#include "interceptors.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Collocated_Test,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var poa_object =
- sorb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Visual_i * server_impl = 0;
- ACE_NEW_RETURN (server_impl, Visual_i (sorb_.in ()), 1);
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test_Interceptors::Visual: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (output_ != 0)
- {
- 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);
- }
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h
deleted file mode 100644
index 2f63a0724de..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Server_Task.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- 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 char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- /// Output file for IOR
- const char *output_;
-
- /// Manual event to wake up the main thread to create a client
- /// thread.
- ACE_Manual_Event &me_;
-
- CORBA::ORB_var sorb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp
deleted file mode 100644
index 2082c0d81c9..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-// $Id$
-
-#include "interceptors.h"
-#include "tao/PI/ClientRequestInfoC.h"
-#include "tao/PI_Server/ServerRequestInfoC.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Dynamic,
- interceptors,
- "$Id$")
-
-const char *request_msg = "The Echo_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Request_Interceptor reply message";
-CORBA::ULong Echo_Client_Request_Interceptor::client_interceptor_check_ = 0;
-CORBA::ULong Echo_Server_Request_Interceptor::server_interceptor_check_ = 0;
-
-Echo_Client_Request_Interceptor::Echo_Client_Request_Interceptor (void)
- : myname_ ("Echo_Client_Interceptor")
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::String_var op =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request from "
- "\"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_other "
- "from \"%s\"\n",
- op.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_reply "
- "from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- }
- else if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- client_interceptor_check_++;
- }
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::received_exception "
- "from \"%s\"\n",
- op.in ()));
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id.in ()));
-}
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- ++server_interceptor_check_;
- }
-
- PortableInterceptor::ObjectId_var test_oid =
- ri->object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::receive_request from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
-
- }
-
- CORBA::String_var tmdi =
- ri->target_most_derived_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Target most derived interface: %s\n",
- tmdi.in ()));
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- ++server_interceptor_check_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_reply from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-
- if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result = 0;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Do not count the _is_a calls
- if (ACE_OS::strcmp (op.in (), "_is_a") != 0)
- {
- ++server_interceptor_check_;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_exception "
- "from \"%s\"\n",
- op.in ()));
-
-
- CORBA::Any_var any =
- ri->sending_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var type = any->type ();
-
- const char *exception_id = type->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id));
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h
deleted file mode 100644
index c136eb18144..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/interceptors.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_INTERCEPTORS_H
-#define TAO_INTERCEPTORS_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
-
- Echo_Client_Request_Interceptor (void);
- // ctor.
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong client_interceptor_check_;
-private:
- const char *myname_;
-};
-
-class Echo_Server_Request_Interceptor
- : public PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong server_interceptor_check_;
-
-private:
- const char *myname_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_INTERCEPTORS_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl
deleted file mode 100755
index e877773b96e..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/run_test.pl
+++ /dev/null
@@ -1,134 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-sub get_test_modes
-{
- my $testid = shift;
-
- my $client_mode = "LOCAL_AND_REMOTE";
- my $server_mode = "LOCAL_AND_REMOTE";
-
- # There are Nine Permutations.
- if ($testid == 1)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 2)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 3)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 4)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 5)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 6)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 7)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 8)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 9)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- else
- {
- print STDERR "ERROR: invalid testid: $testid\n";
- exit 1;
- }
-
- return ($client_mode, $server_mode);
-}
-
-my $status = 0;
-my $file = PerlACE::LocalFile ("test.ior");
-
-my $testid;
-
-for ($testid = 1; $testid <= 9; ++$testid)
-{
- unlink $file;
-
- my $client_mode;
- my $server_mode;
-
- ($client_mode, $server_mode) = get_test_modes($testid);
-
- my $SV;
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("PI_ProcMode_Collocated_Test",
- "-c $client_mode " .
- "-s $server_mode " .
- "-ORBobjrefstyle url");
- }
- else {
- $SV = new PerlACE::Process ("PI_ProcMode_Collocated_Test",
- "-c $client_mode " .
- "-s $server_mode " .
- "-ORBobjrefstyle url");
- }
-
- print STDERR "\n\n==== Starting test variant #$testid\n\n";
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
- }
-
- my $collocated = $SV->WaitKill (5);
-
- if ($collocated != 0) {
- print STDERR "ERROR: PI_ProcMode_Collocated_Test returned $collocated\n";
- print STDERR "ERROR: For client-side mode [$client_mode],\n";
- print STDERR "ERROR: and server-side mode [$server_mode].\n";
- $status = 1;
- print STDERR "\nTest variant #$testid of 9 failed!\n\n";
- }
- else {
- print STDERR "\nTest variant #$testid of 9 passed!\n\n";
- }
-}
-
-unlink $file;
-
-if ($status == 0) {
- print STDERR "\n==== All 9 test variants were successful!\n";
-}
-else {
- print STDERR "\n==== One or more of the 9 test variants failed!\n";
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl
deleted file mode 100644
index 07ed4dee088..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- void normal (in long arg);
- // Normal operation.
-
- long calculate (in long one, in long two);
- // Normal operation with a return val.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp
deleted file mode 100644
index 31585a94528..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Dynamic, test_i, "$Id$")
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
- // ctor
-
-void
-Visual_i::normal (CORBA::Long
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-CORBA::Long
-Visual_i::calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
- return (one + two);
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwning Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // 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 ();
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h
deleted file mode 100644
index f31756fb10a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/test_i.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors/Dynamic
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Nanbor Wang
-//
-// ============================================================================
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-class Visual_i : public POA_Test_Interceptors::Visual
-{
- // = DESCRIPTION
- // Implements the Visual interface in test.idl
-
-public:
- Visual_i (CORBA::ORB_ptr orb);
- // ctor
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::Long calculate (
- CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB pointer (for shutdown.)
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp
deleted file mode 100644
index 0990fd47209..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-#include "testC.h"
-#include "client_interceptor.h"
-
-ACE_RCSID(Remote, Client_Task, "$Id$")
-
-Client_Task::Client_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var object =
- corb_->string_to_object (input_ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- this->input_),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-
-}
-
-
-void
-Client_Task::run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long one = 1, two = 1;
- (void) server->calculate (one,
- two
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_TRY
- {
- (void) server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "As expected, Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h
deleted file mode 100644
index 3678e806775..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Client_Task.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef TEST_CLIENT_TASK_H
-#define TEST_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-#include "ace/Task.h"
-#include "testS.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 char *input,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- void run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- const char *input_;
-
- CORBA::ORB_var corb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp
deleted file mode 100644
index 15751d6f087..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Client_ORBInitializer.h"
-#include "client_interceptor.h"
-#include "tao/PI/ORBInitInfo.h"
-#include "tao/ORB_Core.h"
-#include "ace/OS_NS_string.h"
-
-Echo_Client_ORBInitializer::Echo_Client_ORBInitializer (
- PortableInterceptor::ProcessingMode proc_mode)
- : processing_mode_(proc_mode)
-{
-}
-
-void
-Echo_Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // TAO-Specific way to get to the ORB Core (and thus, the ORB).
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB::_duplicate(tao_info->orb_core()->orb());
-
- if (CORBA::is_nil(orb.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ORBInitInfo_3_1_var info_3_1 =
- PortableInterceptor::ORBInitInfo_3_1::_narrow(info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(info_3_1.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- CORBA::Any client_proc_mode_as_any;
- client_proc_mode_as_any <<= this->processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- client_proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_client_request_interceptor_with_policy (
- client_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h
deleted file mode 100644
index 58506555153..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Client_ORBInitializer.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-#define TAO_ECHO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/orbconf.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-#include "tao/PI/PI.h"
-#include "tao/PI/ProcessingModePolicyC.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- Echo_Client_ORBInitializer
- (PortableInterceptor::ProcessingMode proc_mode);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- PortableInterceptor::ProcessingMode processing_mode_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp
deleted file mode 100644
index 9136e25e126..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "Echo_Server_ORBInitializer.h"
-#include "server_interceptor.h"
-#include "tao/PI/ORBInitInfo.h"
-#include "tao/ORB_Core.h"
-#include "ace/OS_NS_string.h"
-
-Echo_Server_ORBInitializer::Echo_Server_ORBInitializer (
- PortableInterceptor::ProcessingMode proc_mode)
- : processing_mode_(proc_mode)
-{
-}
-
-void
-Echo_Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // TAO-Specific way to get to the ORB Core (and thus, the ORB).
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB::_duplicate(tao_info->orb_core()->orb());
-
- if (CORBA::is_nil(orb.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ORBInitInfo_3_1_var info_3_1 =
- PortableInterceptor::ORBInitInfo_3_1::_narrow(info
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(info_3_1.in()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- ACE_CHECK;
- }
-
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- CORBA::Any proc_mode_as_any;
- proc_mode_as_any <<= this->processing_mode_;
-
- CORBA::PolicyList policy_list (1);
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (PortableInterceptor::PROCESSING_MODE_POLICY_TYPE,
- proc_mode_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- info_3_1->add_server_request_interceptor_with_policy (
- server_interceptor.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h
deleted file mode 100644
index f3af07cc4ae..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Echo_Server_ORBInitializer.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_ECHO_SERVER_ORB_INITIALIZER_H
-#define TAO_ECHO_SERVER_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/orbconf.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PI/ProcessingModePolicyC.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Echo client ORB initializer.
-class Echo_Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- Echo_Server_ORBInitializer
- (PortableInterceptor::ProcessingMode proc_mode);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- PortableInterceptor::ProcessingMode processing_mode_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ECHO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc
deleted file mode 100644
index deab03af74f..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/PI_ProcMode_Remote.mpc
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*RemoteServer): taoserver, pi_server, interceptors {
- exename = PI_ProcMode_Remote_TestServer
- Source_Files {
- testC.cpp
- testS.cpp
- test_i.cpp
- server_interceptor.cpp
- Echo_Server_ORBInitializer.cpp
- server_main.cpp
- Server_Task.cpp
- }
-}
-
-project(*RemoteClient): taoclient, portableserver, pi, interceptors {
- exename = PI_ProcMode_Remote_TestClient
- Source_Files {
- testC.cpp
- client_interceptor.cpp
- Echo_Client_ORBInitializer.cpp
- client_main.cpp
- Client_Task.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp
deleted file mode 100644
index 7fbab820892..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// $Id$
-//
-#include "Server_Task.h"
-#include "test_i.h"
-#include "server_interceptor.h"
-
-#include "ace/Manual_Event.h"
-
-ACE_RCSID(Remote,
- Server_Task,
- "$Id$")
-
-
-Server_Task::Server_Task (const char *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)
-{
- ACE_TRY_NEW_ENV
- {
-
- CORBA::Object_var poa_object =
- sorb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Visual_i * server_impl = 0;
- ACE_NEW_RETURN (server_impl, Visual_i (sorb_.in ()), 1);
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- this->sorb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Test_Interceptors::Visual: <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (output_ != 0)
- {
- 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);
- }
-
- // Signal the main thread before we call orb->run ();
- this->me_.signal ();
-
- this->sorb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->sorb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server task:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h
deleted file mode 100644
index 6b7b9404bd5..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/Server_Task.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TEST_SERVER_TASK_H
-#define TEST_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 char *output,
- CORBA::ORB_ptr sorb,
- ACE_Manual_Event &me,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
- /// The status of the svc loop
- int status (void) const;
-
-private:
- /// Output file for IOR
- const char *output_;
-
- /// Manual event to wake up the main thread to create a client
- /// thread.
- ACE_Manual_Event &me_;
-
- CORBA::ORB_var sorb_;
-
- int status_;
-};
-
-#include /**/ "ace/post.h"
-
-#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp
deleted file mode 100644
index 399025fa883..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-// $Id$
-
-#include "client_interceptor.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Remote,
- client_interceptor,
- "$Id$")
-
-const char *request_msg = "The Echo_Client_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Client_Request_Interceptor reply message";
-CORBA::ULong Echo_Client_Request_Interceptor::client_interceptor_check_ = 0;
-
-Echo_Client_Request_Interceptor::Echo_Client_Request_Interceptor (void)
- : myname_ ("Echo_Client_Interceptor")
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::send_request from "
- "\"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_other "
- "from \"%s\"\n",
- op.in ()));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::receive_reply "
- "from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- }
- else if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- client_interceptor_check_++;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var exception_id =
- ri->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Client_Request_Interceptor::received_exception "
- "from \"%s\"\n",
- op.in ()));
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id.in ()));
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h
deleted file mode 100644
index fc49396097a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_interceptor.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
-
- Echo_Client_Request_Interceptor (void);
- // ctor.
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong client_interceptor_check_;
-private:
- const char *myname_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp
deleted file mode 100644
index 78a62bdf25e..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-//$Id$
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-#include "Echo_Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "client_interceptor.h"
-
-const char *input = "file://test.ior";
-
-ACE_CString proc_mode_str;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "p:k:");
- int c;
-
- proc_mode_str.set ("LOCAL_AND_REMOTE");
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 'p':
- proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'k':
- input = get_opts.opt_arg ();
- break;
- case '?':
- default:
- return 0;
- }
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- // Set up our default expectations.
- CORBA::ULong expected_interceptor_check = 12;
-
- PortableInterceptor::ProcessingMode proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (proc_mode_str == "LOCAL_ONLY")
- {
- proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for client-side ProcessingMode.\n"));
-
- // Since all of the calls are remote, setting the client-side
- // ProcessingMode to LOCAL_ONLY will cause the client request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // client interceptor.
- expected_interceptor_check = 0;
- }
- else if (proc_mode_str == "REMOTE_ONLY")
- {
- proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for client-side ProcessingMode.\n"));
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for client-side ProcessingMode.\n"));
- }
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Client_ORBInitializer (proc_mode),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Argv_Type_Converter atc (argc, argv);
- CORBA::ORB_var orb =
- CORBA::ORB_init (atc.get_argc (),
- atc.get_TCHAR_argv (),
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client_Task client_task (input,
- orb.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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::ULong number_called =
- Echo_Client_Request_Interceptor::client_interceptor_check_;
-
- if (number_called != expected_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR:Client-Side Interceptors not called "
- "properly, called %d times, expected %d.\n",
- number_called, expected_interceptor_check));
- return 1;
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Some exception was caught in main().\n"));
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl
deleted file mode 100755
index b04af3c2968..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/run_test.pl
+++ /dev/null
@@ -1,154 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-sub get_test_modes
-{
- my $testid = shift;
-
- my $client_mode = "LOCAL_AND_REMOTE";
- my $server_mode = "LOCAL_AND_REMOTE";
-
- # There are Nine Permutations.
- if ($testid == 1)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 2)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 3)
- {
- $client_mode = "LOCAL_AND_REMOTE";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 4)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 5)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 6)
- {
- $client_mode = "LOCAL_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- elsif ($testid == 7)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_AND_REMOTE";
- }
- elsif ($testid == 8)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "LOCAL_ONLY";
- }
- elsif ($testid == 9)
- {
- $client_mode = "REMOTE_ONLY";
- $server_mode = "REMOTE_ONLY";
- }
- else
- {
- print STDERR "ERROR: invalid testid: $testid\n";
- exit 1;
- }
-
- return ($client_mode, $server_mode);
-}
-
-my $status = 0;
-my $file = PerlACE::LocalFile ("test.ior");
-
-my $testid;
-
-for ($testid = 1; $testid <= 9; ++$testid)
-{
- unlink $file;
-
- my $client_mode;
- my $server_mode;
-
- ($client_mode, $server_mode) = get_test_modes($testid);
-
- my $SV;
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("PI_ProcMode_Remote_TestServer",
- "-p $server_mode " .
- "-ORBobjrefstyle url");
- }
- else {
- $SV = new PerlACE::Process ("PI_ProcMode_Remote_TestServer",
- "-p $server_mode " .
- "-ORBobjrefstyle url");
- }
-
- print STDERR "\n\n==== Starting test variant #$testid\n\n";
-
- $server = $SV->Spawn ();
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
- }
-
- if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
- }
-
- my $CLIENT;
- $CLIENT = new PerlACE::Process ("PI_ProcMode_Remote_TestClient",
- "-p $client_mode " .
- "-ORBobjrefstyle url");
-
- my $client_status = $CLIENT->SpawnWaitKill (5);
-
- if ($client_status != 0) {
- print STDERR "ERROR: PI_ProcMode_TestClient returned $client_status\n";
- print STDERR "ERROR: For client-side mode [$client_mode],\n";
- print STDERR "ERROR: and server-side mode [$server_mode].\n";
- $status = 1;
- }
-
- my $server_status = $SV->WaitKill (5);
-
- if ($server_status != 0) {
- print STDERR "ERROR: PI_ProcMode_TestServer returned $server_status\n";
- print STDERR "ERROR: For client-side mode [$client_mode],\n";
- print STDERR "ERROR: and server-side mode [$server_mode].\n";
- $status = 1;
- }
-
- if (($server_status == 0) && ($client_status == 0)) {
- print STDERR "\n==== Test variant #$testid (of 9) passed!\n";
- }
- else {
- print STDERR "\n==== Test variant #$testid (of 9) failed!\n";
- }
-}
-
-unlink $file;
-
-if ($status == 0) {
- print STDERR "\n==== All 9 test variants were successful!\n";
-}
-else {
- print STDERR "\n==== One or more of the 9 test variants failed!\n";
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp
deleted file mode 100644
index a1928755bec..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-// $Id$
-
-#include "server_interceptor.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/DynamicC.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Remote,
- server_interceptor,
- "$Id$")
-
-const char *request_msg = "The Echo_Server_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Server_Request_Interceptor reply message";
-CORBA::ULong Echo_Server_Request_Interceptor::server_interceptor_check_ = 0;
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor ()
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ObjectId_var test_oid =
- ri->object_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::receive_request from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
-
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
-
- }
-
- CORBA::String_var tmdi =
- ri->target_most_derived_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Target most derived interface: %s\n",
- tmdi.in ()));
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_reply from \"%s\"\n",
- op.in ()));
-
- if (ACE_OS::strcmp (op.in (), "normal") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i].argument >>= param;
- ACE_DEBUG ((LM_DEBUG,
- "The arg is %d\n",
- param));
- }
-
- if (ACE_OS::strcmp (op.in (), "calculate") == 0)
- {
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Long param1, param2, result = 0;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- paramlist[i++].argument >>= param1;
- paramlist[i].argument >>= param2;
-
- CORBA::Any_var result_any = ri->result (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- (result_any.in ()) >>= result;
-
- ACE_DEBUG ((LM_DEBUG,
- "The result of calculate is %d + %d = %d\n",
- param1,
- param2,
- result));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- CORBA::String_var op = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Echo_Server_Request_Interceptor::send_exception "
- "from \"%s\"\n",
- op.in ()));
-
-
- CORBA::Any_var any =
- ri->sending_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::TypeCode_var type = any->type ();
-
- const char *exception_id = type->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Exception ID = %s\n",
- exception_id));
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ++server_interceptor_check_;
-
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h
deleted file mode 100644
index 1c6f50936a3..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_interceptor.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_SERVER_INTERCEPTOR_H
-#define TAO_SERVER_INTERCEPTOR_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Server_Request_Interceptor
- : public PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableInterceptor::ForwardRequest
- ));
-
- // Some identifiers that are used for error checking
- static CORBA::ULong server_interceptor_check_;
-
-private:
- const char *myname_;
-};
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_SERVER_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp
deleted file mode 100644
index 720d51ab9ad..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/server_main.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-//$Id$
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-#include "ace/Argv_Type_Converter.h"
-#include "ace/SString.h"
-#include "ace/Manual_Event.h"
-#include "Echo_Server_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "server_interceptor.h"
-
-const char *output = "test.ior";
-
-ACE_CString proc_mode_str;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "p:o:");
- int c;
-
- proc_mode_str.set ("LOCAL_AND_REMOTE");
-
- while ((c = get_opts ()) != -1)
- {
- switch (c)
- {
- case 'p':
- proc_mode_str.set (get_opts.opt_arg ());
- break;
- case 'o':
- output = get_opts.opt_arg ();
- break;
- case '?':
- default:
- return 0;
- }
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc,
- argv) == -1)
- return -1;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- // Set up our default expectations.
- CORBA::ULong expected_interceptor_check = 12;
-
- PortableInterceptor::ProcessingMode proc_mode =
- PortableInterceptor::LOCAL_AND_REMOTE;
-
- if (proc_mode_str == "LOCAL_ONLY")
- {
- proc_mode = PortableInterceptor::LOCAL_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_ONLY for server-side ProcessingMode.\n"));
-
- // Since all of the calls are remote, setting the server-side
- // ProcessingMode to LOCAL_ONLY will cause the server request
- // interceptor to not fire. Thus, we expect 0 calls on the
- // server interceptor.
- expected_interceptor_check = 0;
- }
- else if (proc_mode_str == "REMOTE_ONLY")
- {
- proc_mode = PortableInterceptor::REMOTE_ONLY;
- ACE_DEBUG((LM_DEBUG,
- "Using REMOTE_ONLY for server-side ProcessingMode.\n"));
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Using LOCAL_AND_REMOTE for server-side ProcessingMode.\n"));
- }
-
- ACE_NEW_RETURN (temp_initializer,
- Echo_Server_ORBInitializer (proc_mode),
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Argv_Type_Converter atc (argc, argv);
- CORBA::ORB_var orb =
- CORBA::ORB_init (atc.get_argc (),
- atc.get_TCHAR_argv (),
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Manual_Event me;
- Server_Task server_task (output,
- orb.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"));
- }
-
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::ULong number_called =
- Echo_Server_Request_Interceptor::server_interceptor_check_;
-
- if (number_called != expected_interceptor_check)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Server-Side Interceptors not "
- "called properly, called %d times, expected %d.\n",
- number_called, expected_interceptor_check));
- return 1;
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ERROR: Some exception was caught in main().\n"));
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl
deleted file mode 100644
index 07ed4dee088..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- void normal (in long arg);
- // Normal operation.
-
- long calculate (in long one, in long two);
- // Normal operation with a return val.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp
deleted file mode 100644
index bf5fe31c9f8..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID(Remote, test_i, "$Id$")
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
- // ctor
-
-void
-Visual_i::normal (CORBA::Long
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-CORBA::Long
-Visual_i::calculate (CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
- return (one + two);
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwning Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->orb_->shutdown ();
-}
diff --git a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h b/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h
deleted file mode 100644
index f31756fb10a..00000000000
--- a/TAO/tests/Portable_Interceptors/Processing_Mode_Policy/Remote/test_i.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Portable_Interceptors/Dynamic
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Nanbor Wang
-//
-// ============================================================================
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-class Visual_i : public POA_Test_Interceptors::Visual
-{
- // = DESCRIPTION
- // Implements the Visual interface in test.idl
-
-public:
- Visual_i (CORBA::ORB_ptr orb);
- // ctor
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::Long calculate (
- CORBA::Long one,
- CORBA::Long two
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB pointer (for shutdown.)
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.cpp
deleted file mode 100644
index 881b1f2987f..00000000000
--- a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (Recursive_ORBInitializer,
- Client_ORBInitializer,
- "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (Client_ORBInitializer *second) :
- pre_init_called (0),
- post_init_called (0),
- second_ (second)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++pre_init_called;
-
- if (second_ != 0)
- {
- PortableInterceptor::register_orb_initializer (second_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Registered the initializer, clear the pointer so that we only do it
- // once
- second_ = 0;
- }
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ++post_init_called;
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.h
deleted file mode 100644
index 15b78e94a6e..00000000000
--- a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Client_ORBInitializer.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (Client_ORBInitializer *second);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- int pre_init_called;
- int post_init_called;
-private:
- Client_ORBInitializer *second_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Register_ORBInitializer.mpc b/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Register_ORBInitializer.mpc
deleted file mode 100644
index 87022b449ba..00000000000
--- a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/Register_ORBInitializer.mpc
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Client): taoclient, pi, interceptors {
- Source_Files {
- Client_ORBInitializer.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp b/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp
deleted file mode 100644
index 9f716e09ada..00000000000
--- a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/client.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id$
-
-#include "Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID(Recursive_ORBInitializer,
- client,
- "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- Client_ORBInitializer* initializer1 = 0;
- Client_ORBInitializer* initializer2 = 0;
-
- ACE_NEW_RETURN (initializer2,
- Client_ORBInitializer (0),
- -1); // No exceptions yet!
-
- ACE_NEW_RETURN (initializer1,
- Client_ORBInitializer (initializer2),
- -1); // No exceptions yet!
-
- PortableInterceptor::ORBInitializer_var initializer_var1 =
- initializer1;
-
- PortableInterceptor::ORBInitializer_var initializer_var2 =
- initializer2;
-
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::register_orb_initializer (initializer_var1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb2 =
- CORBA::ORB_init (argc, argv, "SecondORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- // The first ORBInitializer should be called twice, the second only once
- ACE_ASSERT (initializer1->pre_init_called == 2);
- ACE_ASSERT (initializer2->pre_init_called == 1);
- ACE_ASSERT (initializer1->post_init_called == 2);
- ACE_ASSERT (initializer2->post_init_called == 1);
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/run_test.pl b/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/run_test.pl
deleted file mode 100755
index 9a9a9db0c85..00000000000
--- a/TAO/tests/Portable_Interceptors/Recursive_ORBInitializer/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("client");
-}
-else {
- $CL = new PerlACE::Process ("client");
-}
-print STDERR "\n==== Running Recursive ORBInitializer test ====\n";
-
-$client = $CL->SpawnWaitKill (5);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/Register_ORBInitializer.mpc b/TAO/tests/Portable_Interceptors/Register_Initial_References/Register_ORBInitializer.mpc
deleted file mode 100644
index 131b4b94e54..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/Register_ORBInitializer.mpc
+++ /dev/null
@@ -1,11 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi, interceptors {
- Source_Files {
- test_i.cpp
- Server_ORBInitializer.cpp
- server.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp
deleted file mode 100644
index ccbc8aefdca..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Server_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "test_i.h"
-
-ACE_RCSID (Recursive_ORBInitializer,
- Server_ORBInitializer,
- "$Id$")
-
-Server_ORBInitializer::Server_ORBInitializer (void)
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr orbinitinfo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- POA_TestModule::test* test = 0;
- ACE_NEW (test,
- test_i);
-
- CORBA::Object_ptr object = test->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- orbinitinfo->register_initial_reference ("MyService",
- object
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- bool invalid_name = false;
- ACE_TRY
- {
- // Registering with an empty string should give an exception
- orbinitinfo->register_initial_reference ("",
- object
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (PortableInterceptor::ORBInitInfo::InvalidName, ex)
- {
- invalid_name = true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!invalid_name)
- ACE_ERROR ((LM_ERROR, "ERROR: Registering with an empty string doesn't "
- "throw an exception\n"));
-
- bool duplicate_name = false;
- ACE_TRY_EX (duplicate)
- {
- // Registering with an duplicate string should give an exception
- orbinitinfo->register_initial_reference ("MyService",
- object
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (duplicate) ;
- }
- ACE_CATCH (PortableInterceptor::ORBInitInfo::InvalidName, ex)
- {
- duplicate_name = true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!duplicate_name)
- ACE_ERROR ((LM_ERROR, "ERROR: Registering with a duplicate with ORBInitInfo "
- "doesn't throw the expected exception\n"));
-
- bool invalid_object = false;
- ACE_TRY_EX (invalid)
- {
- // Registering with a nil object
- orbinitinfo->register_initial_reference ("NilServer",
- CORBA::Object::_nil()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (invalid);
- }
- ACE_CATCH (CORBA::BAD_PARAM , ex)
- {
- if ((ex.minor() & 0xFFFU) == 27)
- {
- invalid_object = true;
- }
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!invalid_object)
- ACE_ERROR ((LM_ERROR, "ERROR: Registering with a nil object to ORBInitInfo "
- "doesn't throw bad param with minor code 27\n"));
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.h
deleted file mode 100644
index 3b9e5407eaf..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-#include "testS.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Server ORB initializer.
-class Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Server_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl b/TAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl
deleted file mode 100755
index 30bc0d981cf..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-print STDERR "\n==== Running Register_Initial_References test ====\n";
-
-$server = $SV->SpawnWaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp b/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
deleted file mode 100644
index efac5ba2c36..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/server.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// $Id$
-
-#include "Server_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "test_i.h"
-
-ACE_RCSID(Recursive_ORBInitializer,
- server,
- "$Id$")
-
-
-int test_orb (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
-{
- int errors = 0;
-
- POA_TestModule::test* test = 0;
- ACE_NEW_RETURN (test,
- test_i, 1);
-
- CORBA::Object_ptr object = test->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
-
- orb->register_initial_reference ("ORBMyService",
- object
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (1);
-
- bool invalid_name = false;
- ACE_TRY
- {
- // Registering with an empty string should give an exception
- orb->register_initial_reference ("",
- object
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::ORB::InvalidName, ex)
- {
- invalid_name = true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!invalid_name)
- {
- errors++;
- ACE_ERROR ((LM_ERROR, "ERROR: Registering with an empty string with the ORB"
- "doesn't throw an exception\n"));
- }
-
- bool duplicate_name = false;
- ACE_TRY_EX (duplicate)
- {
- // Registering with an duplicate string should give an exception
- orb->register_initial_reference ("ORBMyService",
- object
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (duplicate);
- }
- ACE_CATCH (CORBA::ORB::InvalidName, ex)
- {
- duplicate_name = true;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!duplicate_name)
- {
- errors++;
- ACE_ERROR ((LM_ERROR, "ERROR: Registering with a duplicate with ORB "
- "doesn't throw the expected exception\n"));
- }
-
- bool invalid_object = false;
- ACE_TRY_EX (invalid)
- {
- // Registering with a nil object
- orb->register_initial_reference ("ORBNilServer",
- CORBA::Object::_nil()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (invalid);
- }
- ACE_CATCH (CORBA::BAD_PARAM , ex)
- {
- if ((ex.minor() & 0xFFFU) == 27)
- {
- invalid_object = true;
- }
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- if (!invalid_object)
- {
- errors++;
- ACE_ERROR ((LM_ERROR, "ERROR: Registering with a nil object to ORB "
- "doesn't throw bad param with minor code 27\n"));
- }
-
- return errors;
-}
-
-int
-main (int argc, char *argv[])
-{
- Server_ORBInitializer *initializer = 0;
- int retval = 0;
-
- ACE_NEW_RETURN (initializer,
- Server_ORBInitializer,
- -1); // No exceptions yet!
-
- PortableInterceptor::ORBInitializer_var initializer_var =
- initializer;
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- retval = test_orb (orb.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableInterceptor::register_orb_initializer (initializer_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var second_orb =
- CORBA::ORB_init (argc, argv, "SecondORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/test.idl b/TAO/tests/Portable_Interceptors/Register_Initial_References/test.idl
deleted file mode 100644
index 8643b6cca3e..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/test.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * Simple IDL file
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-//=============================================================================
-
-module TestModule
-{
-
- interface test
- {
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.cpp b/TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.cpp
deleted file mode 100644
index 9f1c4e44e7a..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- C++ -*-
-
-#include "test_i.h"
-
-ACE_RCSID (Register_Initial_References,
- test_i,
- "$Id$")
-
-test_i::test_i (void)
-{
-}
-
-test_i::~test_i (void)
-{
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.h b/TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.h
deleted file mode 100644
index 30cf9d9bf31..00000000000
--- a/TAO/tests/Portable_Interceptors/Register_Initial_References/test_i.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-//=============================================================================
-
-#ifndef TEST_I_H
-#define TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class test_i
- *
- * @brief Simple test class.
- *
- * This class implements the "test" interface used in this test.
- */
-class test_i : public virtual POA_TestModule::test
-{
-public:
-
- /// Constructor.
- test_i (void);
-
- /// Destructor.
- ~test_i (void);
-
-private:
-};
-
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/.cvsignore b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.cpp
deleted file mode 100644
index ceb1ab95ee1..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#include "Client_ORBInitializer.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- Client_ORBInitializer,
- "$Id$")
-
-
-#include "tao/Exception.h"
-#include "tao/ORB_Constants.h"
-
-#include "Client_Request_Interceptor.h"
-
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- // Create and register the test request interceptors.
- PortableInterceptor::ClientRequestInterceptor_ptr ci =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
- ACE_NEW_THROW_EX (ci,
- Client_Request_Interceptor ("CLIENT A"),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var ci_interceptor =
- ci;
-
- info->add_client_request_interceptor (ci_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_NEW_THROW_EX (ci,
- Client_Request_Interceptor ("CLIENT B"),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- ci_interceptor = ci;
-
- info->add_client_request_interceptor (ci_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_NEW_THROW_EX (ci,
- Client_Request_Interceptor ("CLIENT C"),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- ci_interceptor = ci;
-
- info->add_client_request_interceptor (ci_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.h
deleted file mode 100644
index 9a14c62287c..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_ORBInitializer.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Client_ORBInitializer.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @name Client_ORBInitializer
- *
- * @brief
- * ORB initializer that registers all client request interceptors used
- * in this test.
- */
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.cpp
deleted file mode 100644
index dba6578f6f2..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-// -*- C++ -*-
-
-#include "Client_Request_Interceptor.h"
-#include "testC.h"
-
-#include "tao/AnyTypeCode/TypeCode.h"
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- Client_Request_Interceptor,
- "$Id$")
-
-Client_Request_Interceptor::Client_Request_Interceptor (const char *name)
- : Request_Interceptor (name)
-{
-}
-
-void
-Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- CORBA::Boolean client_side =
- this->client_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!client_side)
- return; // Don't continue if the server side is being tested.
-
- ACE_DEBUG ((LM_INFO,
- "%s.send_request",
- this->name_.in ()));
-
- if (ACE_OS::strcmp ("CLIENT B", this->name_.in ()) == 0)
- {
- // Determine which test scenario we are in
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::TestScenario scenario;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- if (paramlist[i].argument >>= scenario)
- {
- switch (scenario)
- {
- case 2:
- // We can only throw a CORBA::SystemException or a
- // PortableInteceptor::ForwardRequest exception due to
- // the restricted exception specification dictated by
- // the IDL for request interceptors. As such, an
- // arbitrary CORBA::SystemException was chosen
- // (NO_PERMISSION, in this case).
- ACE_DEBUG ((LM_DEBUG,
- " raised CORBA::NO_PERMISSION exception\n"));
- ACE_THROW (CORBA::NO_PERMISSION ()); // Expected exception.
-
- default:
- break;
- }
- }
- else
- ACE_ERROR ((LM_ERROR,
- "\nERROR: send_request - Could not extract "
- "arguments.\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-
- this->starting_interception_point_count_++;
-}
-
-void
-Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::Boolean client_side =
- this->client_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!client_side)
- return; // Don't continue if the server side is being tested.
-
- ACE_DEBUG ((LM_INFO,
- "%s.send_poll\n",
- this->name_.in ()));
-
- this->starting_interception_point_count_++;
-}
-
-void
-Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::Boolean client_side =
- this->client_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!client_side)
- return; // Don't continue if the server side is being tested.
-
- this->ending_interception_point_count_++;
-
- ACE_DEBUG ((LM_INFO,
- "%s.receive_reply",
- this->name_.in ()));
-
- if (ACE_OS::strcmp ("CLIENT B", this->name_.in ()) == 0)
- {
- // Determine which test scenario we are in
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::TestScenario scenario;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- if (paramlist[i].argument >>= scenario)
- {
- switch (scenario)
- {
- case 3:
- // We can only throw a CORBA::SystemException or a
- // PortableInteceptor::ForwardRequest exception due to
- // the restricted exception specification dictated by
- // the IDL for request interceptors. As such, an
- // arbitrary CORBA::SystemException was chosen
- // (NO_PERMISSION, in this case).
- ACE_DEBUG ((LM_DEBUG,
- " raised CORBA::NO_PERMISSION exception\n"));
- ACE_THROW (CORBA::NO_PERMISSION ()); // Expected exception.
-
- default:
- break;
- }
- }
- else
- ACE_ERROR ((LM_ERROR,
- "\nERROR: receive_reply - Could not extract "
- "arguments.\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-}
-
-void
-Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Boolean client_side =
- this->client_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!client_side)
- return; // Don't continue if the server side is being tested.
-
- this->ending_interception_point_count_++;
-
- ACE_DEBUG ((LM_INFO,
- "%s.receive_exception",
- this->name_.in ()));
-
- if (ACE_OS::strcmp ("CLIENT B", this->name_.in ()) == 0)
- {
- // Determine which test scenario we are in
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::TestScenario scenario;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- if (paramlist[i].argument >>= scenario)
- {
- CORBA::Any_var exception;
- CORBA::TypeCode_var tc;
- const char * id = 0;
-
- switch (scenario)
- {
- case 4:
- exception = ri->received_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- tc = exception->type ();
-
- id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (id, "IDL:Test/X:1.0") == 0)
- {
- // We can only throw a CORBA::SystemException or a
- // PortableInteceptor::ForwardRequest exception due
- // to the restricted exception specification
- // dictated by the IDL for request interceptors. As
- // such, an arbitrary CORBA::SystemException was
- // chosen (NO_PERMISSION, in this case).
- ACE_DEBUG ((LM_DEBUG,
- " transformed Test::X exception to "
- "CORBA::NO_PERMISSION exception\n"));
-
- // Expected exception.
- ACE_THROW (CORBA::NO_PERMISSION ());
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: receive_exception - Received "
- "unexpected exception!\n"));
- }
- break;
- default:
- break;
- }
- }
- else
- ACE_ERROR ((LM_ERROR,
- "\nERROR: receive_exception - Could not extract "
- "arguments.\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-}
-
-void
-Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Boolean client_side =
- this->client_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!client_side)
- return; // Don't continue if the server side is being tested.
-
- this->ending_interception_point_count_++;
-
- ACE_DEBUG ((LM_INFO,
- "%s.receive_other\n",
- this->name_.in ()));
-}
-
-CORBA::Boolean
-Client_Request_Interceptor::client_side_test (
- PortableInterceptor::ClientRequestInfo_ptr info
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var op = info->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return ACE_OS::strcmp (op.in (), "client_test") == 0 ? 1 : 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h
deleted file mode 100644
index bb1f24cbdcc..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Client_Request_Interceptor.h
- *
- * $Id$
- *
- * Implementation header for the client request interceptor for the
- * request interceptor flow test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef CLIENT_REQUEST_INTERCEPTOR_H
-#define CLIENT_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "Request_Interceptor.h"
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class Client_Request_Interceptor
- *
- * @brief Client request interceptor that exercises
- * PortableInterceptor::ForwardRequest support.
- *
- */
-class Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object,
- public virtual Request_Interceptor
-{
-public:
-
- /// Constructor.
- Client_Request_Interceptor (const char *name);
-
- /**
- * @name Methods Required by the Client Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all client request interceptors.
- */
- //@{
- virtual void send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- // Returns 1 if the client-side test is currently being run, and 0
- // otherwise.
- CORBA::Boolean client_side_test (
- PortableInterceptor::ClientRequestInfo_ptr info
- ACE_ENV_ARG_DECL);
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* CLIENT_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc
deleted file mode 100644
index ee81ede8553..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/PI_Request_Interceptor_Flow.mpc
+++ /dev/null
@@ -1,24 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- Server_ORBInitializer.cpp
- Server_Request_Interceptor.cpp
- Request_Interceptor.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- Client_ORBInitializer.cpp
- Client_Request_Interceptor.cpp
- Request_Interceptor.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/README b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/README
deleted file mode 100644
index 2db42413933..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/README
+++ /dev/null
@@ -1,168 +0,0 @@
-# $Id$
-
-NOTE: The code in this test is highly specialized and very brittle.
- Do not use it as a model for "real world" interceptor code.
-
-
-This test verifies that proper request interceptor flow semantics
-occur during a given request/invocation. It does so by executing a
-canned (hard-coded) set of scenarios. Each scenario excercises a
-specific flow behavior. All scenarios correspond to the ones detailed
-in the Portable Interceptor specification (00-04-05). They are listed
-below:
-
-Client Request Interceptor Flow
-===============================
-
-Given client request interceptors A, B and C.
-
-------------------------------------------------------------------------
-
- Scenario 1: an exception arrives from the server:
-
- A.send_request is called;
- B.send_request is called;
- C.send_request is called;
- C.receive_exception is called;
- B.receive_exception is called;
- A.receive_exception is called.
-
-The starting interception point (send_request) on each of the
-client request interceptors was invoked successfully, so the ending
-interception point (receive_exception in this case since the server
-raised an exception) will be invoked on each of the client request
-interceptors.
-
-------------------------------------------------------------------------
-
- Scenario 2: B.send_request raises an exception:
- A.send_request is called;
- B.send_request is called and raises an exception
- A.receive_exception is called.
-
-Only the starting interception point (send_request) on client request
-interceptor A was completed successfully, so only its ending
-interception point (receive_exception in this case) will be invoked.
-No ending interception point from interceptor B will be invoked.
-
-------------------------------------------------------------------------
-
- Scenario 3: a reply returns successfully from the server, but
- B.receive_reply raises an exception:
-
- A.send_request is called;
- B.send_request is called;
- C.send_request is called;
- C.receive_reply is called;
- B.receive_reply is called and raises an exception
- A.receive_exception is called.
-
-Since B.receive_reply raises an exception, and since B's and C's
-ending interception point (receive_reply) has already been invoked,
-then only A's ending interception point is invoked since it hasn't
-been invoked yet. In this case, since an exception was raised, A's
-receive_exception ending interception point is invoked.
-
-------------------------------------------------------------------------
-
- Scenario 4: an exception X is returned by the server, but
- B.receive_exception changes the exception to Y:
-
- A.send_request is called;
- B.send_request is called;
- C.send_request is called;
- C.receive_exception is called with X;
- B.receive_exception is called with X, raises Y;
- A.receive_exception is called with Y.
-
-Since each client request interceptor's starting interception point
-(send_request) was invoked, each client request interceptor's ending
-interception point (receive_exception in this case) will be invoked.
-However, A's receive_exception ending interception point will be
-handed exception Y instead of exception X.
-
-************************************************************************
-
-Server Request Interceptor Flow
-===============================
-
-Given server request interceptors A, B and C.
-
-------------------------------------------------------------------------
-
- Scenario 1: an exception is raised by the target:
-
- A.receive_request_service_contexts is called;
- B.receive_request_service_contexts is called;
- C.receive_request_service_contexts is called;
- A.receive_request is called;
- B.receive_request is called;
- C.receive_request is called;
- C.send_exception is called;
- B.send_exception is called;
- A.send_exception is called.
-
-Each server request interceptor's starting interception point
-(receive_request_service_contexts) was invoked, meaning that each
-server request interceptor's intermediate interception point
-(receive_request) will be invoked. The operation itself raises an
-exception, meaning that each server request interceptor's ending
-interception point (send_exception) will be invoked.
-
-------------------------------------------------------------------------
-
- Scenario 2: B.receive_request_service_contexts raises an exception:
-
- A.receive_request_service_contexts is called;
- B.receive_request_service_contexts is called and raises an exception
- A.send_exception is called.
-
-Only interceptor A's starting interception point
-(receive_request_service_contexts) was completed successfully, so only
-its ending interception point (send_exception in this case) will be
-invoked.
-
-------------------------------------------------------------------------
-
- Scenario 3: the target invocation returns successfully, but
- B.send_reply raises an exception:
-
- A.receive_request_service_contexts is called;
- B.receive_request_service_contexts is called;
- C.receive_request_service_contexts is called;
- A.receive_request is called;
- B.receive_request is called;
- C.receive_request is called;
- C.send_reply is called;
- B.send_reply is called and raises an exception;
- A.send_exception is called.
-
-Each server request interceptor's starting interception point was
-invoked successfully, so each will have one (and only one) of its
-ending interception points (send_reply or send_exception) invoked. In
-this case, B's send_reply interception point raises an exception. B's
-and C's ending interception point has already been invoked so only A's
-send_exception (rather thans send_reply) ending interception point is
-invoked.
-
-------------------------------------------------------------------------
-
- Scenario 4: an exception X is raised by the target, but
- B.send_exception changes the exception to Y:
-
- A.receive_request_service_contexts is called;
- B.receive_request_service_contexts is called;
- C.receive_request_service_contexts is called;
- A.receive_request is called;
- B.receive_request is called;
- C.receive_request is called;
- C.send_exception is called with X;
- B.send_exception is called with X, raises Y;
- A.send_exception is called with Y.
-
-Since each server request interceptor's starting interception point
-(receive_request_service_contexts) was invoked, each server request
-interceptor's ending interception point (receive_exception in this
-case) will be invoked. However, A's send_exception ending
-interception point will be handed exception Y exception instead of
-exception X.
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.cpp
deleted file mode 100644
index c918a767b2c..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// -*- C++ -*-
-
-#include "Request_Interceptor.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- Request_Interceptor,
- "$Id$")
-
-Request_Interceptor::Request_Interceptor (const char *name)
- : name_ (name),
- starting_interception_point_count_ (0),
- ending_interception_point_count_ (0)
-{
-}
-
-char *
-Request_Interceptor::name (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->name_.in ());
-}
-
-void
-Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::ULong s_count =
- this->starting_interception_point_count_.value ();
-
- CORBA::ULong e_count =
- this->ending_interception_point_count_.value ();
-
- if (s_count == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P) ERROR: Interceptor %d \"%s\"\n"
- "(%P) The number of starting interception point calls "
- "is zero\n", s_count,
- this->name_.in ()));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- if (e_count == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P) ERROR: Interceptor %d \"%s\"\n"
- "(%P) The number of ending interception point calls"
- "is zero\n",
- e_count, this->name_.in ()));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- if (s_count != e_count)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P) ERROR: Interceptor \"%s\"\n"
- "(%P) The number of starting interception point "
- "calls (%u)\n"
- "(%P) did not equal the number of ending "
- "interception \n"
- "(%P) point calls (%u).\n\n",
- this->name_.in (),
- s_count,
- e_count));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.h b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.h
deleted file mode 100644
index ade0ae89891..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Request_Interceptor.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Request_Interceptor.h
- *
- * $Id$
- *
- * Implementation header for the request interceptor base class for
- * the request interceptor flow test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef REQUEST_INTERCEPTOR_H
-#define REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/CORBA_String.h"
-
-#include "ace/Atomic_Op.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class Request_Interceptor
- *
- * @brief Abstract base class for request interceptors used in this
- * test.
- */
-class Request_Interceptor
- : public virtual PortableInterceptor::Interceptor
-{
-public:
-
- /// Constructor.
- Request_Interceptor (const char *name);
-
- /**
- * @name Methods Required by the Client Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all client request interceptors.
- */
- //@{
- /// Return the name of this Requestinterceptor.
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-protected:
-
- /// The name of this interceptor.
- CORBA::String_var name_;
-
- /// The number of times a starting interception point has been
- /// called.
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong>
- starting_interception_point_count_;
-
- /// The number of times an ending interception point has been
- /// called.
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong>
- ending_interception_point_count_;
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.cpp
deleted file mode 100644
index eaf11509671..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-#include "Server_ORBInitializer.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- Server_ORBInitializer,
- "$Id$")
-
-#include "tao/Exception.h"
-#include "tao/ORB_Constants.h"
-
-#include "Server_Request_Interceptor.h"
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- // Create and register the test request interceptors.
- PortableInterceptor::ServerRequestInterceptor_ptr si =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
- ACE_NEW_THROW_EX (si,
- Server_Request_Interceptor ("SERVER A"),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var si_interceptor =
- si;
-
- info->add_server_request_interceptor (si_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_NEW_THROW_EX (si,
- Server_Request_Interceptor ("SERVER B"),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- si_interceptor = si;
-
- info->add_server_request_interceptor (si_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_NEW_THROW_EX (si,
- Server_Request_Interceptor ("SERVER C"),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- si_interceptor = si;
-
- info->add_server_request_interceptor (si_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.h
deleted file mode 100644
index 0d011a67032..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_ORBInitializer.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Server_ORBInitializer.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @name Server_ORBInitializer
- *
- * @brief
- * ORB initializer that registers all server request interceptors used
- * in this test.
- */
-class Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.cpp
deleted file mode 100644
index 45e9c1b1650..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-// -*- C++ -*-
-
-#include "Server_Request_Interceptor.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- Server_Request_Interceptor,
- "$Id$")
-
-#include "testC.h"
-
-#include "tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h"
-#include "tao/AnyTypeCode/TypeCode.h"
-
-#include "ace/OS_NS_string.h"
-
-Server_Request_Interceptor::Server_Request_Interceptor (const char *name)
- : Request_Interceptor (name),
- scenario_ (0)
-{
-}
-
-void
-Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Boolean server_side =
- this->server_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!server_side)
- return; // Don't continue if the client side is being tested.
-
- ACE_DEBUG ((LM_INFO,
- "%s.receive_request_service_contexts",
- this->name_.in ()));
-
- if (ACE_OS::strcmp ("SERVER B", this->name_.in ()) == 0)
- {
- this->scenario_++;
-
- switch (this->scenario_)
- {
- case 2:
- // We can only throw a CORBA::SystemException or a
- // PortableInteceptor::ForwardRequest exception due to
- // the restricted exception specification dictated by
- // the IDL for request interceptors. As such, an
- // arbitrary CORBA::SystemException was chosen
- // (NO_PERMISSION, in this case).
- ACE_DEBUG ((LM_DEBUG,
- " raised CORBA::NO_PERMISSION exception\n"));
- ACE_THROW (CORBA::NO_PERMISSION ()); // Expected exception.
-
- default:
- break;
- }
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-
- this->starting_interception_point_count_++;
-}
-
-void
-Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Boolean server_side =
- this->server_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!server_side)
- return; // Don't continue if the client side is being tested.
-
- ACE_DEBUG ((LM_INFO,
- "%s.receive_request\n",
- this->name_.in ()));
-}
-
-void
-Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::Boolean server_side =
- this->server_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!server_side)
- return; // Don't continue if the client side is being tested.
-
- this->ending_interception_point_count_++;
-
- ACE_DEBUG ((LM_INFO,
- "%s.send_reply",
- this->name_.in ()));
-
- if (ACE_OS::strcmp ("SERVER B", this->name_.in ()) == 0)
- {
- // Determine which test scenario we are in
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::TestScenario scenario;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- if (paramlist[i].argument >>= scenario)
- {
- switch (scenario)
- {
- case 3:
- // We can only throw a CORBA::SystemException or a
- // PortableInteceptor::ForwardRequest exception due to
- // the restricted exception specification dictated by
- // the IDL for request interceptors. As such, an
- // arbitrary CORBA::SystemException was chosen
- // (NO_PERMISSION, in this case).
- ACE_DEBUG ((LM_DEBUG,
- " raised CORBA::NO_PERMISSION exception\n"));
- ACE_THROW (CORBA::NO_PERMISSION ()); // Expected exception.
-
- default:
- break;
- }
- }
- else
- ACE_ERROR ((LM_ERROR,
- "\nERROR: send_reply - Could not extract "
- "arguments.\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-}
-
-void
-Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Boolean server_side =
- this->server_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!server_side)
- return; // Don't continue if the client side is being tested.
-
- this->ending_interception_point_count_++;
-
- ACE_DEBUG ((LM_INFO,
- "%s.send_exception",
- this->name_.in ()));
-
- if (ACE_OS::strcmp ("SERVER B", this->name_.in ()) == 0)
- {
- // Determine which test scenario we are in
- Dynamic::ParameterList_var paramlist =
- ri->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::TestScenario scenario;
- CORBA::ULong i = 0; // index -- explicitly used to avoid
- // overloaded operator ambiguity.
- if (paramlist[i].argument >>= scenario)
- {
- CORBA::Any_var exception;
- CORBA::TypeCode_var tc;
- const char *id = 0;
-
- switch (scenario)
- {
- case 4:
- exception = ri->sending_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- tc = exception->type ();
-
- id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (ACE_OS::strcmp (id, "IDL:Test/X:1.0") == 0)
- {
- // We can only throw a CORBA::SystemException or a
- // PortableInteceptor::ForwardRequest exception due
- // to the restricted exception specification
- // dictated by the IDL for request interceptors. As
- // such, an arbitrary CORBA::SystemException was
- // chosen (NO_PERMISSION, in this case).
- ACE_DEBUG ((LM_DEBUG,
- " transformed Test::X exception to "
- "CORBA::NO_PERMISSION exception\n"));
-
- // Expected exception.
- ACE_THROW (CORBA::NO_PERMISSION ());
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: send_exception - Received "
- "unexpected exception!\n"));
- }
- break;
- default:
- break;
- }
- }
- else
- ACE_ERROR ((LM_ERROR,
- "\nERROR: send_exception - Could not extract "
- "arguments.\n"));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-}
-
-void
-Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::Boolean server_side =
- this->server_side_test (ri ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!server_side)
- return; // Don't continue if the client side is being tested.
-
- this->ending_interception_point_count_++;
-
- ACE_DEBUG ((LM_INFO,
- "%s.send_other",
- this->name_.in ()));
-}
-
-CORBA::Boolean
-Server_Request_Interceptor::server_side_test (
- PortableInterceptor::ServerRequestInfo_ptr info
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var op = info->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return ACE_OS::strcmp (op.in (), "server_test") == 0 ? 1 : 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.h b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.h
deleted file mode 100644
index e0a9c66c947..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Server_Request_Interceptor.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Server_Request_Interceptor.h
- *
- * $Id$
- *
- * Implementation header for the server request interceptor for the
- * request interceptor flow test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef SERVER_REQUEST_INTERCEPTOR_H
-#define SERVER_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "Request_Interceptor.h"
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/**
- * @class Server_Request_Interceptor
- *
- * @brief Simple concrete server request interceptor.
- *
- * See the README file for test details.
- */
-class Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object,
- public virtual Request_Interceptor
-{
-public:
-
- /// Constructor. Accepts the name of the interceptor.
- Server_Request_Interceptor (const char *name);
-
- /**
- * @name Methods Required by the Server Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all server request interceptors.
- */
- //@{
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
- //@}
-
-private:
-
- /// Returns 1 if the server-side test is currently being run, and 0
- /// otherwise.
- CORBA::Boolean server_side_test (
- PortableInterceptor::ServerRequestInfo_ptr info
- ACE_ENV_ARG_DECL);
-
-private:
-
- /// Variable used to keep track of the scenario count. Used to get
- /// around the inability to call RequestInfo::arguments() in the
- /// receive_service_contexts() interception point.
- CORBA::ULong scenario_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_REQUEST_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp
deleted file mode 100644
index 52caf89e452..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/client.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-
-#include "testC.h"
-#include "Client_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- client,
- "$Id$")
-
-const char *ior = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- if (argc != 3) // foo -k IOR
- ACE_ERROR_RETURN ((LM_ERROR,
- "Wrong number of arguments.\n"),
- -1);
-
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- if (ior == 0)
- ior = get_opts.opt_arg ();
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-k IOR\n",
- argv[0]),
- -1);
- }
-
- return 0;
-}
-
-void
-client_test (Test_ptr server ACE_ENV_ARG_DECL)
-{
- // Currently, there are only four scenarios for the client side
- // tests.
- const Test::TestScenario MAX_CLIENT_SCENARIO = 4;
-
- for (Test::TestScenario i = 1; i <= MAX_CLIENT_SCENARIO; ++i)
- {
- ACE_DEBUG ((LM_INFO,
- "\nCLIENT SCENARIO %d\n"
- "------------------\n",
- i));
-
- ACE_TRY
- {
- server->client_test (i ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (i == 1)
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: No exception has been thrown from client_test() "
- "operation.\n"));
- }
- }
- ACE_CATCH (Test::X, ex)
- {
- // Expected exception. Ignore it.
- }
- ACE_CATCH (CORBA::NO_PERMISSION, ex)
- {
- // Expected exception. Ignore it.
- }
- ACE_CATCH (Test::UnknownScenario, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: Unknown scenario <%d> condition "
- "returned from client_test() "
- "operation.\n",
- ex.scenario));
- ACE_RE_THROW;
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: Exception thrown from client_test() "
- "operation.\n"));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-}
-
-void
-server_test (Test_ptr server ACE_ENV_ARG_DECL)
-{
- // Currently, there are only four scenarios for the server side
- // tests.
- const Test::TestScenario MAX_SERVER_SCENARIO = 4;
-
- for (Test::TestScenario i = 1; i <= MAX_SERVER_SCENARIO; ++i)
- {
- ACE_DEBUG ((LM_INFO,
- "\nSERVER SCENARIO %d\n"
- "------------------\n",
- i));
-
- ACE_TRY
- {
- CORBA::ULongSeq_var ulongseq;
- server->server_test (i, ulongseq.out () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (i == 1)
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: No exception has been thrown from server_test() "
- "operation.\n"));
- }
- }
- ACE_CATCH (Test::X, ex)
- {
- // Expected exception. Ignore it.
- }
- ACE_CATCH (CORBA::NO_PERMISSION, ex)
- {
- // Expected exception. Ignore it.
- }
- ACE_CATCH (Test::UnknownScenario, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: Unknown scenario <%d> condition "
- "returned from server_test() "
- "operation.\n",
- ex.scenario));
- ACE_RE_THROW;
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "\nERROR: Exception thrown from server_test() "
- "operation.\n"));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer =
- PortableInterceptor::ORBInitializer::_nil ();
-
- ACE_NEW_RETURN (temp_initializer,
- Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- "Client ORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (::parse_args (argc, argv) != 0)
- return -1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- ::client_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ::server_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_INFO,
- "Request interceptor flow test passed.\n"));
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/run_test.pl b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/run_test.pl
deleted file mode 100755
index 162acd63c17..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# -*- perl -*-
-# $Id$
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-k file://$file");
-
-print STDERR "\n\n==== Running Request_Interceptor_Flow test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp
deleted file mode 100644
index 6e4fa0d21d3..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/server.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// -*- C++ -*-
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "Server_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- server,
- "$Id$")
-
-const char *ior_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- if (argc != 3) // foo -o IOR
- ACE_ERROR_RETURN ((LM_ERROR,
- "Wrong number of arguments.\n"),
- -1);
-
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
-
- ior_file = get_opts.opt_arg ();
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Usage: %s "
- "-o IOR\n",
- argv[0]),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- Server_ORBInitializer *temp_initializer = 0;
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var orb_initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (orb_initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "Server ORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (::parse_args (argc, argv) != 0)
- return -1;
-
- test_i servant (orb.in ());
-
- CORBA::Object_var obj = servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Servant:\n<%s>\n",
- ior.in ()));
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Write IOR to a file.
- FILE *output_file= ACE_OS::fopen (ior_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior.in ()),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- // Run the ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl
deleted file mode 100644
index 036fe0dd66e..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test.idl
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file test.idl
- *
- * $Id$
- *
- * IDL file to test request interceptor flow.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#include "tao/ULongSeq.pidl"
-
-interface Test
-{
- typedef short TestScenario;
-
- /// Dummy exception used during the test.
- exception X {};
-
- /// Unknown scenario number was passed to the test operation.
- exception UnknownScenario {
- TestScenario scenario;
- };
-
- /// The client-side test operation.
- void client_test (in TestScenario scenario) raises (X, UnknownScenario);
-
- /// The server-side test operation.
- void server_test (in TestScenario scenario, out CORBA::ULongSeq myseq) raises (X, UnknownScenario);
-
- /// Shutdown the server.
- oneway void shutdown ();
-
-};
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp
deleted file mode 100644
index 17dee50ac55..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// -*- C++ -*-
-
-#include "test_i.h"
-
-ACE_RCSID (Request_Interceptor_Flow,
- test_i,
- "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-test_i::client_test (Test::TestScenario scenario
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Test::X,
- Test::UnknownScenario,
- CORBA::SystemException))
-{
- switch (scenario)
- {
- case 1:
- case 4:
- // Both the client-side and server-side tests throw this
- // exception in these scenarios.
- ACE_THROW (Test::X ()); // Expected test exception
- case 2:
- case 3:
- break;
- default:
- ACE_THROW (Test::UnknownScenario (scenario)); // Unexpected!
- }
-}
-
-void
-test_i::server_test (Test::TestScenario scenario,
- CORBA::ULongSeq_out myseq
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Test::X,
- Test::UnknownScenario,
- CORBA::SystemException))
-{
- myseq = new CORBA::ULongSeq;
-
- switch (scenario)
- {
- case 1:
- case 4:
- // Both the client-side and server-side tests throw this
- // exception in these scenarios.
- ACE_THROW (Test::X ()); // Expected test exception
- case 2:
- case 3:
- break;
- default:
- ACE_THROW (Test::UnknownScenario (scenario)); // Unexpected!
- }
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_INFO,
- "Server is shutting down.\n"));
-
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.h b/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.h
deleted file mode 100644
index 604d4ffb432..00000000000
--- a/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/test_i.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * Implementation header for the "test" IDL interface for the
- * request interceptor flow test.
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-#ifndef TEST_I_H
-#define TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class test_i
- *
- * @brief Simple test class.
- *
- * This class implements the "test" interface used in this test.
- */
-class test_i : public virtual POA_Test
-{
-public:
-
- /// Constructor.
- test_i (CORBA::ORB_ptr orb);
-
- /// The client-side test operation.
- virtual void client_test (Test::TestScenario scenario
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Test::X,
- Test::UnknownScenario,
- CORBA::SystemException));
-
- /// The server-side test operation.
- virtual void server_test (Test::TestScenario scenario,
- CORBA::ULongSeq_out myseq
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Test::X,
- Test::UnknownScenario,
- CORBA::SystemException));
-
- /// Shutdown the ORB.
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// Pseudo-reference to the ORB.
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/.cvsignore b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.cpp
deleted file mode 100644
index fd053e810f0..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-#include "client_interceptor.h"
-
-ACE_RCSID (Service_Context_Manipulation, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (void)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Client_Request_Interceptor (orb_id.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.h
deleted file mode 100644
index 569419fb346..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Client_ORBInitializer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc
deleted file mode 100644
index 2e992878fcb..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/PI_Svc_Context_Manip.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, pi_server, interceptors {
- Source_Files {
- test_i.cpp
- Server_ORBInitializer.cpp
- server_interceptor.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, pi, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- Client_ORBInitializer.cpp
- client_interceptor.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/README b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/README
deleted file mode 100644
index 4af4436596f..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/README
+++ /dev/null
@@ -1,8 +0,0 @@
-# $Id$
-
-This test allows you to visually check proper manipulation of a
-request's ServiceContextList through Portable Interceptors.
-
- server -o test.ior
-
- client
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.cpp
deleted file mode 100644
index 0ad8960c819..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Server_ORBInitializer.h"
-#include "server_interceptor.h"
-
-ACE_RCSID (Service_Context_Manipulation, Server_ORBInitializer, "$Id$")
-
-Server_ORBInitializer::Server_ORBInitializer (void)
-{
-}
-
-void
-Server_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Server_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
- PortableInterceptor::ServerRequestInterceptor::_nil ();
-
- // Install the Echo server request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Echo_Server_Request_Interceptor,
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ServerRequestInterceptor_var
- server_interceptor = interceptor;
-
- info->add_server_request_interceptor (server_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.h b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.h
deleted file mode 100644
index 992070c71e1..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/Server_ORBInitializer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_SERVER_ORB_INITIALIZER_H
-#define TAO_SERVER_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Server ORB initializer.
-class Server_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Server_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_SERVER_ORB_INITIALIZER_H */
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
deleted file mode 100644
index 80c6cfad678..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "Client_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-
-ACE_RCSID(Interceptors, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "ef:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'e':
- break;
- case 'f':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-v "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-void
-run_test (Test_Interceptors::Visual_ptr server
- ACE_ENV_ARG_DECL)
-{
-
- server->normal (10 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "\"normal\" operation done\n"));
-
- server->nothing (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "\"nothing\" operation done\n"));
-
- ACE_TRY
- {
- server->user (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test_Interceptors::Silly, userex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught Silly\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-
- ACE_TRY_EX (SYS)
- {
- server->system (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (SYS);
- }
- ACE_CATCH (CORBA::INV_OBJREF, sysex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught CORBA::INV_OBJREF\n"));
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.cpp
deleted file mode 100644
index e9ef8474a32..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-// $Id$
-
-#include "client_interceptor.h"
-#include "tao/OctetSeqC.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- interceptors,
- "$Id$")
-
-const IOP::ServiceId service_id = 0xdeadbeef;
-const char *request_msg = "The Echo_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Request_Interceptor reply message";
-
-Echo_Client_Request_Interceptor::
-Echo_Client_Request_Interceptor (const char *id)
- : myname_ ("Echo_Client_Interceptor"),
- orb_id_ (CORBA::string_dup (id))
-{
-}
-
-Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do Nothing
-}
-
-void
-Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_request "
- "from \"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
-#endif /*if 0*/
-
-
-
- // Populate target member of the ClientRequestInfo.
-
- // Make the context to send the context to the target
- IOP::ServiceContext sc;
- sc.context_id = ::service_id;
-
- CORBA::ULong string_len = ACE_OS::strlen (request_msg) + 1;
- CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len);
- ACE_OS::strcpy (reinterpret_cast<char *> (buf), request_msg);
-
- sc.context_data.replace (string_len, string_len, buf, 1);
-
- // Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Check that the request service context can be retrieved.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-
-}
-
-void
-Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_reply from "
- "\"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
-#endif /*if 0*/
-
- // Check that the reply service context was received as
- // expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- " Received reply service context: %s\n",
- buf));
-#endif /*if 0*/
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that no one has messed with the request service context.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-}
-
-void
-Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_other\n",
- this->myname_));
-}
-
-void
-Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "%s.received_exception "
- "from \"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
-#endif /*if 0*/
-
- // Check that the reply service context was received as
- // expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- " Received reply service context: %s\n",
- buf));
-#endif /*if 0*/
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that no one has messed with the request service context.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 =
- reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-}
-
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.h b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.h
deleted file mode 100644
index 10fcbd62f70..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/client_interceptor.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_CLIENT_INTERCEPTOR_H
-#define TAO_CLIENT_INTERCEPTOR_H
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Client-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Client_Request_Interceptor (const char *orb_id);
- // ctor.
-
- virtual ~Echo_Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-
- CORBA::String_var orb_id_;
- // The ID of the ORB where this interceptor was created, usually
- // obtained from the ORBInitInfo
-
- CORBA::ORB_var orb_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_CLIENT_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl
deleted file mode 100755
index fa204e17d8c..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $file");
-}
-$CL = new PerlACE::Process ("client", "-f file://$file");
-
-print STDERR "\n\n==== Running interceptor test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
deleted file mode 100644
index bb361528705..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "Server_ORBInitializer.h"
-
-#include "tao/ORBInitializer_Registry.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Server_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Now we can create the ORB
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Visual_i server_impl (orb.in ());
-
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var test_obj =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_Interceptors::Visual_var server =
- Test_Interceptors::Visual::_narrow (test_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Test_Interceptors::Visual: <%s>\n",
- ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.cpp
deleted file mode 100644
index d253b1ab045..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-// $Id$
-
-#include "server_interceptor.h"
-#include "tao/OctetSeqC.h"
-
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- server_interceptor,
- "$Id$")
-
-const IOP::ServiceId service_id = 0xdeadbeef;
-const char *request_msg = "The Echo_Request_Interceptor request message";
-const char *reply_msg = "The Echo_Request_Interceptor reply message";
-
-Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
- : myname_ ("Echo_Server_Interceptor")
-{
-}
-
-Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor (void)
-{
-}
-
-char *
-Echo_Server_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Echo_Server_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Echo_Server_Request_Interceptor::receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.receive_request_service_contexts from "
- "\"%s\"\n",
- this->myname_,
- operation.in ()));
-
- IOP::ServiceId id = ::service_id;
- IOP::ServiceContext_var sc =
- ri->get_request_service_context (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf =
- reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- " Received service context: %s\n",
- buf));
-#endif /*if 0*/
-
- if (ACE_OS::strcmp (buf, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::receive_request_service_contexts: "
- "Expected request service context to be: %s\n",
- request_msg));
- }
-
- // Make the context to send the context to the client
- IOP::ServiceContext scc;
-
- scc.context_id = ::service_id;
-
- CORBA::ULong string_len = ACE_OS::strlen (reply_msg) + 1;
- CORBA::Octet *buff = CORBA::OctetSeq::allocbuf (string_len);
-
- ACE_OS::strcpy (reinterpret_cast<char *> (buff), reply_msg);
-
- scc.context_data.replace (string_len, string_len, buff, 1);
-
- // Add this context to the service context list.
- ri->add_reply_service_context (scc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-Echo_Server_Request_Interceptor::receive_request (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do nothing
-}
-
-void
-Echo_Server_Request_Interceptor::send_reply (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_reply from \"%s\"\n",
- this->myname_,
- operation.in ()));
-
- // Check that the reply service context is set as expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- " Reply service context: %s\n",
- buf));
-#endif /*if 0*/
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_reply: "
- "Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that the request service context hasn't been changed.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_reply: "
- "Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_exception (
- PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- "%s.send_exception from \"%s\"\n",
- this->myname_,
- operation.in ()));
-#endif /*if 0*/
-
- // Check that the reply service context is set as expected.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
-
-#if 0
- ACE_DEBUG ((LM_DEBUG,
- " Reply service context: %s\n",
- buf));
-#endif /*if 0*/
-
- if (ACE_OS::strcmp (buf, reply_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_exception: "
- "Expected reply service context to be: %s\n",
- reply_msg));
- }
-
- // Check that the request service context hasn't been changed.
- IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
-
- if (ACE_OS::strcmp (buf2, request_msg) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: Echo_Server_Request_Interceptor::send_exception: "
- "Expected request service context to be: %s.\n"
- " Got: %s\n",
- request_msg,
- buf2));
- }
-}
-
-void
-Echo_Server_Request_Interceptor::send_other (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.h b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.h
deleted file mode 100644
index 9549d70f549..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/server_interceptor.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_SERVER_INTERCEPTOR_H
-#define TAO_SERVER_INTERCEPTOR_H
-
-#include "tao/PI_Server/PI_Server.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Echo_Server_Request_Interceptor
- : public virtual PortableInterceptor::ServerRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- // = Server-side echo interceptor. For checking interceptor visually only.
-public:
- Echo_Server_Request_Interceptor (void);
- // cotr.
-
- ~Echo_Server_Request_Interceptor ();
- // dotr.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request_service_contexts (
- PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_SERVER_INTERCEPTOR_H */
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test.idl b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test.idl
deleted file mode 100644
index 79a06a14351..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test.idl
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Interceptors
-//
-// = FILENAME
-// test.idl
-//
-// = DESCRIPTION
-// Simple IDL file to test portable interceptor support.
-//
-// = AUTHORS
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-module Test_Interceptors
-{
- exception Silly
- {};
-
- interface Visual
- {
- // = TITLE
- // A test idl for checking interceptor visually.
- //
- // = DESCRIPTION
- //
-
- void normal (in long arg);
- // Normal operation.
-
- void nothing ();
- // Normal operation without return.
-
- void user ()
- raises (Silly);
- // throws a user exception.
-
- void system ();
- // thows a system exception.
-
- oneway void shutdown ();
- // shutdown the ORB
- };
-};
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.cpp
deleted file mode 100644
index 503c7a5b423..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID (Service_Context_Manipulation,
- test_i,
- "$Id$")
-
-
-Visual_i::Visual_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Visual_i::normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
-}
-
-void
-Visual_i::nothing (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::nothing\n"));
-}
-
-void
-Visual_i::user (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing Silly\n"));
- ACE_THROW (Test_Interceptors::Silly ());
-}
-
-void
-Visual_i::system (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
- ACE_THROW (CORBA::INV_OBJREF ());
-}
-
-void
-Visual_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.h b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.h
deleted file mode 100644
index 5a6df58c457..00000000000
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/test_i.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Nanbor Wang
- */
-//=============================================================================
-
-
-#ifndef TAO_INTERCEPTOR_TEST_I_H
-#define TAO_INTERCEPTOR_TEST_I_H
-
-#include "testS.h"
-
-/**
- * @class Visual_i
- *
- * Implements the Visual interface in test.idl
- */
-class Visual_i : public POA_Test_Interceptors::Visual
-{
-
-public:
-
- Visual_i (CORBA::ORB_ptr orb);
-
- void normal (CORBA::Long arg
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void nothing (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void user (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test_Interceptors::Silly));
-
- void system (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// The ORB pseudo-reference (for shutdown).
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TAO_INTERCEPTOR_TEST_I_H */
diff --git a/TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc b/TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc
deleted file mode 100644
index 2ae15155c7b..00000000000
--- a/TAO/tests/Portable_Interceptors/Slot/PI_Slot.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-
-project(*driver): orbsvcsexe, pi_server, interceptors {
- Source_Files {
- driver.cpp
- }
-}
diff --git a/TAO/tests/Portable_Interceptors/Slot/driver.cpp b/TAO/tests/Portable_Interceptors/Slot/driver.cpp
deleted file mode 100644
index b7d2b320500..00000000000
--- a/TAO/tests/Portable_Interceptors/Slot/driver.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// file : Slot/driver.cpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// cvs-id : $Id$
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-#include "tao/ORBInitializer_Registry.h"
-
-PortableInterceptor::SlotId slot_id;
-
-class ORB_Initializer : public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- virtual void
- pre_init (PortableInterceptor::ORBInitInfo_ptr) throw (CORBA::SystemException)
- {
- }
-
- virtual void
- post_init (PortableInterceptor::ORBInitInfo_ptr info) throw (CORBA::SystemException)
- {
- slot_id = info->allocate_slot_id ();
- ACE_DEBUG ((LM_DEBUG, "Allocated slot with id %d.\n", slot_id));
- }
-};
-
-int
-main (int argc, char *argv[])
-{
-
- try
- {
- PortableInterceptor::ORBInitializer_var orb_initializer = new ORB_Initializer ();
- PortableInterceptor::register_orb_initializer (orb_initializer.in ());
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var pic_obj = orb->resolve_initial_references ("PICurrent");
- PortableInterceptor::Current_var pic (
- PortableInterceptor::Current::_narrow (pic_obj.in ()));
-
- CORBA::Any in;
- in <<= CORBA::ULong (1);
- pic->set_slot (slot_id, in);
-
- CORBA::ULong v (0);
- CORBA::Any_var out = pic->get_slot (slot_id);
- out >>= v;
-
- if (v != 1)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Slot value was not preserved.\n"));
- return 1;
- }
- }
- catch (PortableInterceptor::InvalidSlot const&)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Caught InvalidSlot exception.\n"));
- return 1;
- }
-
- return 0;
-}
diff --git a/TAO/tests/Portable_Interceptors/Slot/run_test.pl b/TAO/tests/Portable_Interceptors/Slot/run_test.pl
deleted file mode 100755
index f6cd92fdcf5..00000000000
--- a/TAO/tests/Portable_Interceptors/Slot/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("driver");
-}
-else {
- $CL = new PerlACE::Process ("driver");
-}
-print STDERR "\n==== Running Slot test ====\n";
-
-$client = $CL->SpawnWaitKill (5);
-
-if ($client != 0) {
- print STDERR "ERROR: driver returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/QtTests/.cvsignore b/TAO/tests/QtTests/.cvsignore
deleted file mode 100644
index 51933fcff4f..00000000000
--- a/TAO/tests/QtTests/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-client
-client
-client_moc.cpp
-client_moc.cpp
-server
-server
-test_i_moc.cpp
-test_i_moc.cpp
diff --git a/TAO/tests/QtTests/QtTests.mpc b/TAO/tests/QtTests/QtTests.mpc
deleted file mode 100644
index 95dad19f581..00000000000
--- a/TAO/tests/QtTests/QtTests.mpc
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*server): taoserver, tao_qtresource {
-
- MOC_Files {
- test_i.h
- }
-
- Source_Files {
- test_i.cpp
- test_i_moc.cpp
- server.cpp
- }
-}
-
-project(*client): taoclient, anytypecode, tao_qtresource {
- after += *server
-
- MOC_Files {
- client.h
- }
-
- Source_Files {
- testC.cpp
- client_moc.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/QtTests/README b/TAO/tests/QtTests/README
deleted file mode 100644
index 29393ece1f1..00000000000
--- a/TAO/tests/QtTests/README
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id$
-
-Introduction:
-
-This example illustrates the usage of the QtReactor from TAO. The
-server creates a display dialog which has a lcd display. The client
-creates a dialog with a quit button & a slider. On dragging the slider
-the display on the server dialog box will change. On pressing the Quit
-button the ORB would be shutdown and the movement of the slider will
-NOT be communicated to the server. The user can kill the windows to
-exit.
-
-To run the server and the client simply do the following:
-
-$ server -o foo.ior
-$ client -k file://foo.ior
-
-Note: this test only does something useful if the user has the Qt
-library installed. You should enable the build of the QtReactor by
-initializing qt_reactor. The path should point to the Qt/bin area so
-that the moc could be accessed by the Makefile.
-
-Bugs:
-It seems there is a problem with ORB shutdown, namely client does not
-shutdown nicely after QUIT button. Needs some additional investigations.
-
-
----------------------------------------------------------------------
-Technical Description:
-The technical details are similar to that of the XtReactor. Please
-refer $TAO_ROOT/tests/Xt_Stopwatch/README for a good description.
diff --git a/TAO/tests/QtTests/client.cpp b/TAO/tests/QtTests/client.cpp
deleted file mode 100755
index 0139cdf6672..00000000000
--- a/TAO/tests/QtTests/client.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "tao/QtResource/QtResource_Loader.h"
-
-ACE_RCSID(QtTests, client, "$Id$")
-
-#include "client.h"
-
-int
-main (int argc, char *argv[])
-{
- QApplication app (argc, argv);
- TAO::QtResource_Loader qt_resources (&app);
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client client (orb.in (), app);
-
- client.parse_args (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Creates the Qt widgets
- client.create_widgets (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // This may look a bit suspect, but Qt wants the manager widget
- // as the toplevel widget unlike Xt for display purposes.
- app.setMainWidget (&(client.box_));
-
- // Show them on Screen
- client.show ();
-
- app.exec ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-Client::Client (CORBA::ORB_ptr orb,
- QApplication &qapp)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- qapp_ (&qapp)
-{
-}
-
-Client::~Client (void)
-{
- delete this->slider_;
- delete this->push_button_;
-}
-
-void
-Client::parse_args (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
-{
- const char *ior = "file://test.ior";
-
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]));
- }
-
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->server_ =
- LCD_Display::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(this->server_.in ()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "\n The server value is nil "));
- }
-}
-
-void
-Client::create_widgets (ACE_ENV_SINGLE_ARG_DECL_NOT_USED/*ACE_ENV_SINGLE_ARG_PARAMETER*/)
-{
- // Ewsize the box
- this->box_.resize (200,120);
-
- // Make a pushbutton widget
- ACE_NEW (this->push_button_,
- QPushButton ("Quit",
- &this->box_));
-
- // Connect the click () SIGNAL routine with the SLOT handler that we
- // have defined
- QObject::connect (this->push_button_,
- SIGNAL (clicked()),
- this,
- SLOT (shutdown_call ()));
-
- // Create a slider widget
- ACE_NEW (this->slider_,
- QSlider (QSlider::Horizontal,
- &this->box_,
- "Slider"));
-
- // Add resource for the slider
- this->slider_->setRange (0, 99);
- this->slider_->setValue (0);
-
- // Connect the valuechanged SIGNAL routine with the slot that we
- // have defined. THe slot routine would invoke the remote call.
- QObject::connect (this->slider_,
- SIGNAL (valueChanged (int)),
- this,
- SLOT (remote_call (int)));
-
-}
-
-void
-Client::show (void)
-{
- this->box_.show ();
-}
-
-void
-Client::remote_call (int val)
-{
- this->server_->send_val (val);
-}
-
-void
-Client::shutdown_call (void)
-{
- this->server_->shutdown ();
-}
-
diff --git a/TAO/tests/QtTests/client.h b/TAO/tests/QtTests/client.h
deleted file mode 100755
index e4b50c40a70..00000000000
--- a/TAO/tests/QtTests/client.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Xt_Stopwatch/Stopwatch_client
-//
-// = FILENAME
-// client.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef _QT_CLIENT_H
-#define _QT_CLIENT_H
-
-#include "testC.h"
-
-#include <qapplication.h>
-#include <qvbox.h>
-#include <qslider.h>
-#include <qpushbutton.h>
-
-class Client : public QObject
-{
- Q_OBJECT
-public:
-
- Client (CORBA::ORB_ptr orb,
- QApplication &app);
- // ctor
-
- ~Client (void);
- //Dtor..
-
- void create_widgets (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // Adds the callbacks to the GUI underneath.....
-
- void show (void);
-
- void parse_args (int argc, char *argv[]
- ACE_ENV_ARG_DECL);
-
- QVBox box_;
- // A box widget..
-
- public slots:
- void remote_call (int val);
- void shutdown_call (void);
- // Two slot handlers for the two widgets that we have
-
-private:
-
- QPushButton *push_button_;
- // A push button
-
- QSlider *slider_;
- // A slider widget
-
- CORBA::ORB_var orb_;
- // The ORB
-
- LCD_Display_var server_;
-
- QApplication *qapp_;
-};
-
-#endif /* _QT_CLIENT_H */
diff --git a/TAO/tests/QtTests/server.cpp b/TAO/tests/QtTests/server.cpp
deleted file mode 100755
index 68ed428b4b6..00000000000
--- a/TAO/tests/QtTests/server.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID (QtTests, server, "$Id$")
-
-// who defines index macro?
-#ifdef index
-#undef index
-#endif
-#include "tao/QtResource/QtResource_Loader.h"
-#include <qlcdnumber.h>
-#include <qvbox.h>
-#include <qslider.h>
-#include "ace/OS_NS_stdio.h"
-
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- // ignore the first unknown option
- return 0;
-// ACE_ERROR_RETURN ((LM_ERROR,
-// "usage: %s "
-// "-o <iorfile>"
-// "\n",
-// argv [0]),
-// -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- // We do the command line parsing first
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Qt specific stuff for running with TAO...
- QApplication app (argc, argv);
- TAO::QtResource_Loader qt_resources (&app);
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create the Qt stuff..
- // Instantiate the LCD_Display implementation class
- LCD_Display_imp display_impl (orb.in ());
-
- LCD_Display_var server =
- display_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create the LCD after the QVbox is created.
- QVBox box;
-
- box.resize (145, 100);
- QLCDNumber lcd (2, &box, "lcd_display");
-
- // Connect the signal from the hosted servant with the public
- // SLOT method display () for the LCD Widget.
-
- QObject::connect (&display_impl,
- SIGNAL (set_value (int)),
- &lcd,
- SLOT (display (int)));
-
- app.setMainWidget(&box);
- box.show ();
-
- // End of QT specific stuff..
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // We choose to run the main Qt event loop..
- app.exec ();
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/QtTests/test.idl b/TAO/tests/QtTests/test.idl
deleted file mode 100755
index 1dc08b44be6..00000000000
--- a/TAO/tests/QtTests/test.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-interface LCD_Display
-{
- void send_val (in long val);
- // Remote method through which the
- // slider sets the value of the lcd display
-
- void shutdown ();
- // Shutdown the ORB
-};
diff --git a/TAO/tests/QtTests/test_i.cpp b/TAO/tests/QtTests/test_i.cpp
deleted file mode 100755
index 0d961989108..00000000000
--- a/TAO/tests/QtTests/test_i.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID( QtTests,
- test_i,
- "$Id$")
-
-LCD_Display_imp::LCD_Display_imp (CORBA::ORB_ptr orb)
-
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-LCD_Display_imp::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "The ORB has been shutdown, Close the windows to exit \n"));
- this->orb_->shutdown (0);
- this->orb_->destroy ();
-}
-
-void
-LCD_Display_imp::send_val (CORBA::Long val
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "The value from server is <%d> \n", val));
- emit set_value (val);
-}
-
diff --git a/TAO/tests/QtTests/test_i.h b/TAO/tests/QtTests/test_i.h
deleted file mode 100755
index ac04d36afc9..00000000000
--- a/TAO/tests/QtTests/test_i.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/QtTests
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Bala Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef _QT_TEST_I_H
-#define _QT_TEST_I_H
-
-#include "testS.h"
-
-#include <qapplication.h>
-#include <qobject.h>
-
-class LCD_Display_imp : public QObject,
- public POA_LCD_Display
-
-{
- Q_OBJECT
- // = TITLE
- // LCD_Display implementation class
- //
- // = DESCRIPTION
- // Implements the LCD_Display interface in test.idl
- //
-public:
- LCD_Display_imp (CORBA::ORB_ptr);
-
- // ctor
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void send_val (CORBA::Long val
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- signals:
- void set_value (int val);
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* SERVER_TEST_I_H */
diff --git a/TAO/tests/Queued_Message_Test/.cvsignore b/TAO/tests/Queued_Message_Test/.cvsignore
deleted file mode 100644
index ef1558284ab..00000000000
--- a/TAO/tests/Queued_Message_Test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Queued_Message_Test
diff --git a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp b/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
deleted file mode 100644
index 077d93b4596..00000000000
--- a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
-// ============================================================================
-/**
- * @brief Unit test for the TAO_Queued_Message class
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@uci.edu>
- */
-// ============================================================================
-
-#include "tao/Asynch_Queued_Message.h"
-#include "tao/ORB_Core.h"
-#include "ace/Log_Msg.h"
-#include "ace/Message_Block.h"
-#include "ace/ACE.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_time.h"
-#include "ace/OS_NS_stdlib.h"
-
-ACE_RCSID (tests,
- Queued_Message_Test,
- "$Id$")
-
-/// Max number of bytes on each message block
-const size_t max_block_length = 256;
-
-static TAO_Queued_Message *
-create_new_message (void)
-{
- // First create a message block
- size_t block_size =
- 64 + ACE_OS::rand () % (max_block_length - 64);
- ACE_Message_Block mb (block_size);
- mb.wr_ptr (block_size);
-
- return new TAO_Asynch_Queued_Message (&mb, TAO_ORB_Core_instance (),
- 0, 1);
-}
-
-/// Add a new message at the tail of the queue.
-static void push_back_message (TAO_Queued_Message *&head,
- TAO_Queued_Message *&tail)
-{
- TAO_Queued_Message *msg = create_new_message ();
- msg->push_back (head, tail);
-}
-
-/// Add a new message at the head of the queue.
-static void push_front_message (TAO_Queued_Message *&head,
- TAO_Queued_Message *&tail)
-{
- TAO_Queued_Message *msg = create_new_message ();
- msg->push_front (head, tail);
-}
-
-/// Remove the message at the head of the queue, and simulate the
-/// behavior of the I/O subsystem when processing such messages.
-static void del_message (TAO_Queued_Message *&head,
- TAO_Queued_Message *&tail)
-{
- // ACE_DEBUG ((LM_DEBUG, "Removing message\n"));
- TAO_Queued_Message *current = head;
- current->remove_from_list (head, tail);
-
- // Simulate message writing: each message is 'sent' using
- // multiple write() calls, in this simulation, we call the
- // bytes_transferred() method until all messages are removed.
-
- size_t total_length = current->message_length ();
- while (total_length > 0)
- {
- // select how many bytes we want to 'send' in this iteration.
- size_t t = ACE_OS::rand () % 256 + 1;
-
- if (t > total_length)
- t = total_length;
-
- current->bytes_transferred (t);
- total_length -= t;
- }
- if (!current->all_data_sent ())
- {
- ACE_ERROR ((LM_DEBUG,
- "ERROR: inconsistent state in Queued_Message\n"));
- ACE_OS::exit (1);
- }
- current->destroy ();
-}
-
-int
-main (int, char *[])
-{
-
- // Initialize a random seed to get better coverage.
- // @@ The random seed and default values should be configurable
- // using command line options.
-
- ACE_hrtime_t current_hrtime = ACE_OS::gethrtime ();
-#if defined(ACE_HRTIME_T_IS_BASIC_TYPE)
- ACE_UINT32 seed = current_hrtime;
-#else
- ACE_UINT32 seed =
- ACE_CU64_TO_CU32(current_hrtime);
-#endif
- ACE_OS::srand (seed);
-
- ACE_DEBUG ((LM_DEBUG, "Running test SEED = %d\n", seed));
-
- TAO_Queued_Message *head = 0;
- TAO_Queued_Message *tail = 0;
-
- int add_count = 0;
- int del_count = 0;
-
- const int iterations = 100;
- int i;
-
- for (i = 0; i != iterations; ++i)
- {
- push_back_message (head, tail);
- add_count++;
-
- if (ACE_OS::rand () % 100 > 90)
- {
- // every so often remove a message also.
- if (head != 0)
- {
- del_message (head, tail);
- del_count++;
- }
- }
- }
-
- // second phase, change the probabilities of removing a message.
- for (i = 0; i != iterations; ++i)
- {
- if (ACE_OS::rand () % 100 > 90)
- {
- push_back_message (head, tail); add_count++;
- }
- if (ACE_OS::rand () % 100 > 90)
- {
- push_front_message (head, tail); add_count++;
- }
- if (head != 0)
- {
- del_message (head, tail);
- del_count++;
- }
- }
-
- // Go through a phase where all messages are removed.
- while (head != 0)
- {
- del_message (head, tail);
- del_count++;
- }
-
- if (tail != 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: inconsistent state in message queue\n"),
- 1);
- }
-
- if (add_count != del_count)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: mismatched (%d != %d) add and del counts\n",
- add_count, del_count),
- 1);
- }
-
-
- return 0;
-}
diff --git a/TAO/tests/Queued_Message_Test/Queued_Message_Test.mpc b/TAO/tests/Queued_Message_Test/Queued_Message_Test.mpc
deleted file mode 100644
index 8112970c356..00000000000
--- a/TAO/tests/Queued_Message_Test/Queued_Message_Test.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoexe {
- exename = Queued_Message_Test
-}
-
diff --git a/TAO/tests/Queued_Message_Test/run_test.pl b/TAO/tests/Queued_Message_Test/run_test.pl
deleted file mode 100755
index 20eafcf51bd..00000000000
--- a/TAO/tests/Queued_Message_Test/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Queued_Message_Test");
-}
-else {
- $T = new PerlACE::Process ("Queued_Message_Test");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/README b/TAO/tests/README
deleted file mode 100644
index e261411484a..00000000000
--- a/TAO/tests/README
+++ /dev/null
@@ -1,345 +0,0 @@
-$Id$
-
-This directory contains a number of tests to validate that TAO is
-functioning correctly. The individual directories contain READMEs on
-how to run the following tests:
-
- . AMI
-
- This is a simple test for AMI callback model.
-
- . AMI_Buffering
-
- Test the buffering constraint policy when applied to AMI
- requests.
-
- . AMI_Timeouts
-
- This is a simple test for AMI callback model in combination with
- timeouts (relative roundtrip timeout policy).
-
- . Big_Oneways
-
- Stress test non-blocking I/O features in the ORB.
-
- . Big_Twoways
-
- More stress testing for the non-blocking I/O features in the
- ORB, this time also test receiving big blocks of data.
-
- . Big_Requests_Muxing
-
- More stress testing for the non-blocking I/O features in the
- ORB, this time we send reliable and unreliable oneways
- through the same connection.
-
- . Bidirectional
-
- This is a test that exercises the birectional GIOP connection
- implementation in TAO.
-
- . Bidirectional_NestedUpcall
-
- This test is similar to the $TAO_ROOT/tests/BiDirectional
- test. The only difference is that, this test uses the
- select_mt reactor, which helps the server to make calls to
- client during the upcall.
-
- . Blocking_Sync_None
-
- A regression test for [BUGID:858], verifies that SYNC_NONE
- requests never block.
-
- . CDR
-
- This directory contains several tests for the CDR stream
- class.
-
- . Client_Leaks
-
- TAO-1.1.12 leaked handles, this test tries to verify that
- the problem does not happen any longer by connecting a
- client to 1000 servers.
-
- . Codec
-
- This test verifies that CodecFactory and CDR encapsulation
- Codec support is working properly.
-
- . Collocation
-
- This program performs a series of sanity check on the
- collocation support in TAO.
-
- . Collocation_Opportunities
-
- A test for making sure the ORB avails all collocation
- opportunities it is presented with.
-
- . Connection_Purging
-
- This is a test which stress tests the connection management
- and checks whether cached handlers are purged effectively
- when the process runs out of descriptors.
-
- . Connection_Failure
-
- A simple test for connection failures. The client tries to
- connect to an non-existent server.
-
- . Crashed_Callback
-
- A regression test for callbacks, sent as a reliable oneway,
- to a server that crashes. The client used to hang on
- TAO-1.1.12.
-
- . Crash_On_Write
-
- A regression test for bug number 678. The ORB used to crash
- if an error was detected during a write() call. Between
- betas 1.1.14 and 1.1.15 the ORB would not crash but would
- dead-lock.
-
- . DLL_ORB
-
- Test that dynamically loads and unloads objects that
- implement client-side and server-side CORBA application
- code. The primary client and server binaries are completely
- decoupled from the ORB. If the test fails then it is likely
- that ORB resources were not reclaimed prior to dynamic
- unloading (i.e. finalization).
-
- . DSI_Gateway
-
- A simple test for the DSI/DII gateway support. TAO can
- optimize some demarshaling/marshaling and data copying in
- the implementation of DSI/DII based gateways.
-
- . DynAny_Test
-
- Tests TAO's DynAny feature, which allows composition and
- decomposition of arbitrarily complex CORBA::Any values at
- runtime, without requiring any compile-time knowledge of the
- IDL.
-
- . Endpoint_Per_Priority
-
- A simple test that verifies of TAO's endpoint-per-priority
- model works.
-
- . Explicit_Event_Loop
-
- This tests the methods work_pending() and perform_work()
- methods of the orb.
-
- . Exposed_Policies
-
- This directory contains a test case used to verify that the
- client exposed policies get embedded correctly in the IOR
- and exposed to the client in the object reference.
-
- . FL_Cube
-
- Test the integration of the FL toolkit and TAO.
-
- . Faults
-
- A little test to check the the ORB can handle server and
- client crashes.
-
- . Forwarding
-
- Regression test for LOCATION_FORWARD messages in the
- follower thread.
-
- . Hello
-
- Extremely simple test to establish base line and serve as
- code base for other tests.
-
- . IDL_Test
-
- A collection of the IDL examples that have caused problems
- in the past for the IDL compiler. Most files need only to
- build cleanly, except pragma.idl, which generates pragma
- prefixes. These prefixes are checked for correctness in
- main.cpp.
-
- . ior_corbaloc
-
- This is test to exercise the corbaname: style URL.
-
- . IORManipulation
-
- This program test the basic operation of TAO's
- IORManipulation interface.
-
- . InterOp-Naming
-
- This service allows the ORB to be administratively
- configured to return object references from
- CORBA::ORB::resolve_initial_references () for non-locality
- constrained objects.
-
- . Leader_Followers
-
- This is a test for server applications that have client
- threads (threads making remote calls) starting before event
- loop threads (threads running the event loop).
-
- . LongUpcalls
-
- Regression test for bugs #175 and #575
-
- . MProfile
-
- This program tests fundamentals of TAO's ORB fault tolerance
- by merging multiple profiles in a single object reference.
-
- . MProfile_Forwarding
-
- This test evalutes ORB fault tolerance support.
-
- . MT_Client
-
- This is a simple test for multi-threaded clients; it just
- creates a simple server process and runs a client with
- multiple thread sharing the same object reference.
-
- . MT_Server
-
- This is a simple test for a thread-pool server. It creates
- a server process with a variable number of threads, multiple
- clients can send requests to it, the requests are handled in
- different threads.
-
- . MT_Timeout
-
- Test the ORB timeouts in multithreaded configurations.
-
- . Multiple
-
- This test make sure that the collocation scheme works fine
- in case of diamond shaped multiple inheritance.
-
- . Multiple_Inheritance
-
- This test exercises IDL interfaces that inherit from
- multiple interfaces.
-
- . Muxing
-
- Simple test for connection muxing.
-
- . Native_Exceptions
-
- Simple test to show (and verify) that TAO can generate code
- for platforms with native exception support, including
- passing the exception around.
-
- . NestedUpcall
-
- Tests TAO's nested upcall feature, which allows
- single-threaded clients and servers to perform callbacks on
- each other without deadlocking.
-
- . Nested_Event_Loop
-
- This is a test of invoking nested event loop calls from user
- code, i.e., a call to perform_work() or run() from the
- implementation of the servant.
-
- . Oneway_Buffering
-
- A regression test for the oneway buffering features in TAO.
- It verifies that flushing based on message count, message
- sizes and timeouts work correctly.
-
- . ORB_destroy
-
- A simple ORB destruction test.
-
- . ORB_init
-
- The ORB_init test simply verifies that the CORBA::ORB_init()
- call behaves as defined in the OMG CORBA specification.
-
- . Object_Loader
-
- Regression test for the DLL-style IORs.
-
- . OctetSeq
-
- Measures the cost of marshaling and demarshaling of
- sequences of octets of different sizes. NOTE: TAO optimizes
- this so the cost should be constant!
-
- . POA
-
- Tests and illustates various Portable Object Adapter (POA)
- interfaces and their usage scenarios.
-
- . Param_Test
-
- Tests all the features of TAO's protocol engine.
-
- . Policies
-
- This is a stress test for the ORB's Policy interfaces.
-
- . Portable_Interceptors
-
- A series of tests for the Portable Interceptors feature.
-
- . QtTests
-
- This example illustrates the usage of the QtReactor from TAO.
-
- . Reliable_Oneways
-
- A regression test for reliable oneways. It is based on the
- fact that different SyncScope policies can detect different
- errors in a request.
-
- . RTCORBA
-
- A collection of tests exercising features from RTCORBA 1.0
- specification. Tests exercising TAO-specific RT features
- can be found in $TAO_ROOT/performance-tests/RTCorba.
-
- . Single_Read
-
- This is a stress test for TAO's "single read" feature.
-
- . Server_Leaks
-
- Try to make the server-side leak resources by connecting and
- disconnecting multiple clients.
-
- . Smart Proxies
-
- Tests the smart proxy feature which allows the user to
- specify a proxy in plaec of the default proxy (stub).
-
- . Strategies
-
- This test helps show the various ways in which the default
- and advanced TAO strategies can be dynamically loaded.
-
- . Timed_Buffered_Oneways
-
- This is a test for oneways with buffering and timing
- constraints.
-
- . Timeout
-
- A simple test for timeouts.
-
- . Xt_Stopwatch
-
- This example illustrates the usage of the XtReactor from
- TAO.
-
- . UNKNOWN_Exception
-
- Test of handling UNKNOWN exceptions.
diff --git a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/.cvsignore b/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/.cvsignore
deleted file mode 100644
index 9daeafb9864..00000000000
--- a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-test
diff --git a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/AO_Multiple_ORBs.mpc b/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/AO_Multiple_ORBs.mpc
deleted file mode 100644
index a72a8358a99..00000000000
--- a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/AO_Multiple_ORBs.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project: taoexe, rtportableserver {
-}
diff --git a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/run_test.pl b/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/run_test.pl
deleted file mode 100755
index ea45e3da6a3..00000000000
--- a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/run_test.pl
+++ /dev/null
@@ -1,20 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-my($T) = new PerlACE::Process ("test");
-my($test) = $T->SpawnWaitKill (20);
-my($status) = 0;
-
-if ($test != 0) {
- print STDERR "ERROR: Test failed: $test\n";
- ++$status;
-}
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp b/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp
deleted file mode 100644
index 8dd1103b673..00000000000
--- a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-// $Id$
-
-// *******************************************************************
-//
-// This test links in RTCORBA and RTPortableServer and creates two
-// distinct RT ORB's. It then activates an object using the RT POA
-// from each RT ORB. Prior to fixing the TAO_Policy_Validator,
-// activating the second object would cause a segmentation fault.
-// This was caused by the RT Policy Validator not being added correctly
-// to the ORB Core's policy validator list.
-//
-// *******************************************************************
-
-#include "tao/corba.h"
-#include "testS.h"
-
-class TestMonitorable_i: public virtual POA_Arch_Idl::Monitorable
-{
-public:
- TestMonitorable_i () {}
-};
-
-
-int main(int, char**)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- int argc = 0;
- CORBA::ORB_var orb1 =
- CORBA::ORB_init(argc, 0, "orb1" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::ORB_var orb2 =
- CORBA::ORB_init(argc, 0, "orb2" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poaObj_var =
- orb1->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POA_var rootPoa =
- PortableServer::POA::_narrow (poaObj_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POAManager_var poaManager =
- rootPoa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poaObj_var2 =
- orb2->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POA_var rootPoa2 =
- PortableServer::POA::_narrow (poaObj_var2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POAManager_var poaManager2 =
- rootPoa2->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poaManager2->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- poaManager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TestMonitorable_i* monitorable_i = 0;
- ACE_NEW_RETURN (monitorable_i, TestMonitorable_i, 1);
- PortableServer::ServantBase_var monitorable_var = monitorable_i;
-
- TestMonitorable_i* m2 = 0;
- ACE_NEW_RETURN (m2, TestMonitorable_i, 1);
- PortableServer::ServantBase_var m2_var = m2;
-
- PortableServer::ObjectId_var monitorableId1_var =
- rootPoa->activate_object (monitorable_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Object_var obj1 =
- rootPoa->id_to_reference (monitorableId1_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Arch_Idl::Monitorable_var monitorable1 =
- Arch_Idl::Monitorable::_narrow (obj1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var monitorableId2_var =
- rootPoa2->activate_object (m2_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Object_var obj2 =
- rootPoa2->id_to_reference (monitorableId2_var.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Arch_Idl::Monitorable_var monitorable2 =
- Arch_Idl::Monitorable::_narrow (obj2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.idl b/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.idl
deleted file mode 100644
index 7ad0d88103b..00000000000
--- a/TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-module Arch_Idl {
- interface Monitorable {
- };
-};
diff --git a/TAO/tests/RTCORBA/Banded_Connections/.cvsignore b/TAO/tests/RTCORBA/Banded_Connections/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Banded_Connections/README b/TAO/tests/RTCORBA/Banded_Connections/README
deleted file mode 100644
index ffca82ce136..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/README
+++ /dev/null
@@ -1,45 +0,0 @@
-$Id$
-
-This is a test for RTCORBA::PriorityBandedConnectionPolicy.
-
-Description
------------
-
-This test consists of several mini-tests, each exercising some aspect
-of PriorityBandedConnectionPolicy:
-
-(Server)
-
-- Attempt to create a POA for which the bands do not match thread
- lanes. Should get POA::InvalidPolicy exception.
-
-- Attempt to register an servant with priority that doesn't match the
- resources/configuration of that POA, i.e., its bands/lanes. Should
- get BAD_PARAM exception.
-
-(Client)
-
-- Set RTCORBA::PriorityBandedConnectionPolicy on the object where
- bands do not match server resources, i.e., threadpool lanes.
- Attempt an invocation on the object. Should get INV_POLICY
- exception.
-
-- Now attempt one more invocation on the same object (with
- CLIENT_PROPAGATED and bands), but with the client thread priority
- not matching any of the bands. Should get INV_POLICY exception.
-
-- Set RTCORBA::PriorityBandedConnectionPolicy on the object with
- CLIENT_PROPAGATED priority model where bands match server resources.
- Attempt several invocations on the object, changing the priority of
- the invoking client thread before each. This should succeed.
- Verify that correct band is being used for each invocation, and that
- appropriate server threadpool lane is providing the service.
-
-- Attempt invocation on an object with SERVER_DECLARED priority model
- and RTCORBA::PriorityBandedConnectionPolicy set using the client
- thread with priority not matching any of the object's priority
- bands. This should succeed. Verify the correct band and server
- threadpool lane are being used for the invocation.
-
-
-Check run_test.pl to see how to set up a run for this test.
diff --git a/TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc b/TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc
deleted file mode 100644
index b62ff14a3d9..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/RTCORBA_Banded_Conn.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Banded_Connections/bands.hpux b/TAO/tests/RTCORBA/Banded_Connections/bands.hpux
deleted file mode 100644
index f4b469e61f4..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/bands.hpux
+++ /dev/null
@@ -1 +0,0 @@
-16 20 21 27 28 31
diff --git a/TAO/tests/RTCORBA/Banded_Connections/bands.irix b/TAO/tests/RTCORBA/Banded_Connections/bands.irix
deleted file mode 100644
index fe403f56fda..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/bands.irix
+++ /dev/null
@@ -1 +0,0 @@
-19 23 24 28 29 33
diff --git a/TAO/tests/RTCORBA/Banded_Connections/bands.nt b/TAO/tests/RTCORBA/Banded_Connections/bands.nt
deleted file mode 100644
index 0cf0ee603ad..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/bands.nt
+++ /dev/null
@@ -1 +0,0 @@
-0 0 1 1
diff --git a/TAO/tests/RTCORBA/Banded_Connections/bands.tru64 b/TAO/tests/RTCORBA/Banded_Connections/bands.tru64
deleted file mode 100644
index fe403f56fda..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/bands.tru64
+++ /dev/null
@@ -1 +0,0 @@
-19 23 24 28 29 33
diff --git a/TAO/tests/RTCORBA/Banded_Connections/bands.unix b/TAO/tests/RTCORBA/Banded_Connections/bands.unix
deleted file mode 100644
index 14398bf3c1f..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/bands.unix
+++ /dev/null
@@ -1 +0,0 @@
-35 39 40 46 47 50
diff --git a/TAO/tests/RTCORBA/Banded_Connections/client.cpp b/TAO/tests/RTCORBA/Banded_Connections/client.cpp
deleted file mode 100644
index 248fb4b0f2e..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/client.cpp
+++ /dev/null
@@ -1,387 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/ORB_Core.h"
-#include "../check_supported_priorities.cpp"
-
-// Default IOR files.
-const char *ior1 = "file://test1.ior";
-const char *ior2 = "file://test2.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "n:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- ior1 = get_opts.opt_arg ();
- break;
- case 'o':
- ior2 = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-n <ior> "
- "-o <ior> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-CORBA::Short
-get_server_priority (Test_ptr server
- ACE_ENV_ARG_DECL)
-{
- // Get the Priority Model Policy from the stub.
- CORBA::Policy_var policy =
- server->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Narrow down to correct type.
- RTCORBA::PriorityModelPolicy_var priority_policy =
- RTCORBA::PriorityModelPolicy::_narrow (policy.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Make sure that we have the SERVER_DECLARED priority model.
- RTCORBA::PriorityModel priority_model =
- priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- if (priority_model != RTCORBA::SERVER_DECLARED)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: priority_model != "
- "RTCORBA::SERVER_DECLARED!\n"),
- -1);
-
- // Return the server priority.
- return priority_policy->server_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-invocation_exception_test (Test_ptr obj,
- CORBA::Short priority
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- // Invoke method on test object.
- obj->test_method (1,
- priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // This next line of code should not run because an exception
- // should have been raised.
- ACE_DEBUG ((LM_DEBUG, "ERROR: no exception caught\n"));
- }
- ACE_CATCH (CORBA::INV_POLICY, ex)
- {
- // Expected exception.
- ACE_DEBUG ((LM_DEBUG,
- "INV_POLICY exception is caught as expected.\n"));
- }
- ACE_CATCHANY
- {
- // Unexpected exception.
- ACE_DEBUG ((LM_DEBUG, "Error: unexpected exception caught\n"));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- // Get the RTORB.
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the RTCurrent.
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test object 1 (with CLIENT_PROPAGATED priority model).
- object =
- this->orb_->string_to_object (ior1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var client_propagated_obj =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test object 2 (with SERVER_DECLARED priority model).
- object = this->orb_->string_to_object (ior2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server_declared_obj =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test: Attempt to set priority bands that do not match server
- // resource configuration on the <client_propagated_obj>.
- // Should get INV_POLICY exception.
- ACE_DEBUG ((LM_DEBUG,
- "\n<---Test--->: Client bands do not match server lanes\n\n"));
-
- // False bands.
- RTCORBA::PriorityBands false_bands;
- false_bands.length (2);
- false_bands[0].low = 10000;
- false_bands[0].high = 10005;
- false_bands[1].low = 26000;
- false_bands[1].high = 30000;
- CORBA::PolicyList policies;
- policies.length (1);
- policies[0] =
- rt_orb->create_priority_banded_connection_policy (false_bands
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Set false bands at the object level. Note that a new object
- // is returned.
- object =
- client_propagated_obj->_set_policy_overrides (policies,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client_propagated_obj =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoking on this object with false bands should produce an
- // exception.
- invocation_exception_test (client_propagated_obj.in (),
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the correct bands from the <server_declared_obj>.
- policies[0] =
- server_declared_obj->_get_policy (RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PriorityBandedConnectionPolicy_var bands_policy =
- RTCORBA::PriorityBandedConnectionPolicy::_narrow (policies[0]);
-
- RTCORBA::PriorityBands_var bands =
- bands_policy->priority_bands ();
-
- // Set the proper bands at the object level. Note that a new
- // object is returned.
- object =
- client_propagated_obj->_set_policy_overrides (policies,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Overwrite existing <client_propagated_obj>.
- client_propagated_obj =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test: Attempt invocation on <client_propagated_obj> with
- // client thread priority not matching any of the bands. Should
- // get INV_POLICY exception.
- ACE_DEBUG ((LM_DEBUG,
- "\n<---Test--->: Client threads does not match band\n\n"));
-
- // Choose a priority one higher than the high priority of the
- // highest band.
- CORBA::Short client_priority =
- bands[bands->length () - 1].high + 1;
-
- // Reset the current thread's priority.
- current->the_priority (client_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoking on this object with an invalid client thread
- // priority should produce an exception.
- invocation_exception_test (client_propagated_obj.in (),
- client_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test: Make invocations on the <client_propagated_obj>.
- ACE_DEBUG ((LM_DEBUG,
- "\n<---Test--->: Invoking on client propagated object\n\n"));
-
- // Make an invocation for each band.
- for (CORBA::ULong i = 0;
- i < bands->length ();
- ++i)
- {
- // Select a priority in the middle of the band.
- CORBA::Short client_priority =
- (bands[i].low + bands[i].high) / 2;
-
- // Reset the current thread's priority.
- current->the_priority (client_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke test method on server.
- client_propagated_obj->test_method (1, // CLIENT_PROPAGATED
- client_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Test: Attempt invocation with the same thread priority, but
- // now on the <server_declared_obj>. This should succeed.
- ACE_DEBUG ((LM_DEBUG,
- "\n<---Test--->: Invoking on server declared object\n\n"));
-
- // Get the <server_priority> from the stub.
- CORBA::Short server_priority =
- get_server_priority (server_declared_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke test method on server.
- server_declared_obj->test_method (0, // SERVER_DECLARED
- server_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Testing over. Shut down Server ORB.
- server_declared_obj->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception in Banded_Connections test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- int result =
- parse_args (argc,
- argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception in Banded_Connections test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl b/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
deleted file mode 100755
index 20bd0533f96..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
+++ /dev/null
@@ -1,91 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile1 = PerlACE::LocalFile ("test1.ior");
-$iorfile2 = PerlACE::LocalFile ("test2.ior");
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-print STDERR "\n********** RTCORBA Priority Banded Connections Unit Test\n";
-
-# Different priority values for the bands on each OS.
-
-if ($^O eq "MSWin32") {
- $server_args =
- "-b bands.nt";
-}
-elsif ($^O eq "dec_osf") {
- $server_args =
- "-b bands.tru64";
-}
-elsif ($^O eq "hpux") {
- $server_args =
- "-b bands.hpux";
-}
-elsif ($^O eq "irix") {
- $server_args =
- "-b bands.irix";
-}
-else {
- $server_args =
- "-b bands.unix";
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", $server_args);
-}
-else {
- $SV = new PerlACE::Process ("server", $server_args);
-}
-$CL = new PerlACE::Process ("client", "-n file://$iorfile1 -o file://$iorfile2");
-
-$SV->Spawn();
-if (PerlACE::waitforfile_timed ($iorfile2, $PerlACE::wait_interval_for_process_creation) == -1)
-{
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill ();
- exit 1;
- }
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (30);
-
-if ($server != 0)
-{
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-# Clean up SHMIOP files
-PerlACE::check_n_cleanup_files ("server_shmiop_*");
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Banded_Connections/server.cpp b/TAO/tests/RTCORBA/Banded_Connections/server.cpp
deleted file mode 100644
index b45fef9cba9..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/server.cpp
+++ /dev/null
@@ -1,632 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-class Test_i : public POA_Test
-{
-public:
- Test_i (CORBA::ORB_ptr orb,
- RTCORBA::PriorityBands &bands
- ACE_ENV_ARG_DECL);
-
- void test_method (CORBA::Boolean client_propagated,
- CORBA::Short priority
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- RTCORBA::PriorityBands &bands_;
- RTCORBA::Current_var rt_current_;
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb,
- RTCORBA::PriorityBands &bands
- ACE_ENV_ARG_DECL)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- bands_ (bands),
- rt_current_ ()
-{
- // We resolve and store the RT Current for later use.
- CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->rt_current_ =
- RTCORBA::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Test_i::test_method (CORBA::Boolean client_propagated,
- CORBA::Short client_priority
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the upcall thread's priority.
- CORBA::Short server_priority =
- this->rt_current_->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Check which policy we are dealing with.
- if (!client_propagated)
- {
- // With the SERVER_DECLARED priority model, <client_priority> is
- // simply the priority associated with the priority propagation
- // policy in the IOR. This should match the priority we get run
- // at.
- ACE_ASSERT (server_priority == client_priority);
-
- ACE_DEBUG ((LM_DEBUG,
- "Using SERVER_DECLARED policy: request processed at priority %d\n",
- server_priority));
- }
- else
- {
- // We are using the CLIENT_DECLARED policy, both the client
- // priority and the server priority should fall within the
- // bands. Note that it may be the case that the server priority
- // is not exactly the same as the client priority since we are
- // using thread pools with lanes.
- //
- // Print out the bands.
- int index = -1;
- ACE_DEBUG ((LM_DEBUG,
- "\nPriority Bands: \n"));
- for (CORBA::ULong i = 0; i < this->bands_.length (); ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%d) %d %d\n",
- (i + 1),
- this->bands_[i].low,
- this->bands_[i].high));
-
- // Check which band we are using.
- if (client_priority <= this->bands_[i].high &&
- client_priority >= this->bands_[i].low &&
- server_priority <= this->bands_[i].high &&
- server_priority >= this->bands_[i].low)
- index = i + 1;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Client priority: %d "
- "Server processing request at priority: %d\n",
- client_priority,
- server_priority));
-
- if (index == -1)
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: object and thread priorities do not "
- "match the same band.\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "Band %d was used for this invocation\n", index));
- }
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-//*************************************************************************
-
-const char *bands_file = "bands";
-const char *ior_output_file1 = "test1.ior";
-const char *ior_output_file2 = "test2.ior";
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "b:o:n:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- ior_output_file1 = get_opts.opt_arg ();
- break;
-
- case 'o':
- ior_output_file2 = get_opts.opt_arg ();
- break;
-
- case 'b':
- bands_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-n <iorfile1> "
- "-o <iorfile2> "
- "-b <bands_file> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-get_priority_bands (RTCORBA::PriorityBands &bands)
-{
- //
- // Read bands from a file.
- //
- FILE* file =
- ACE_OS::fopen (bands_file, "r");
-
- if (file == 0)
- return -1;
-
- ACE_Read_Buffer reader (file, 1);
-
- char *string =
- reader.read (EOF, ' ', '\0');
-
- if (string == 0)
- return -1;
-
- CORBA::ULong bands_length =
- (reader.replaced () + 1) / 2;
- bands.length (bands_length);
-
- int result = 1;
- char* working_string = string;
- for (CORBA::ULong i = 0; i < bands_length; ++i)
- {
- result = ::sscanf (working_string,
- "%hd",
- &bands[i].low);
- if (result == 0 || result == EOF)
- break;
-
- working_string += ACE_OS::strlen (working_string);
- working_string += 1;
-
- result = ::sscanf (working_string,
- "%hd",
- &bands[i].high);
- if (result == 0 || result == EOF)
- break;
-
- working_string += ACE_OS::strlen (working_string);
- working_string += 1;
-
- if (bands[i].low > bands[i].high)
- {
- result = 0;
- break;
- }
- }
-
- reader.alloc ()->free (string);
-
- if (result == 0 || result == EOF)
- return -1;
- else
- return 0;
-}
-
-int
-create_object (PortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb,
- Test_i *server_impl,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- // Register servant with the POA.
- PortableServer::ObjectId_var id;
- id = poa->activate_object (server_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create object reference.
- CORBA::Object_var server =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Print out the IOR.
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Print ior to the file.
- if (filename != 0)
- {
- FILE *output_file =
- ACE_OS::fopen (filename, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- return 0;
-}
-
-void
-object_activation_exception_test (RTPortableServer::POA_ptr poa,
- Test_i *server_impl,
- CORBA::Short priority
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- // Register servant with POA.
- PortableServer::ObjectId_var id =
- poa->activate_object_with_priority (server_impl,
- priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // This next line of code should not run because an exception
- // should have been raised.
- ACE_DEBUG ((LM_DEBUG, "ERROR: no exception caught\n"));
- }
- ACE_CATCH (CORBA::BAD_PARAM, ex)
- {
- // Expected exception.
- ACE_DEBUG ((LM_DEBUG,
- "BAD_PARAM exception is caught as expected.\n"));
- }
- ACE_CATCHANY
- {
- // Unexpected exception.
- ACE_DEBUG ((LM_DEBUG, "ERROR: unexpected exception caught\n"));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-poa_creation_exception_test (PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr manager,
- CORBA::PolicyList &policies
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- // Create a POA with invalid policies.
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("Child_POA",
- manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // This next line of code should not run because an exception
- // should have been raised.
- ACE_DEBUG ((LM_DEBUG, "ERROR: no exception caught\n"));
- }
- ACE_CATCH (PortableServer::POA::InvalidPolicy, ex)
- {
- // Expected exception.
- ACE_DEBUG ((LM_DEBUG,
- "InvalidPolicy exception is caught as expected.\n"));
- }
- ACE_CATCHANY
- {
- // Unexpected exception.
- ACE_DEBUG ((LM_DEBUG, "ERROR: unexpected exception\n"));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-main (int argc, char *argv[])
-{
- CORBA::ORB_var orb;
-
- ACE_TRY_NEW_ENV
- {
- // Initialize ORB.
- orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- int result =
- parse_args (argc,
- argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Get the RTORB.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the RootPOA.
- object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POA Manager.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Obtain priority bands to be used in this test from the file
- // specified by the user.
- RTCORBA::PriorityBands bands;
- result = get_priority_bands (bands);
- if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error reading priority bands from file\n"),
- result);
-
- // Create a thread-pool.
- CORBA::ULong stacksize = 0;
- CORBA::Boolean allow_request_buffering = 0;
- CORBA::ULong max_buffered_requests = 0;
- CORBA::ULong max_request_buffer_size = 0;
- CORBA::Boolean allow_borrowing = 0;
- CORBA::ULong static_threads = 1;
- CORBA::ULong dynamic_threads = 0;
-
- // The lanes in the pool should match the bands.
- RTCORBA::ThreadpoolLanes lanes;
- lanes.length (bands.length ());
-
- // For each band, setup up a thread lane.
- for (CORBA::ULong i = 0;
- i < bands.length ();
- ++i)
- {
- lanes[i].static_threads = static_threads;
- lanes[i].dynamic_threads = dynamic_threads;
-
- // Lane priority is in the middle of the band priorities.
- lanes[i].lane_priority =
- (bands[i].low + bands[i].high) / 2;
- }
-
- // Create the thread-pool.
- RTCORBA::ThreadpoolId threadpool_id =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test: Attempt to create a POA with priority bands that do not
- // match the lanes. Should get POA::InvalidPolicy exception.
- ACE_DEBUG ((LM_DEBUG,
- "\n<---Test--->: Bands do not match lanes\n\n"));
-
- // False bands.
- RTCORBA::PriorityBands false_bands (bands);
- false_bands[0].low = 10000;
- false_bands[0].high = 10005;
-
- CORBA::PolicyList poa_policy_list;
- poa_policy_list.length (2);
-
- // Create a bands policy.
- poa_policy_list[0] =
- rt_orb->create_priority_banded_connection_policy (false_bands
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a thread-pool policy.
- poa_policy_list[1] =
- rt_orb->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Try to create a POA with invalid policies. Should throw an
- // exception.
- poa_creation_exception_test (root_poa.in (),
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Two policies for the next POA.
- poa_policy_list.length (2);
-
- // Create a priority model policy.
- poa_policy_list[0] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a thread-pool policy.
- poa_policy_list[1] =
- rt_orb->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA with CLIENT_PROPAGATED priority model, with lanes
- // but no bands.
- PortableServer::POA_var client_propagated_poa =
- root_poa->create_POA ("client_propagated_poa",
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Three policies for the next POA.
- poa_policy_list.length (3);
-
- // Default POA priority comes from the 'middle' lane's priority.
- CORBA::Short poa_priority =
- lanes[lanes.length () / 2].lane_priority;
-
- // Create a priority model policy.
- poa_policy_list[0] =
- rt_orb->create_priority_model_policy (RTCORBA::SERVER_DECLARED,
- poa_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a bands policy.
- poa_policy_list[1] =
- rt_orb->create_priority_banded_connection_policy (bands
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a thread-pool policy.
- poa_policy_list[2] =
- rt_orb->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA with SERVER_DECLARED priority model, with bands
- // and lanes.
- PortableServer::POA_var server_declared_poa =
- root_poa->create_POA ("server_declared_poa",
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test: Attempt to register an object with priority that
- // doesn't match lanes. Should get BAD_PARAM exception.
- ACE_DEBUG ((LM_DEBUG,
- "\n<---Test--->: Servant priority does not match lanes\n\n"));
-
- RTPortableServer::POA_var rt_server_declared_poa =
- RTPortableServer::POA::_narrow (server_declared_poa.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Activation with incorrect priority should fail.
- CORBA::Short wrong_priority = 10000;
- object_activation_exception_test (rt_server_declared_poa.in (),
- 0,
- wrong_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create first servant and register with <client_propagated_poa>.
- Test_i server_impl (orb.in (),
- bands
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- result = create_object (client_propagated_poa.in (),
- orb.in (),
- &server_impl,
- ior_output_file1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- // Create second servant and register with <server_declared_poa>.
- Test_i server_impl2 (orb.in (),
- bands
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- result = create_object (server_declared_poa.in (),
- orb.in (),
- &server_impl2,
- ior_output_file2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- // Activate POA manager.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Run ORB.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Destroy ORB.
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::INTERNAL, exception)
- {
- int minor_code =
- exception.minor ();
-
- if (errno == EPERM)
- {
- if (ACE_BIT_ENABLED (minor_code, TAO_RTCORBA_THREAD_CREATION_LOCATION_CODE))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: would expect that TAO_RTCORBA_THREAD_CREATION_LOCATION_CODE "
- "minor code is set, minor code is %d",
- TAO_RTCORBA_THREAD_CREATION_LOCATION_CODE), -1);
- }
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in Banded_Connections test server:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Banded_Connections/svc.conf b/TAO/tests/RTCORBA/Banded_Connections/svc.conf
deleted file mode 100644
index 2154375e265..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# No options required for regular testing
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/Banded_Connections/svc.conf.xml b/TAO/tests/RTCORBA/Banded_Connections/svc.conf.xml
deleted file mode 100644
index b589f90605b..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/svc.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- No options required for regular testing -->
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Banded_Connections/test.idl b/TAO/tests/RTCORBA/Banded_Connections/test.idl
deleted file mode 100644
index ae526bbfd2f..00000000000
--- a/TAO/tests/RTCORBA/Banded_Connections/test.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method (in boolean client_propagated,
- in short client_priority);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/Client_Propagated/.cvsignore b/TAO/tests/RTCORBA/Client_Propagated/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.cpp b/TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.cpp
deleted file mode 100644
index d57bc36ba7f..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#include "Client_ORBInitializer.h"
-#include "interceptors.h"
-
-ACE_RCSID (Client_Propagated, Client_ORBInitializer, "$Id$")
-
-Client_ORBInitializer::Client_ORBInitializer (void)
-{
-}
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::String_var orb_id =
- info->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the Echo client request interceptor
- ACE_NEW_THROW_EX (interceptor,
- Client_Request_Interceptor (orb_id.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.h b/TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.h
deleted file mode 100644
index 569419fb346..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/Client_ORBInitializer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-//
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Client ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
- /// Constructor
- Client_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/TAO/tests/RTCORBA/Client_Propagated/README b/TAO/tests/RTCORBA/Client_Propagated/README
deleted file mode 100644
index 1279b901967..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/README
+++ /dev/null
@@ -1,50 +0,0 @@
-$Id$
-
-This is a unit test for RTCORBA::CLIENT_PROPAGATED priority model.
-
-Scenario:
---------
-
-Server creates a POA with RTCORBA::CLIENT_PROPAGATED priority model
-policy and registers a servant with it. Client obtains the object
-reference and verifies that it does have the RTCORBA::CLIENT_PROPAGATED
-priority model set. Client then performs several invocations on the
-object, changing the priority of its thread before each. The client
-also passes its thread priority as an argument to each operation.
-For each invocation, the servant checks that it's thread priority is
-equivalent to the priority of the invoking client thread, which we know
-from the operation argument. In addition, the server verifies that
-it's starting thread priority (before entering ORB event loop) is the
-same as it's ending thread priority (ater ORB shutdown), to insure
-that the thread servicing the requests at client propagated priority
-is always returned to its original priority.
-
-To run (on Unix):
--------
-$./server
-$./client
-
-Options:
---------
-server [-o ior_output_file]
-client [-k server_ior]
-
-Expected output:
-----------------
-Client executable produces no output (unless there are errors).
-Server should produces the following if there are no errors (the
-priority numbers may differ from platform to platform):
-
-$server
-Activated as <IOR:010000000d00000049444c3a546573743a312e300000000001000000000000
-00a6000000010102cd15000000636f727269646f2e63732e777573746c2e65647500cde304230000
-0014010f004e5354c5c9a539bd0105000100000001000000000000000100000001000000cd040000
-00000000000800000001cdcdcd004f4154010000001400000001cdcdcd0100010000000000090101
-0000000000004f41540400000001cd0000020000001a00000001cdcdcd01000000020041540a0000
-0001cdcdcd000000000000>
-
-Client priority: 0 Servant thread priority: 0
-Client priority: 1 Servant thread priority: 1
-Client priority: 2 Servant thread priority: 2
-Server ORB event loop finished
-Final priority of the servant thread = its initial priority
diff --git a/TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc b/TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc
deleted file mode 100644
index 9f0ce92c6ea..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/RTCORBA_Client_Propagated.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client, interceptors {
- after += *Server
- Source_Files {
- testC.cpp
- interceptors.cpp
- Client_ORBInitializer.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Client_Propagated/client.cpp b/TAO/tests/RTCORBA/Client_Propagated/client.cpp
deleted file mode 100644
index dc1fe8657cd..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/client.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Task.h"
-#include "tao/ORB_Core.h"
-#include "Client_ORBInitializer.h"
-#include "tao/ORBInitializer_Registry.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTCORBA/Priority_Mapping_Manager.h"
-#include "ace/Get_Opt.h"
-#include "../check_supported_priorities.cpp"
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- ior),
- -1);
- }
-
- // Check that the object is configured with CLIENT_PROPAGATED
- // PriorityModelPolicy.
- CORBA::Policy_var policy =
- server->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PriorityModelPolicy_var priority_policy =
- RTCORBA::PriorityModelPolicy::_narrow (policy.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (priority_policy.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Priority Model Policy not exposed!\n"),
- -1);
-
- RTCORBA::PriorityModel priority_model =
- priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (priority_model != RTCORBA::CLIENT_PROPAGATED)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: priority_model != "
- "RTCORBA::CLIENT_PROPAGATED!\n"),
- -1);
-
- // Make several invocation, changing the priority of this thread
- // for each.
- object =
- this->orb_->resolve_initial_references ("RTCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = this->orb_->resolve_initial_references ("PriorityMappingManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::PriorityMappingManager_var mapping_manager =
- RTCORBA::PriorityMappingManager::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PriorityMapping *pm =
- mapping_manager->mapping ();
-
- int sched_policy =
- this->orb_->orb_core ()->orb_params ()->ace_sched_policy ();
-
- int max_priority =
- ACE_Sched_Params::priority_max (sched_policy);
- int min_priority =
- ACE_Sched_Params::priority_min (sched_policy);
-
- CORBA::Short native_priority =
- (max_priority + min_priority) / 2;
-
- CORBA::Short desired_priority = 0;
-
- if (pm->to_CORBA (native_priority, desired_priority) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot convert native priority %d to corba priority\n",
- native_priority),
- -1);
-
- for (int i = 0; i < 3; ++i)
- {
- current->the_priority (desired_priority ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Short priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (desired_priority != priority)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Unable to set thread "
- "priority to %d\n", desired_priority),
- -1);
-
-
- server->test_method (priority ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- desired_priority++;
- }
-
- // Shut down Server ORB.
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::DATA_CONVERSION, ex)
- {
- ACE_PRINT_EXCEPTION(ex,
- "Most likely, this is due to the in-ability "
- "to set the thread priority.");
- return -1;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Register the interceptors to check for the RTCORBA
- // service contexts in the reply messages.
- PortableInterceptor::ORBInitializer_ptr temp_initializer;
-
- ACE_NEW_RETURN (temp_initializer,
- Client_ORBInitializer,
- -1); // No exceptions yet!
- PortableInterceptor::ORBInitializer_var initializer =
- temp_initializer;
-
- PortableInterceptor::register_orb_initializer (initializer.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize and obtain reference to the Test object.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Client_Propagated/interceptors.cpp b/TAO/tests/RTCORBA/Client_Propagated/interceptors.cpp
deleted file mode 100644
index bd250e433e7..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/interceptors.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-// $Id$
-
-#include "interceptors.h"
-#include "tao/OctetSeqC.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Client_Propagated,
- interceptors,
- "$Id$")
-
-Client_Request_Interceptor::
-Client_Request_Interceptor (const char *id)
- : myname_ ("Client_Request_Interceptor"),
- orb_id_ (CORBA::string_dup (id))
-{
-}
-
-Client_Request_Interceptor::~Client_Request_Interceptor (void)
-{
-}
-
-char *
-Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->myname_);
-}
-
-void
-Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Do Nothing
-}
-
-void
-Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- // Do Nothing
-}
-
-void
-Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- ACE_TRY
- {
- // Try to get the RTCorbaPriority context. If its not there,
- // report the fact via an exception.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (IOP::RTCorbaPriority ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
-
- ACE_DEBUG ((LM_DEBUG, "EXCEPTION was most likely caused by the lack "
- "of an IOP::RTCorbaPriority context in the reply.\n"));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
-
-}
-
-void
-Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-
- if (CORBA::is_nil (this->orb_.in ()))
- {
- int argc = 0;
- this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "%s.received_exception "
- "from \"%s\" on object: %s\n",
- this->myname_,
- operation.in (),
- ior.in ()));
- ACE_CHECK;
-
- // Try to get the RTCorbaPriority context. If its not there,
- // report the fact via an exception.
- IOP::ServiceContext_var sc =
- ri->get_reply_service_context (IOP::RTCorbaPriority ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/RTCORBA/Client_Propagated/interceptors.h b/TAO/tests/RTCORBA/Client_Propagated/interceptors.h
deleted file mode 100644
index 414fa636345..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/interceptors.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef INTERCEPTORS_H
-#define INTERCEPTORS_H
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
- /// Client-side interceptor. Verifies presense of RTCORBA priority
- /// context in the reply messages.
-public:
- Client_Request_Interceptor (const char *orb_id);
- // ctor.
-
- virtual ~Client_Request_Interceptor ();
- // dtor.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Canonical name of the interceptor.
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
-private:
- const char *myname_;
-
- CORBA::String_var orb_id_;
- // The ID of the ORB where this interceptor was created, usually
- // obtained from the ORBInitInfo
-
- CORBA::ORB_var orb_;
-};
-
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_INTERCEPTORS_H */
diff --git a/TAO/tests/RTCORBA/Client_Propagated/run_test.pl b/TAO/tests/RTCORBA/Client_Propagated/run_test.pl
deleted file mode 100755
index 1f218402506..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/run_test.pl
+++ /dev/null
@@ -1,64 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-print STDERR "\n RTCORBA CLIENT_PROPAGATED Priority Unit Test\n\n";
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", , "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", , "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1)
-{
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
- }
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0)
-{
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0)
-{
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Client_Propagated/server.cpp b/TAO/tests/RTCORBA/Client_Propagated/server.cpp
deleted file mode 100644
index 463429c1312..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/server.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-class Test_i : public POA_Test
-{
- // = TITLE
- // An implementation for the Test interface in test.idl
- //
-public:
- Test_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Test methods.
- void test_method (CORBA::Short priority
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::test_method (CORBA::Short priority
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Use RTCurrent to find out the CORBA priority of the current
- // thread.
-
- CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("RTCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (obj.in ()))
- ACE_THROW (CORBA::INTERNAL ());
-
- CORBA::Short servant_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Print out the info.
- if (servant_thread_priority != priority)
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: servant thread priority is not equal "
- "to method argument.\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Client priority: %d "
- "Servant thread priority: %d\n",
- priority, servant_thread_priority));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-//*************************************************************************
-
-const char *ior_output_file = "test.ior";
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Panic <RootPOA> is nil\n"),
- -1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = this->orb_->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA with CLIENT_PROPAGATED PriorityModelPolicy,
- // and register Test object with it.
- CORBA::PolicyList poa_policy_list;
- poa_policy_list.length (1);
- poa_policy_list[0] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("Child_POA",
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_i server_impl (this->orb_.in ());
-
- PortableServer::ObjectId_var id =
- child_poa->activate_object (&server_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server =
- child_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Print Object IOR.
- CORBA::String_var ior =
- this->orb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n\n", ior.in ()));
-
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Get the initial priority of the current thread.
- CORBA::Short initial_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Run ORB Event loop.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n"));
-
- // Get the final priority of the current thread.
- CORBA::Short final_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (final_thread_priority != initial_thread_priority)
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: Priority of the servant thread "
- "has been permanently changed!\n"
- "Initial priority: %d Final priority: %d\n",
- initial_thread_priority, final_thread_priority));
- else
- ACE_DEBUG ((LM_DEBUG,
- "Final priority of the servant thread"
- " = its initial priority\n"));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Standard initialization:
- // parse arguments and get all the references (ORB,
- // RootPOA, RTORB, RTCurrent, POAManager).
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Client_Propagated/svc.conf b/TAO/tests/RTCORBA/Client_Propagated/svc.conf
deleted file mode 100644
index 2154375e265..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# No options required for regular testing
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/Client_Propagated/svc.conf.xml b/TAO/tests/RTCORBA/Client_Propagated/svc.conf.xml
deleted file mode 100644
index b589f90605b..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/svc.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- No options required for regular testing -->
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Client_Propagated/test.idl b/TAO/tests/RTCORBA/Client_Propagated/test.idl
deleted file mode 100644
index ce79aec2ee7..00000000000
--- a/TAO/tests/RTCORBA/Client_Propagated/test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method (in short priority);
- // Print out the CORBA priority of the servant thread and check that
- // it is equal to the <priority> argument.
-
- oneway void shutdown ();
- // Shut down the ORB.
-};
diff --git a/TAO/tests/RTCORBA/Client_Protocol/.cvsignore b/TAO/tests/RTCORBA/Client_Protocol/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Client_Protocol/README b/TAO/tests/RTCORBA/Client_Protocol/README
deleted file mode 100644
index 6f377eb2bd5..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/README
+++ /dev/null
@@ -1,141 +0,0 @@
-$Id$
-
-This is a unit test for RTCORBA::ClientProtocolPolicy.
-
-Description:
----------
-This test consists of five mini-tests, each exercising
-ClientProtocolPolicy in a different configuration:
-
-1. Invoke an operation on the object that had ClientProtocolPolicy set
- on the server side. Make sure the protocol dictated by the policy is
- used for communication.
-
-2. Set ORB-level ClientProtocolPolicy override on the client ORB, and
- invoke an operation on an object that had ClientProtocolPolicy set
- on the server side. Should receive CORBA::INV_POLICY exception
- since the policy is set on both client and server sides.
-
-3. Set ORB-level ClientProtocolPolicy override on the client ORB, and
- invoke an operation on an object that did *not* have
- ClientProtocolPolicy set on the server side. Make sure the
- protocol dictated by the policy override is used for communication.
-
-4. Set ClientProtocolPolicy override on the Current level in the
- client ORB, and invoke an operation on an object that did *not*
- have ClientProtocolPolicy set on the server. The override value is
- a sequence of protocols none of which are available in the server
- ORB. Should receive CORBA::INV_POLICY exception since none of the
- protocols specified in the policy are available for communication.
-
-5. Set ClientProtocolPolicy override on the Current level in the
- client ORB, and invoke an operation on an object that did *not*
- have ClientProtocolPolicy set on the server. The override value is
- a sequence of two protocols, in which the first protocol isn't
- available in the server ORB, and the second protocol is available
- in both client and server ORBs. Make sure the second protocol
- specified in the override is used for communication.
-
-
-Scenario:
-
-The server creates two objects: one with ClientProtocolPolicy set and
-the other one without the policy being set. The value of the
-ClientProtocolPolicy is a single protocol specified using server
-command-line option (see Options section below). The client obtains
-two object references and uses them to run five tests decribed
-above. Finally, the client invokes <shutdown> method on the server to
-terminate the processes.
-
-To run (on Unix):
--------
-$./server [-s <ior_output_file1> -c <ior_output_file2> -p <profile_id>]
-$./client [-s <ior1> -c <ior2> -p <profile_id>] -ORBdebuglevel 1
-
-
-Options:
---------
- Server:
-
--s <ior_output_file1> Default: test1.ior
- Filename for output of IOR for the object that
- had ClientProtocolPolicy set on the server.
-
--c <ior_output_file2> Default: test2.ior
- Filename for output of IOR for the object that
- did not have ClientProtocolPolicy set on the
- server.
-
--p <profile_id> Default: 0 (IIOP)
- Protocol used as a ClientProtocolPolicy value
- for one of the server's objects.
-
- Client:
-
--s <ior_output_file1> Default: file://test1.ior
- IOR for the object that had
- ClientProtocolPolicy set on the server.
-
--c <ior_output_file2> Default: file://test2.ior
- IOR for the object that did not have
- ClientProtocolPolicy set on the server.
-
--p <profile_id> Default: 0 (IIOP)
- Protocol used as a ClientProtocolPolicy value
- on the client.
-
--ORBdebuglevel 1 Recommended ORB option for the client in order to see
- which protocols are being used in each
- mini-test for client-server communication.
-
-
-
-Expected output:
-----------------
-Test 1: invocation should succeed using the protocol specified with
- <-p> option to the server.
-Tests 2 and 4: should produce INV_POLICY exception.
-Tests 3 and 5: invocation should succeed using the protocol specified
- with <-p> option to the client.
-
-Below is the expected output from run_test.pl on a Unix platform. See
-run_test.pl for command-line options used for client and server.
-NOTE: expected output differs on windows due to UIOP not being
-available.
-
-
-********** RTCORBA Client Protocol Policy Unit Test
-
-
-Activated object one as <IOR:000000000000000d49444c3a546573743a312e30000000000000000012000010200000000116163652e63732e777573746c2e6564750000c62d00000023439e940eb000e405a000000010000000100000000000000010000000100000000040000000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000000004000000116163652e63732e777573746c2e6564750000c62d00000000000000116167573746c2e6564750000c62d00000000000000116163652e63732e777573746c2e656475000000000126163652e646f632e777573746c2e65647500c62d0000000000000002000000240000041000500000014000000000000000154414f00000100000001000054414f00000000d0000102661722f746d702f54414f414141514d614f53580000000000002314010f004e535439e940eb00100000001000000000000000100000001000000000400000000000000080000000054414f00014000000000001000100000000000101090000000054414f020000002400000000000000010722f746d702f54414f414141514d614f535800000000000002000000240000000000000001544000000000000000154414f00000100000001000054414f02000000cc00010200000000116167573746c2e6564750061c62e0000002314010f004e535439e940eb000e405a000000010000000000100000001000000000400000000000000080000000054414f00000000010000001400000000000000101090000000054414f02000000220000000000000001000000116163652e63732e564750000c62e00004f5300000002000000240000000000000001544100050000001400000004f000001000000010000>
-
-
-Activated object two as <IOR:000000000000000d49444c3a546573743a312e3000000000000000000ea00010200000000116163652e63732e777573746c2e6564750000c62d0000001b439e940eb000e257a000000000000000100000001000000000300000000000000080000000050100000014000000000001000100000000000101090000000054414f0200000076000000000016163652e63732e777573746c2e6564750000c62d00000000000000116163652e63732e777570009c62d0000cb40000000116163652e63732e777573746c2e6564750000c62d00000000000046f632e777573746c2e65647500c62d0000000054414f000000009c00010200000000162f76654414f414141514d614f535800001b0000001b14010f0052535439e940eb000e257a00000000001030000000300000000000000080000000054414f00000000010000001400000000000100001090000000054414f02000000240000000000000001000000162f7661722f746d702f54414ff535800000054414f020000009600010200000000116163652e63732e777573746c2e65647501b14010f0052535439e940eb000e257a00000000000000010000000100000000030000000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000000001000000116163652e63732e777573746c2e6564750063c62e0000>
-
-TAO (25450|1) Loaded default protocol <IIOP_Factory>
-TAO (25450|1) Loaded default protocol <UIOP_Factory>
-TAO (25450|1) Loaded default protocol <SHMIOP_Factory>
-
- Test 1
-TAO (25450|1) Connector::connect - looking for UIOP connection.
-TAO (25450|1) UIOP connection to server <> on 8
-Test method invoked on the sever
-
- Test 2
-INV_POLICY exception is caught as expected.
-
- Test 3
-TAO (25450|1) Connector::connect - looking for SHMIOP connection.
-TAO (25450|1) SHMIOP connection to server <127.0.0.1:50734> on 9
-Test method invoked on the sever
-
- Test 4
-INV_POLICY exception is caught as expected.
-
- Test 5
-TAO (25450|1) Connector::connect - looking for SHMIOP connection.
-Test method invoked on the sever
-
- Testing over
-TAO (25450|1) Connector::connect - looking for SHMIOP connection.
-Server ORB event loop finished
diff --git a/TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc b/TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc
deleted file mode 100644
index e51a077e7fe..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/RTCORBA_Client_Protocol.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Client_Protocol/client.cpp b/TAO/tests/RTCORBA/Client_Protocol/client.cpp
deleted file mode 100644
index 2ef31055c8f..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/client.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/RTCORBA/RTCORBA.h"
-
-#include "tao/Strategies/advanced_resource.h"
-
-const char *ior1 = "file://test1.ior";
-const char *ior2 = "file://test2.ior";
-CORBA::ULong protocol_type = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "s:c:p:");
- int c, result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 's':
- ior1 = get_opts.opt_arg ();
- break;
- case 'c':
- ior2 = get_opts.opt_arg ();
- break;
- case 'p':
- result = ::sscanf (get_opts.opt_arg (),
- "%u",
- &protocol_type);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-p> option"),
- -1);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-s <ior> "
- "-c <ior> "
- "-p <protocol_type> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-void
-exception_test (Test_ptr server,
- const char *msg
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- server->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::INV_POLICY, ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "INV_POLICY exception is caught as expected.\n"));
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG, msg));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB, resolve references and parse arguments.
-
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RTORB.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return -1;
-
- // PolicyManager.
- object = orb->resolve_initial_references ("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (policy_manager.in (), "PolicyManager")
- == -1)
- return -1;
-
- // PolicyCurrent.
- object = orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (policy_current.in (), "PolicyCurrent")
- == -1)
- return -1;
-
- // Test object 1 (ClientProtocolPolicy set on server).
- object = orb->string_to_object (ior1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Test_var server1 = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server1.in (), "server1") == -1)
- return -1;
-
- // Test object 2 (no client-exposed ClientProtocolPolicy).
- object = orb->string_to_object (ior2 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Test_var server2 = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server2.in (), "server2") == -1)
- return -1;
-
- // Do testing.
-
- // Test 1: Invoke operation on the object that has
- // ClientProtocolPolicy set on the server side.
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 1\n"));
- server1->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test 2: Set the ORB-level ClientProtocolPolicy override, and
- // attempt the same invocation again. Should get
- // CORBA::INV_POLICY exception since the policy is set on both
- // client and server sides.
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 2\n"));
- RTCORBA::ProtocolList protocols;
- protocols.length (1);
- protocols[0].protocol_type = protocol_type;
- protocols[0].transport_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
- protocols[0].orb_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
-
- CORBA::PolicyList policy_list;
- policy_list.length (1);
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- exception_test (server1.in (),
- "ERROR: Test 2 failed\n" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test 3: Attempt the invocation on the second object reference
- // (the one that didn't have ClientProtocolPolicy set on the
- // server side). This should succeed since there are no
- // conflicts.
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 3\n"));
- server2->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test 4: Override ClientProtocolPolicy on the Current level.
- // For the override value, use the sequence of protocols, none
- // of which are available in the server ORB. Attempt an
- // invocation on the second object. Should get
- // CORBA::INV_POLICY exception since none of the protocols
- // specified in the policy are available.
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 4\n"));
- // Hardcode a sequence of nonexistent protocols.
- protocols.length (3);
- protocols[0].protocol_type = 3;
- protocols[1].protocol_type = 4;
- protocols[2].protocol_type = 5;
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- exception_test (server2.in (),
- "ERROR: Test 4 failed\n" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test 5: Override ClientProtocolPolicy on the Current level
- // again. This time use the sequence in which the first
- // protocol isn't available and the second one is. The
- // invocation should succeed through using the second protocol.
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 5\n"));
- protocols.length (2);
- protocols[0].protocol_type = 3;
- protocols[1].protocol_type = protocol_type;
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server2->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Testing over. Shut down server ORB.
- ACE_DEBUG ((LM_DEBUG,
- "\n Testing over\n"));
- server2->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Needed for SHMIOP to work fine. Please dont remove. Please
- // see Bug 1197 for details.
- ACE_OS::sleep (5);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in ClientProtocolPolicy test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Client_Protocol/run_test.pl b/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
deleted file mode 100755
index 9b548f0ff8b..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
+++ /dev/null
@@ -1,78 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile1 = PerlACE::LocalFile ("test1.ior");
-$iorfile2 = PerlACE::LocalFile ("test2.ior");
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-print STDERR "\n********** RTCORBA Client Protocol Policy Unit Test\n\n";
-
-# Arguments are platform-dependent (UIOP not available on Windows).
-$server_args =
- (PerlACE::is_vxworks_test() ? "" : (($^O eq "MSWin32") ? "-p 1413566210 " : "-p 1413566208 "))
- ."-ORBendpoint iiop:// "
- .(PerlACE::is_vxworks_test() ? "" : "-ORBendpoint shmiop:// ")
- .(($^O eq "MSWin32") ? "" : "-ORBEndpoint uiop:// ");
-$client_args =
- "-s file://$iorfile1 -c file://$iorfile2 "
- .(($^O eq "MSWin32") ? "" : "-p 1413566210 ")
- ."-ORBdebuglevel 1 ";
-
-#if ($^O eq "MSWin32") {
-# $server_args =
-# "-p 1413566210 "
-# ."-ORBendpoint iiop:// -ORBendpoint shmiop:// ";
-# $client_args =
-# "-s file://$iorfile1 -c file://$iorfile2 -ORBdebuglevel 1";
-#}
-
-# Start server.
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-s test1.ior -c test2.ior $server_args");
-}
-else {
- $SV = new PerlACE::Process ("server", "-s $iorfile1 -c $iorfile2 $server_args");
-}
-$CL = new PerlACE::Process ("client", $client_args);
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile2, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill ();
- exit 1;
-}
-
-# Start client.
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-# Clean up SHMIOP files
-PerlACE::check_n_cleanup_files ("server_shmiop_*");
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Client_Protocol/server.cpp b/TAO/tests/RTCORBA/Client_Protocol/server.cpp
deleted file mode 100644
index 6b4cc59125f..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/server.cpp
+++ /dev/null
@@ -1,255 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTCORBA/RT_Policy_i.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "tao/Strategies/advanced_resource.h"
-
-class Test_i : public POA_Test
-{
- // = TITLE
- // An implementation for the Test interface in test.idl
- //
-public:
- Test_i (CORBA::ORB_ptr orb);
- // ctor
-
- void test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Test method invoked on the sever\n"));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Shutting down \n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-//*************************************************************************
-
-const char *ior_output_file1 = "test1.ior";
-const char *ior_output_file2 = "test2.ior";
-CORBA::ULong protocol_type = 0;
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "s:c:p:");
- int c, result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 's':
- ior_output_file1 = get_opts.opt_arg ();
- break;
-
- case 'c':
- ior_output_file2 = get_opts.opt_arg ();
- break;
-
- case 'p':
- result = ::sscanf (get_opts.opt_arg (),
- "%u",
- &protocol_type);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-p> option"),
- -1);
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-s <iorfile> "
- "-c <iorfile> "
- "-p <protocol_type> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-int
-create_object (PortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb,
- Test_i *server_impl,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- // Register with poa.
- PortableServer::ObjectId_var id =
- poa->activate_object (server_impl ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::Object_var server =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Print out the IOR.
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG, "<%s>\n\n", ior.in ()));
-
- // Print ior to the file.
- if (filename != 0)
- {
- FILE *output_file= ACE_OS::fopen (filename, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RTORB.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return -1;
-
- // RootPOA.
- object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (root_poa.in (), "RootPOA") == -1)
- return -1;
-
- // POAManager.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create child POA with RTCORBA::ClientProtocolPolicy set.
- RTCORBA::ProtocolList protocols;
- protocols.length (1);
- protocols[0].protocol_type = protocol_type;
- protocols[0].orb_protocol_properties =
- TAO_Protocol_Properties_Factory::create_orb_protocol_property
- (protocol_type);
- protocols[0].transport_protocol_properties =
- TAO_Protocol_Properties_Factory::create_transport_protocol_property
- (protocol_type, orb->orb_core ());
-
- CORBA::PolicyList poa_policy_list;
- poa_policy_list.length (1);
- poa_policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("Child_POA",
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Servant.
- Test_i server_impl (orb.in ());
-
- // Create object 1.
- int result;
- ACE_DEBUG ((LM_DEBUG, "\nActivated object one as "));
- result = create_object (poa.in (), orb.in (), &server_impl,
- ior_output_file1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result == -1)
- return -1;
-
- // Create object 2.
- ACE_DEBUG ((LM_DEBUG, "\nActivated object two as "));
- result = create_object (root_poa.in (), orb.in (), &server_impl,
- ior_output_file2 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result == -1)
- return -1;
-
- // Run ORB Event loop.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in ClientProtocolPolicy: test server");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Client_Protocol/svc.conf b/TAO/tests/RTCORBA/Client_Protocol/svc.conf
deleted file mode 100644
index 16b29a6e009..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/svc.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Options for SHMIOP protocol
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop"
-
diff --git a/TAO/tests/RTCORBA/Client_Protocol/svc.conf.xml b/TAO/tests/RTCORBA/Client_Protocol/svc.conf.xml
deleted file mode 100644
index 0c3f02e1362..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/svc.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options for SHMIOP protocol -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Client_Protocol/test.idl b/TAO/tests/RTCORBA/Client_Protocol/test.idl
deleted file mode 100644
index 4a73b5f42e6..00000000000
--- a/TAO/tests/RTCORBA/Client_Protocol/test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method ();
- // Test method.
-
- oneway void shutdown ();
- // Shut down the ORB.
-
-};
diff --git a/TAO/tests/RTCORBA/Collocation/.cvsignore b/TAO/tests/RTCORBA/Collocation/.cvsignore
deleted file mode 100644
index bee89094a99..00000000000
--- a/TAO/tests/RTCORBA/Collocation/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Collocation
diff --git a/TAO/tests/RTCORBA/Collocation/Collocation.cpp b/TAO/tests/RTCORBA/Collocation/Collocation.cpp
deleted file mode 100644
index fa40bd0ca34..00000000000
--- a/TAO/tests/RTCORBA/Collocation/Collocation.cpp
+++ /dev/null
@@ -1,981 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Array_Base.h"
-#include "ace/Task.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/Thread_Pool.h"
-#include "testS.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Collocations, Collocations, "$Id$")
-
-RTCORBA::Priority default_thread_priority;
-
-class test_i;
-
-struct Test_Object_And_Servant
-{
- test_var object_;
- test_i *servant_;
-};
-
-typedef ACE_Array_Base<Test_Object_And_Servant> Tests;
-
-void
-setup_test_parameters (Test_Object_And_Servant *test,
- RTCORBA::Current_ptr current,
- CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL);
-class test_i :
- public POA_test
-{
-public:
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- Tests &tests
- ACE_ENV_ARG_DECL);
-
- void start (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
- int client_propagated (void);
-
- void client_propagated (int);
-
- int server_declared (void);
-
- void server_declared (int);
-
- RTCORBA::Priority server_priority (void);
-
- void server_priority (RTCORBA::Priority);
-
- int in_lane (void);
-
- void in_lane (int);
-
- int serviced_by_rt_tp (void);
-
- void serviced_by_rt_tp (int);
-
- void thread_info (const char *method_name);
-
- void invocation_pool_and_lane (CORBA::ULong pool,
- CORBA::ULong lane);
-
- void invocation_pool (CORBA::ULong pool);
-
- void invocation_lane (CORBA::ULong lane);
-
- RTCORBA::Priority invocation_priority (void);
-
- void invocation_priority (RTCORBA::Priority);
-
-private:
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- Tests &tests_;
-
- int client_propagated_;
- int server_declared_;
- RTCORBA::Priority server_priority_;
- int in_lane_;
- int serviced_by_rt_tp_;
-
- CORBA::ULong pool_;
- CORBA::ULong lane_;
- RTCORBA::Priority invocation_priority_;
-
- RTCORBA::Current_var current_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- Tests &tests
- ACE_ENV_ARG_DECL)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa)),
- tests_ (tests),
- client_propagated_ (0),
- server_declared_ (0),
- server_priority_ (0),
- serviced_by_rt_tp_ (1),
- invocation_priority_ (0)
-{
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->current_ =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-test_i::client_propagated (void)
-{
- return this->client_propagated_;
-}
-
-void
-test_i::client_propagated (int client_propagated)
-{
- this->client_propagated_ = client_propagated;
-}
-
-int
-test_i::server_declared (void)
-{
- return this->server_declared_;
-}
-
-void
-test_i::server_declared (int server_declared)
-{
- this->server_declared_ = server_declared;
-}
-
-RTCORBA::Priority
-test_i::server_priority (void)
-{
- return this->server_priority_;
-}
-
-void
-test_i::server_priority (RTCORBA::Priority server_priority)
-{
- this->server_priority_ = server_priority;
-}
-
-int
-test_i::in_lane (void)
-{
- return this->in_lane_;
-}
-
-void
-test_i::in_lane (int in_lane)
-{
- this->in_lane_ = in_lane;
-}
-
-int
-test_i::serviced_by_rt_tp (void)
-{
- return this->serviced_by_rt_tp_;
-}
-
-void
-test_i::serviced_by_rt_tp (int serviced_by_rt_tp)
-{
- this->serviced_by_rt_tp_ = serviced_by_rt_tp;
-}
-
-void
-test_i::invocation_pool_and_lane (CORBA::ULong pool,
- CORBA::ULong lane)
-{
- this->pool_ = pool;
- this->lane_ = lane;
-}
-
-void
-test_i::invocation_pool (CORBA::ULong pool)
-{
- this->pool_ = pool;
-}
-
-void
-test_i::invocation_lane (CORBA::ULong lane)
-{
- this->lane_ = lane;
-}
-
-RTCORBA::Priority
-test_i::invocation_priority (void)
-{
- return this->invocation_priority_;
-}
-
-void
-test_i::invocation_priority (RTCORBA::Priority invocation_priority)
-{
- this->invocation_priority_ = invocation_priority;
-}
-
-void
-test_i::start (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-
- this->thread_info ("test_i::start");
-
- ACE_DEBUG ((LM_DEBUG,
- "\n"));
-
- Tests::ITERATOR iterator (this->tests_);
- while (!iterator.done ())
- {
- Test_Object_And_Servant *test = 0;
- iterator.next (test);
-
- setup_test_parameters (test,
- this->current_.in (),
- this->orb_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test->object_->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- this->orb_->object_to_string (test->object_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object =
- this->orb_->string_to_object (ior.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_var test_from_string =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_from_string->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- iterator.advance ();
- }
-}
-
-void
-test_i::thread_info (const char *method_name)
-{
- // Get the ORB_Core's TSS resources.
- TAO_ORB_Core_TSS_Resources *tss =
- this->orb_->orb_core ()->get_tss_resources ();
-
- /// Get the lane attribute in TSS.
- TAO_Thread_Lane *lane =
- (TAO_Thread_Lane *) tss->lane_;
-
- if (lane)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) %s (pool = %d; lane = %d); priority = %d (should be %d)\n",
- method_name,
- lane->pool ().id (),
- lane->id (),
- this->current_->the_priority (),
- this->invocation_priority ()));
-
- ACE_ASSERT (this->pool_ == lane->pool ().id ());
- ACE_ASSERT (this->lane_ == lane->id ());
- ACE_ASSERT (this->current_->the_priority () ==
- this->invocation_priority ());
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%t) %s (default thread pool); priority = %d (should be %d)\n",
- method_name,
- this->current_->the_priority (),
- this->invocation_priority ()));
-
- ACE_ASSERT (this->pool_ == 0);
- ACE_ASSERT (this->lane_ == 0);
- ACE_ASSERT (this->current_->the_priority () ==
- this->invocation_priority ());
- }
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->thread_info ("test_i::method");
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-void
-setup_test_parameters (Test_Object_And_Servant *test,
- RTCORBA::Current_ptr current,
- CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
-{
- CORBA::Short current_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!test->servant_->serviced_by_rt_tp () ||
- test->servant_->client_propagated ())
- {
- test->servant_->invocation_priority (current_thread_priority);
- }
- else if (test->servant_->server_declared ())
- {
- test->servant_->invocation_priority (test->servant_->server_priority ());
- }
- else
- {
- test->servant_->invocation_priority (default_thread_priority);
- }
-
- if (test->servant_->client_propagated () &&
- test->servant_->in_lane ())
- {
- if (current_thread_priority == default_thread_priority)
- test->servant_->invocation_lane (0);
- else
- test->servant_->invocation_lane (1);
- }
-
- if (!test->servant_->serviced_by_rt_tp ())
- {
- // Get the ORB_Core's TSS resources.
- TAO_ORB_Core_TSS_Resources *tss =
- orb->orb_core ()->get_tss_resources ();
-
- /// Get the lane attribute in TSS.
- TAO_Thread_Lane *lane =
- (TAO_Thread_Lane *) tss->lane_;
-
- if (lane)
- {
- test->servant_->invocation_pool_and_lane (lane->pool ().id (),
- lane->id ());
- }
- else
- {
- test->servant_->invocation_pool_and_lane (0, 0);
- }
- }
-}
-
-class Server
-{
-public:
- Server (CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL);
-
- void create_servant_in_root_poa (ACE_ENV_SINGLE_ARG_DECL);
- void create_poa_and_servant_with_tp_policy (const char *poa_name,
- int set_priority_model,
- RTCORBA::PriorityModel priority_model
- ACE_ENV_ARG_DECL);
- void create_poa_and_servant_with_tp_with_lanes_policy (const char *poa_name,
- RTCORBA::PriorityModel priority_model
- ACE_ENV_ARG_DECL);
- void test (ACE_ENV_SINGLE_ARG_DECL);
- void start_testing (ACE_ENV_SINGLE_ARG_DECL);
- void shutdown (ACE_ENV_SINGLE_ARG_DECL);
-
- CORBA::ORB_var orb_;
- RTCORBA::RTORB_var rt_orb_;
- PortableServer::POA_var root_poa_;
- PortableServer::POAManager_var poa_manager_;
- RTCORBA::Current_var current_;
-
- Tests tests_;
-
- CORBA::ULong stacksize_;
- CORBA::ULong static_threads_;
- CORBA::ULong dynamic_threads_;
- CORBA::Boolean allow_request_buffering_;
- CORBA::Boolean allow_borrowing_;
- CORBA::ULong max_buffered_requests_;
- CORBA::ULong max_request_buffer_size_;
-};
-
-Server::Server (CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- stacksize_ (0),
- static_threads_ (1),
- dynamic_threads_ (0),
- allow_request_buffering_ (0),
- allow_borrowing_ (0),
- max_buffered_requests_ (0),
- max_request_buffer_size_ (0)
-{
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->rt_orb_ =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->current_ =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- default_thread_priority =
- this->current_->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->root_poa_ =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->poa_manager_ =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Server::create_servant_in_root_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (this->orb_.in (),
- this->root_poa_.in (),
- this->tests_
- ACE_ENV_ARG_PARAMETER),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- servant->invocation_pool_and_lane (0, 0);
- servant->in_lane (0);
- servant->serviced_by_rt_tp (0);
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- this->tests_.size (this->tests_.size () + 1);
- this->tests_[this->tests_.size () - 1].servant_ =
- servant;
- this->tests_[this->tests_.size () - 1].object_ =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Server::create_poa_and_servant_with_tp_policy (const char *poa_name,
- int set_priority_model,
- RTCORBA::PriorityModel priority_model
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolId threadpool_id =
- this->rt_orb_->create_threadpool (this->stacksize_,
- this->static_threads_,
- this->dynamic_threads_,
- default_thread_priority,
- this->allow_request_buffering_,
- this->max_buffered_requests_,
- this->max_request_buffer_size_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var threadpool_policy =
- this->rt_orb_->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var priority_model_policy =
- this->rt_orb_->create_priority_model_policy (priority_model,
- default_thread_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::PolicyList policies;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- threadpool_policy;
-
- if (set_priority_model)
- {
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- priority_model_policy;
- }
-
- PortableServer::POA_var poa =
- this->root_poa_->create_POA (poa_name,
- this->poa_manager_.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- RTPortableServer::POA_var rt_poa =
- RTPortableServer::POA::_narrow (poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant1 = 0;
- ACE_NEW_THROW_EX (servant1,
- test_i (this->orb_.in (),
- poa.in (),
- this->tests_
- ACE_ENV_ARG_PARAMETER),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- servant1->in_lane (0);
-
- PortableServer::ObjectId_var id1;
-
- if (set_priority_model)
- {
- if (priority_model == RTCORBA::CLIENT_PROPAGATED)
- {
- servant1->invocation_pool_and_lane (1, 0);
- servant1->client_propagated (1);
-
- id1 =
- rt_poa->activate_object (servant1
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- test_i *servant2 = 0;
-
- ACE_NEW_THROW_EX (servant2,
- test_i (this->orb_.in (),
- poa.in (),
- this->tests_
- ACE_ENV_ARG_PARAMETER),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- servant2->in_lane (0);
-
- PortableServer::ServantBase_var safe_servant2 (servant2);
-
- PortableServer::ObjectId_var id2;
-
- servant1->invocation_pool_and_lane (2, 0);
- servant2->invocation_pool_and_lane (2, 0);
- servant1->server_declared (1);
- servant2->server_declared (1);
- servant1->server_priority (default_thread_priority + 1);
- servant2->server_priority (default_thread_priority);
-
- id1 =
- rt_poa->activate_object_with_priority (servant1,
- default_thread_priority + 1
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- id2 =
- rt_poa->activate_object_with_priority (servant2,
- default_thread_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object2 =
- poa->id_to_reference (id2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->tests_.size (this->tests_.size () + 1);
- this->tests_[this->tests_.size () - 1].object_ =
- test::_narrow (object2.in ()
- ACE_ENV_ARG_PARAMETER);
- this->tests_[this->tests_.size () - 1].servant_ =
- servant2;
- ACE_CHECK;
- }
- }
- else
- {
- servant1->invocation_pool_and_lane (3, 0);
-
- id1 =
- rt_poa->activate_object (servant1
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- PortableServer::ServantBase_var safe_servant (servant1);
-
- CORBA::Object_var object1 =
- poa->id_to_reference (id1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->tests_.size (this->tests_.size () + 1);
- this->tests_[this->tests_.size () - 1].object_ =
- test::_narrow (object1.in ()
- ACE_ENV_ARG_PARAMETER);
- this->tests_[this->tests_.size () - 1].servant_ =
- servant1;
- ACE_CHECK;
-}
-
-void
-Server::create_poa_and_servant_with_tp_with_lanes_policy (const char *poa_name,
- RTCORBA::PriorityModel priority_model
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolLanes lanes (2);
- lanes.length (2);
-
- lanes[0].lane_priority = default_thread_priority;
- lanes[0].static_threads = this->static_threads_;
- lanes[0].dynamic_threads = this->dynamic_threads_;
-
- lanes[1].lane_priority = default_thread_priority + 1;
- lanes[1].static_threads = this->static_threads_;
- lanes[1].dynamic_threads = this->dynamic_threads_;
-
- RTCORBA::ThreadpoolId threadpool_id =
- this->rt_orb_->create_threadpool_with_lanes (this->stacksize_,
- lanes,
- this->allow_borrowing_,
- this->allow_request_buffering_,
- this->max_buffered_requests_,
- this->max_request_buffer_size_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var threadpool_policy =
- this->rt_orb_->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var priority_model_policy =
- this->rt_orb_->create_priority_model_policy (priority_model,
- default_thread_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::PolicyList policies;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- threadpool_policy;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- priority_model_policy;
-
- PortableServer::POA_var poa =
- this->root_poa_->create_POA (poa_name,
- this->poa_manager_.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- RTPortableServer::POA_var rt_poa =
- RTPortableServer::POA::_narrow (poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant1 = 0;
- ACE_NEW_THROW_EX (servant1,
- test_i (this->orb_.in (),
- poa.in (),
- this->tests_
- ACE_ENV_ARG_PARAMETER),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- servant1->in_lane (1);
-
- PortableServer::ServantBase_var safe_servant1 (servant1);
-
- PortableServer::ObjectId_var id1;
-
- if (priority_model == RTCORBA::CLIENT_PROPAGATED)
- {
- servant1->invocation_pool (4);
- servant1->client_propagated (1);
-
- id1 =
- rt_poa->activate_object (servant1
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- test_i *servant2 = 0;
-
- ACE_NEW_THROW_EX (servant2,
- test_i (this->orb_.in (),
- poa.in (),
- this->tests_
- ACE_ENV_ARG_PARAMETER),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- servant2->in_lane (1);
-
- PortableServer::ServantBase_var safe_servant2 (servant2);
-
- PortableServer::ObjectId_var id2;
-
- servant1->invocation_pool_and_lane (5, 1);
- servant2->invocation_pool_and_lane (5, 0);
- servant1->server_declared (1);
- servant2->server_declared (1);
- servant1->server_priority (default_thread_priority + 1);
- servant2->server_priority (default_thread_priority);
-
- id1 =
- rt_poa->activate_object_with_priority (servant1,
- default_thread_priority + 1
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- id2 =
- rt_poa->activate_object_with_priority (servant2,
- default_thread_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object2 =
- poa->id_to_reference (id2.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->tests_.size (this->tests_.size () + 1);
- this->tests_[this->tests_.size () - 1].object_ =
- test::_narrow (object2.in ()
- ACE_ENV_ARG_PARAMETER);
- this->tests_[this->tests_.size () - 1].servant_ =
- servant2;
- ACE_CHECK;
- }
-
- CORBA::Object_var object1 =
- poa->id_to_reference (id1.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->tests_.size (this->tests_.size () + 1);
- this->tests_[this->tests_.size () - 1].object_ =
- test::_narrow (object1.in ()
- ACE_ENV_ARG_PARAMETER);
- this->tests_[this->tests_.size () - 1].servant_ =
- servant1;
- ACE_CHECK;
-}
-
-void
-Server::start_testing (ACE_ENV_SINGLE_ARG_DECL)
-{
- Tests::ITERATOR iterator (this->tests_);
- while (!iterator.done ())
- {
- Test_Object_And_Servant *test = 0;
- iterator.next (test);
-
- setup_test_parameters (test,
- this->current_.in (),
- this->orb_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test->object_->start (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- iterator.advance ();
- }
-}
-
-void
-Server::test (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->start_testing (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n\n*** Changing priority to be higher ***\n\n"));
-
- this->current_->the_priority (default_thread_priority + 1
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->start_testing (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Server::shutdown (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->orb_->shutdown (1 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- Server server (this->orb_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.create_servant_in_root_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.create_poa_and_servant_with_tp_policy ("tp_client_propagated_poa",
- 1,
- RTCORBA::CLIENT_PROPAGATED
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.create_poa_and_servant_with_tp_policy ("tp_server_declared_poa",
- 1,
- RTCORBA::SERVER_DECLARED
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.create_poa_and_servant_with_tp_policy ("tp_no_priority_model_poa",
- 0,
- RTCORBA::CLIENT_PROPAGATED
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.create_poa_and_servant_with_tp_with_lanes_policy ("tp_with_lanes_client_propagated_poa",
- RTCORBA::CLIENT_PROPAGATED
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.create_poa_and_servant_with_tp_with_lanes_policy ("tp_with_lanes_server_declared_poa",
- RTCORBA::SERVER_DECLARED
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Make sure we can support multiple priorities that are
- // required for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Collocation/README b/TAO/tests/RTCORBA/Collocation/README
deleted file mode 100644
index ddf7fbe3ce4..00000000000
--- a/TAO/tests/RTCORBA/Collocation/README
+++ /dev/null
@@ -1,48 +0,0 @@
-$Id$
-
-Description:
-
-This is a test for collocation when using thread pools and lanes.
-There are multiple servants in this test:
-
-- One servant is in the Root POA which is service by the default
- thread pool.
-
-- One servant is in a POA with the CLIENT_PROPAGATED policy and is
- serviced by a thread pool without lanes.
-
-- Two servants are in a POA with the SERVER_DECLARED policy and is
- serviced by a thread pool without lanes. One of the servant is at
- default priority and the other is at default + 1 priority.
-
-- One servant is in a POA without a priority model policy and is
- serviced by a thread pool without lanes.
-
-- One servants is in a POA with the CLIENT_PROPAGATED policy and is
- serviced by a thread pool with lanes. Depending on the priority of
- the caller, either one of the lanes processes the request.
-
-- Two servants are in a POA with the SERVER_DECLARED policy and is
- serviced by a thread pool with lanes. One of the servant is at
- default priority and the other is at default + 1 priority.
-
-All servants are put into a global array. The main thread starts off
-the testing at default priority by calling start() on each servant in
-the array. The implementation of start() calls method() on each
-servant in the array. Since the upcalls will be handled by a thread
-pool corresponding to each servant, all pools and lanes ends up
-calling into one another.
-
-The main thread then changes its priority to default + 1 and calls
-start() on each servant in the array. This makes sure to exercise the
-second lane in the thread pool with lanes and the CLIENT_PROPAGATED
-priority.
-
-The test checks that the correct pool, lane, and priority is being
-used to run the upcall.
-
-The test also converts the objects into strings and back to make sure
-that collocation works as expected for imported objects.
-
-This test has enough asserts to make sure that the correct thread is
-making the upcall.
diff --git a/TAO/tests/RTCORBA/Collocation/RTCORBA_Collocation.mpc b/TAO/tests/RTCORBA/Collocation/RTCORBA_Collocation.mpc
deleted file mode 100644
index 0c4c76959e1..00000000000
--- a/TAO/tests/RTCORBA/Collocation/RTCORBA_Collocation.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server {
-}
-
-
diff --git a/TAO/tests/RTCORBA/Collocation/continuous.conf b/TAO/tests/RTCORBA/Collocation/continuous.conf
deleted file mode 100644
index 8d8795f4817..00000000000
--- a/TAO/tests/RTCORBA/Collocation/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous"
diff --git a/TAO/tests/RTCORBA/Collocation/continuous.conf.xml b/TAO/tests/RTCORBA/Collocation/continuous.conf.xml
deleted file mode 100644
index f297697bc7c..00000000000
--- a/TAO/tests/RTCORBA/Collocation/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Collocation/run_test.pl b/TAO/tests/RTCORBA/Collocation/run_test.pl
deleted file mode 100755
index fe1e28e0b4a..00000000000
--- a/TAO/tests/RTCORBA/Collocation/run_test.pl
+++ /dev/null
@@ -1,37 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$continuous = ($^O eq 'hpux');
-
-print STDERR "\n********** RTCORBA Collocation Unit Test **********\n\n";
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Collocation");
-}
-else {
- $T = new PerlACE::Process ("Collocation");
-}
-
-if ($continuous) {
- $T->Arguments("-ORBSvcConf continuous$PerlACE::svcconf_ext");
-}
-
-$test = $T->SpawnWaitKill(60);
-if ($test == 2) {
- # Mark as no longer running to avoid errors on exit.
- $T->{RUNNING} = 0;
-} else {
- if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
- }
-}
-
-exit 0;
diff --git a/TAO/tests/RTCORBA/Collocation/svc.conf b/TAO/tests/RTCORBA/Collocation/svc.conf
deleted file mode 100644
index 2154375e265..00000000000
--- a/TAO/tests/RTCORBA/Collocation/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# No options required for regular testing
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/Collocation/svc.conf.xml b/TAO/tests/RTCORBA/Collocation/svc.conf.xml
deleted file mode 100644
index b589f90605b..00000000000
--- a/TAO/tests/RTCORBA/Collocation/svc.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- No options required for regular testing -->
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Collocation/test.idl b/TAO/tests/RTCORBA/Collocation/test.idl
deleted file mode 100644
index fb23b0eeb08..00000000000
--- a/TAO/tests/RTCORBA/Collocation/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface test
-{
- void start ();
-
- void method ();
-};
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/.cvsignore b/TAO/tests/RTCORBA/Destroy_Thread_Pool/.cvsignore
deleted file mode 100644
index 507a06df4d9..00000000000
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Destroy_Thread_Pool
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp b/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp
deleted file mode 100644
index ed68835f061..00000000000
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "tao/ORB.h"
-#include "tao/RTCORBA/RTCORBA.h"
-
-ACE_RCSID(Destroy_Thread_Pools, Destroy_Thread_Pools, "$Id$")
-
-static CORBA::ULong stacksize = 0;
-static CORBA::ULong static_threads = 1;
-static CORBA::ULong dynamic_threads = 0;
-static RTCORBA::Priority default_thread_priority;
-static CORBA::Boolean allow_request_buffering = 0;
-static CORBA::Boolean allow_borrowing = 0;
-static CORBA::ULong max_buffered_requests = 0;
-static CORBA::ULong max_request_buffer_size = 0;
-static int iterations = 5;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i <iterations> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-RTCORBA::ThreadpoolId
-create_threadpool (RTCORBA::RTORB_ptr rt_orb
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolId id =
- rt_orb->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- default_thread_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return id;
-}
-
-RTCORBA::ThreadpoolId
-create_threadpool_with_lanes (RTCORBA::RTORB_ptr rt_orb
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolLanes lanes (2);
- lanes.length (2);
-
- lanes[0].lane_priority = default_thread_priority;
- lanes[0].static_threads = static_threads;
- lanes[0].dynamic_threads = dynamic_threads;
-
- lanes[1].lane_priority = default_thread_priority;
- lanes[1].static_threads = static_threads;
- lanes[1].dynamic_threads = dynamic_threads;
-
- RTCORBA::ThreadpoolId id =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return id;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- orb->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- int i = 0;
- for (i = 0;
- i < iterations;
- ++i)
- {
- RTCORBA::ThreadpoolId id =
- create_threadpool (rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- rt_orb->destroy_threadpool (id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- id =
- create_threadpool_with_lanes (rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- rt_orb->destroy_threadpool (id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/README b/TAO/tests/RTCORBA/Destroy_Thread_Pool/README
deleted file mode 100644
index c756cead921..00000000000
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/README
+++ /dev/null
@@ -1,7 +0,0 @@
-$Id$
-
-Description:
-This is a simple test for creating and destroying thread pools (with
-and without lanes).
-
-See run_test.pl to see how to run this test. \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/RTCORBA_Destroy_Thread_Pool.mpc b/TAO/tests/RTCORBA/Destroy_Thread_Pool/RTCORBA_Destroy_Thread_Pool.mpc
deleted file mode 100644
index 0c4c76959e1..00000000000
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/RTCORBA_Destroy_Thread_Pool.mpc
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server {
-}
-
-
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf b/TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf
deleted file mode 100644
index 8d8795f4817..00000000000
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous"
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf.xml b/TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf.xml
deleted file mode 100644
index f297697bc7c..00000000000
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/run_test.pl b/TAO/tests/RTCORBA/Destroy_Thread_Pool/run_test.pl
deleted file mode 100755
index 7aa95bf33c1..00000000000
--- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/run_test.pl
+++ /dev/null
@@ -1,33 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$continuous = ($^O eq 'hpux');
-
-print STDERR "\n********** RTCORBA Destroy_Thread_Pool Unit Test **********\n\n";
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Destroy_Thread_Pool");
-}
-else {
- $T = new PerlACE::Process ("Destroy_Thread_Pool");
-}
-
-if ($continuous) {
- $T->Arguments("-ORBSvcConf continuous$PerlACE::svcconf_ext");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/RTCORBA/Diffserv/.cvsignore b/TAO/tests/RTCORBA/Diffserv/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.cpp b/TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.cpp
deleted file mode 100644
index bb503a6728f..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-// $Id$
-
-#include "Custom_Network_Priority_Mapping.h"
-#include "tao/debug.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID (Strategies,
- Custom_Network_Priority_Mapping,
- "$Id$")
-
-#define IPDSFIELD_DSCP_DEFAULT 0x00
-#define IPDSFIELD_DSCP_CS1 0x08
-#define IPDSFIELD_DSCP_CS2 0x10
-#define IPDSFIELD_DSCP_CS3 0x18
-#define IPDSFIELD_DSCP_CS4 0x20
-#define IPDSFIELD_DSCP_CS5 0x28
-#define IPDSFIELD_DSCP_CS6 0x30
-#define IPDSFIELD_DSCP_CS7 0x38
-#define IPDSFIELD_DSCP_AF11 0x0A
-#define IPDSFIELD_DSCP_AF12 0x0C
-#define IPDSFIELD_DSCP_AF13 0x0E
-#define IPDSFIELD_DSCP_AF21 0x12
-#define IPDSFIELD_DSCP_AF22 0x14
-#define IPDSFIELD_DSCP_AF23 0x16
-#define IPDSFIELD_DSCP_AF31 0x1A
-#define IPDSFIELD_DSCP_AF32 0x1C
-#define IPDSFIELD_DSCP_AF33 0x1E
-#define IPDSFIELD_DSCP_AF41 0x22
-#define IPDSFIELD_DSCP_AF42 0x24
-#define IPDSFIELD_DSCP_AF43 0x26
-#define IPDSFIELD_ECT_MASK 0x02
-#define IPDSFIELD_CE_MASK 0x01
-#define IPDSFIELD_DSCP_EF 0x2E
-
-static int dscp [] =
-{
- IPDSFIELD_DSCP_DEFAULT ,
- IPDSFIELD_DSCP_CS1 ,
- IPDSFIELD_DSCP_CS2 ,
- IPDSFIELD_DSCP_CS3 ,
- IPDSFIELD_DSCP_CS4 ,
- IPDSFIELD_DSCP_CS5 ,
- IPDSFIELD_DSCP_CS6 ,
- IPDSFIELD_DSCP_CS7 ,
- IPDSFIELD_DSCP_AF11 ,
- IPDSFIELD_DSCP_AF12 ,
- IPDSFIELD_DSCP_AF13 ,
- IPDSFIELD_DSCP_AF21 ,
- IPDSFIELD_DSCP_AF22 ,
- IPDSFIELD_DSCP_AF23 ,
- IPDSFIELD_DSCP_AF31 ,
- IPDSFIELD_DSCP_AF32 ,
- IPDSFIELD_DSCP_AF33 ,
- IPDSFIELD_DSCP_AF41 ,
- IPDSFIELD_DSCP_AF42 ,
- IPDSFIELD_DSCP_AF43 ,
- IPDSFIELD_DSCP_EF
-};
-
-/*
-static const char *dscp_char[]=
-{
- "Normal",
- "CS1",
- "CS2",
- "CS3",
- "CS4",
- "CS5",
- "CS6",
- "CS7",
- "Assured Forwarding 11",
- "Assured Forwarding 12",
- "Assured Forwarding 13",
- "Assured Forwarding 21",
- "Assured Forwarding 22",
- "Assured Forwarding 23",
- "Assured Forwarding 31",
- "Assured Forwarding 32",
- "Assured Forwarding 33",
- "Assured Forwarding 41",
- "Assured Forwarding 42",
- "Assured Forwarding 43",
- "Expedited Forwarding"
-};
-*/
-
-Custom_Network_Priority_Mapping::Custom_Network_Priority_Mapping (void)
- : corba_priority_ (RTCORBA::minPriority)
-{
-}
-
-void
-Custom_Network_Priority_Mapping::corba_priority (RTCORBA::Priority corba_priority)
-{
- this->corba_priority_ = corba_priority;
-}
-
-CORBA::Boolean
-Custom_Network_Priority_Mapping::to_network (RTCORBA::Priority,
- RTCORBA::NetworkPriority &network_priority)
-{
- if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- "Custom_Network_Priority_Mapping::to_network corba_priority %d\n",
- this->corba_priority_));
-
- const int total_slots = sizeof (dscp) / sizeof (int);
-
- int array_slot =
- static_cast<int> (((this->corba_priority_ - RTCORBA::minPriority) / double (RTCORBA::maxPriority - RTCORBA::minPriority)) * total_slots);
-
- if (array_slot == total_slots)
- array_slot -= 1;
-
- network_priority = dscp[array_slot];
-
- if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- "Custom_Network_Priority_Mapping::to_network = %x\n",
- network_priority));
-
- return 1;
-}
-
-CORBA::Boolean
-Custom_Network_Priority_Mapping::to_CORBA (RTCORBA::NetworkPriority,
- RTCORBA::Priority &)
-{
- // This method should not be called.
- ACE_ASSERT (0);
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.h b/TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.h
deleted file mode 100644
index fac5d84a433..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/Custom_Network_Priority_Mapping.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO
-//
-// = FILENAME
-// Custom_Network_Priority_Mapping.h
-//
-// = DESCRIPTION
-// Declares the Custom_Network_Priority_Mapping interface,
-//
-// = AUTHOR
-// Yamuna Krishnamurthy (yamuna@oomworks.com)
-//
-// ============================================================================
-
-#ifndef CUSTOM_NETWORK_PRIORITY_MAPPING_H
-#define CUSTOM_NETWORK_PRIORITY_MAPPING_H
-
-#include /**/ "ace/pre.h"
-#include "tao/RTCORBA/Network_Priority_Mapping.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Custom_Network_Priority_Mapping : public TAO_Network_Priority_Mapping
-{
- //
- // = TITLE
- // A simple implementation of the Network_Priority_Mapping interface
- //
- // = DESCRIPTION
- // This implementation uses custom mapping between the range of
- // priorities for a given scheduling class (ACE_SCHED_OTHER,
- // ACE_SCHED_FIFO, ACE_SCHED_RR) and the valid range of CORBA
- // priorities (0...32767)
- //
-public:
- Custom_Network_Priority_Mapping (void);
-
- CORBA::Boolean to_network (RTCORBA::Priority corba_priority,
- RTCORBA::NetworkPriority &network_priority);
-
- CORBA::Boolean to_CORBA (RTCORBA::NetworkPriority network_priority,
- RTCORBA::Priority &corba_priority);
-
- void corba_priority (RTCORBA::Priority corba_priority);
-
- private:
- RTCORBA::Priority corba_priority_;
-};
-
-
-#include /**/ "ace/post.h"
-#endif /* CUSTOM_NETWORK_PRIORITY_MAPPING_H */
diff --git a/TAO/tests/RTCORBA/Diffserv/README b/TAO/tests/RTCORBA/Diffserv/README
deleted file mode 100644
index f1a80b25b34..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/README
+++ /dev/null
@@ -1,47 +0,0 @@
-$Id$
-
-This is a unit test for setting DiffServ Codepoint both in the
-requests sent and the replies received. It also illustrates how a
-Custom Network Priority Mapping can be plugged in.
-
-Scenario:
---------
-
-Testing the setting of dscp in the requests sent
--------------------------------------------------
-
-Server creates a POA and registers a servant with it. Client obtains
-the object reference. It sets the desired corba and native
-priority. Client then performs several invocations on the object
-during which it sets and unsets diffserv codepoint at the ORB, THREAD
-and OBJECT levels.
-
-Testing the setting of dscp in the replies sent
--------------------------------------------------
-
-Server creates a POA and enables network priority through the POA
-policy. This ensures that all replies sent from the POA have the dscp
-set. It registers a servant with this POA. Client obtains the object
-reference. Client then performs several invocations on the object.
-
-To run (on Unix):
------------------
-
-$ ./server -ORBdebuglevel 1 -p 20000
-$ ./client -ORBdebuglevel 1 -n 10 -p 10000 -k file://simple_servant.ior
-$ ./client -ORBdebuglevel 1 -n 10 -p 10000 -k file://diffserv_servant.ior
-
-Both client executions set diffserv codepoints on outbound
-packets. When the client invokes on the diffserv_servant, reply
-packets also have diffserv codepoints set on them.
-
-NOTE: The iterations have to be >=6 in order to test set/unset at the
-ORB, THREAD and OBJECT levels.
-
-
-
-
-
-
-
-
diff --git a/TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc b/TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc
deleted file mode 100644
index 85cadf3219a..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/RTCORBA_Diffserv.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*client) : taoexe, portableserver, rtcorba, minimum_corba {
- source_files {
- client.cpp
- Custom_Network_Priority_Mapping.cpp
- }
-}
-
-project(*server) : taoexe, rtportableserver, rtcorba, minimum_corba {
- after += *client
- source_files {
- server.cpp
- Custom_Network_Priority_Mapping.cpp
- }
-}
diff --git a/TAO/tests/RTCORBA/Diffserv/client.cpp b/TAO/tests/RTCORBA/Diffserv/client.cpp
deleted file mode 100644
index 1956eb1e5ac..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/client.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
-#include "tao/RTCORBA/Network_Priority_Mapping.h"
-#include "Custom_Network_Priority_Mapping.h"
-#include "ace/Get_Opt.h"
-#include "tao/Policy_Manager.h"
-
-static const char *ior = "file://simple_servant.ior";
-static int iterations = 1;
-static int corba_priority = RTCORBA::minPriority;
-static int shutdown_server = 0;
-
-enum Priority_Level
-{
- OBJECT,
- THREAD,
- ORB
-};
-
-void
-change_network_priority (int enable_network_priority,
- Priority_Level level,
- Test_var &server,
- CORBA::ORB_ptr orb)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Set the tcp protocol protperties
- RTCORBA::TCPProtocolProperties_var tcp_properties =
- rt_orb->create_tcp_protocol_properties (ACE_DEFAULT_MAX_SOCKET_BUFSIZ,
- ACE_DEFAULT_MAX_SOCKET_BUFSIZ,
- 1,
- 0,
- 1,
- enable_network_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ProtocolList protocols;
- protocols.length (1);
- protocols[0].protocol_type = 0;
- protocols[0].transport_protocol_properties =
- RTCORBA::ProtocolProperties::_duplicate (tcp_properties.in ());
- protocols[0].orb_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
-
- CORBA::PolicyList policy_list;
- policy_list.length (1);
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- switch (level)
- {
- // Change policy at ORB level
- case ORB:
- {
- object = orb->resolve_initial_references ("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
-
- // Change policy at THREAD level
- case THREAD:
- {
- object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
-
- // Change policy at OBJECT level
- case OBJECT:
- {
- CORBA::Object_var object = server->_set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- }
- ACE_ENDTRY;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:n:p:x:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- // number of itarations
- case 'n':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- // corba priority
- case 'p':
- corba_priority = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- // shutdown server
- case 'x':
- shutdown_server = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s\n"
- "\t-k <ior> [default is %s]\n"
- "\t-n <number of invocations> [defaults to %d]\n"
- "\t-p <corba priority> [defaults to %d]\n"
- "\t-x <shutdown server> [defaults to %d]\n"
- "\n",
- argv [0],
- ior,
- iterations,
- corba_priority,
- shutdown_server),
- -1);
- }
-
- return 0;
-}
-
-void
-toggle (int &i)
-{
- if (i == 0)
- i = 1;
- else i = 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // Initialize and obtain reference to the Test object.
- CORBA::Object_var client_object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server =
- Test::_narrow (client_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Resolve the Network priority Mapping Manager
- CORBA::Object_var object =
- orb->resolve_initial_references ("NetworkPriorityMappingManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::NetworkPriorityMappingManager_var mapping_manager =
- RTCORBA::NetworkPriorityMappingManager::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize the custom priority mapping
- Custom_Network_Priority_Mapping *cnpm = 0;
- ACE_NEW_RETURN (cnpm,
- Custom_Network_Priority_Mapping,
- -1);
-
- // Set the desired corba priority on the network mapping manager
- cnpm->corba_priority (corba_priority);
-
- // Load the custom network priority mapping object in the
- // network priority mapping manager. The user can thus add his
- // own priority mapping.
- mapping_manager->mapping (cnpm);
-
- int enable_network_priority = 1;
-
- // Make several invocation,
- for (int i = 0; i < iterations; ++i)
- {
- toggle (enable_network_priority);
-
- switch (i)
- {
- case 0:
- case 1:
- change_network_priority (enable_network_priority, ORB, server, orb.in ());
- break;
- case 2:
- case 3:
- change_network_priority (enable_network_priority, THREAD, server, orb.in ());
- break;
- default:
- change_network_priority (enable_network_priority, OBJECT, server, orb.in ());
- break;
- }
-
- server->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Shut down Server ORB.
- if (shutdown_server)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Diffserv/server.cpp b/TAO/tests/RTCORBA/Diffserv/server.cpp
deleted file mode 100644
index cee01e1b4f7..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/server.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
-#include "tao/RTCORBA/Network_Priority_Mapping.h"
-#include "Custom_Network_Priority_Mapping.h"
-#include "tao/debug.h"
-
-class Test_i : public POA_Test
-{
-public:
- Test_i (CORBA::ORB_ptr orb);
-
- void test_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Test_i::test_method\n"));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-static const char *simple_servant_ior_file = "simple_servant.ior";
-static const char *diffserv_servant_ior_file = "diffserv_servant.ior";
-static RTCORBA::Priority corba_priority = RTCORBA::minPriority;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "p:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'p':
- corba_priority = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s \n"
- "\t-p <corba priority> [defaults to %d]\n"
- "\n",
- argv [0],
- corba_priority),
- -1);
- }
-
- return 0;
-}
-
-void
-create_object (PortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb,
- PortableServer::Servant servant,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- // Register with poa.
- PortableServer::ObjectId_var id =
- poa->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- FILE *output_file= ACE_OS::fopen (filename, "w");
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object;
-
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RootPOA.
- object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // POAManager.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Servant.
- Test_i servant (orb.in ());
-
- // Create the first object in Root POA
- create_object (root_poa.in (),
- orb.in (),
- &servant,
- simple_servant_ior_file
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- orb->resolve_initial_references ("NetworkPriorityMappingManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::NetworkPriorityMappingManager_var mapping_manager =
- RTCORBA::NetworkPriorityMappingManager::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Custom_Network_Priority_Mapping *cnpm = 0;
- ACE_NEW_RETURN (cnpm,
- Custom_Network_Priority_Mapping,
- -1);
-
- cnpm->corba_priority (corba_priority);
-
- mapping_manager->mapping (cnpm);
-
- // RTORB.
- object =
- orb->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Set transport protocol properties
- RTCORBA::TCPProtocolProperties_var tcp_properties =
- rt_orb->create_tcp_protocol_properties (ACE_DEFAULT_MAX_SOCKET_BUFSIZ,
- ACE_DEFAULT_MAX_SOCKET_BUFSIZ,
- 1,
- 0,
- 1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ProtocolList protocols;
- protocols.length (1);
- protocols[0].protocol_type = 0;
- protocols[0].transport_protocol_properties =
- RTCORBA::ProtocolProperties::_duplicate (tcp_properties.in ());
- protocols[0].orb_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
-
- CORBA::PolicyList policy_list;
- policy_list.length (1);
-
- policy_list[0] =
- rt_orb->create_server_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA with Diffserv enabled
- PortableServer::POA_var poa_with_diffserv =
- root_poa->create_POA ("POA_WITH_DS",
- poa_manager.in (),
- policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create object 2.
- create_object (poa_with_diffserv.in (),
- orb.in (),
- &servant,
- diffserv_servant_ior_file
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Activate POA manager.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Start ORB event loop.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Diffserv/test.idl b/TAO/tests/RTCORBA/Diffserv/test.idl
deleted file mode 100644
index 3ed4d3d20ea..00000000000
--- a/TAO/tests/RTCORBA/Diffserv/test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method ();
- oneway void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/README b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/README
deleted file mode 100644
index 95b07c46c2c..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/README
+++ /dev/null
@@ -1,10 +0,0 @@
-$Id$
-
-Description:
-This is a simple test for a RT thread-pool server. It creates a
-server process with multiple thread pools, POAs, and servants. The
-test also spawns multiple clients for each servant. The servants with
-multiple threads in their thread-pool respond faster than the servants
-with a single thread thread-pool.
-
-See run_test.pl to see how to run this test. \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc
deleted file mode 100644
index ebf79370785..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/RT_Dynamic_Thread_Pool.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server, minimum_corba {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp
deleted file mode 100644
index abe1dd456ec..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/client.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
- #include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Thread_Pool, client, "$Id$")
-
-const char *ior = "file://ior_1";
-int iterations = 6;
-int shutdown_server = 0;
-bool decreased = false;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- shutdown_server = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <iterations> "
- "-x [shutdown server] "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- pid_t pid =
- ACE_OS::getpid ();
-
- CORBA::Long tc = 0;
-
- for (int i = 0; i != iterations; ++i)
- {
- CORBA::Long mtc = 0;
- CORBA::Long r =
- test->method (pid,
- i,
- mtc
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Each 2 iterations sleep 5 seconds
- if (i % 2 == 0)
- ACE_OS::sleep (5);
-
- ACE_ASSERT (r == i);
- // Assert disappears on with optimizations on.
- ACE_UNUSED_ARG (r);
-
- if (mtc > tc)
- {
- // Number of threads increased, so store this.
- ACE_DEBUG ((LM_DEBUG, "Thread count increased to %d\n", mtc));
- tc = mtc;
- }
- else if (mtc < tc)
- {
- // Number of threads decreased!
- ACE_DEBUG ((LM_DEBUG, "Thread count decreased to %d\n", mtc));
- decreased = true;
- tc = mtc;
- }
- }
-
- ACE_OS::sleep (10);
-
- CORBA::Long end = 0;
- CORBA::Long re =
- test->method (pid,
- 0,
- end
- ACE_ENV_ARG_PARAMETER);
-
- ACE_ASSERT (re == 0);
- // Assert disappears on with optimizations on.
- ACE_UNUSED_ARG (re);
-
- if (end != 0)
- {
- ACE_ERROR ((LM_ERROR, "Dynamic thread count should be 0, not %d\n", end));
- }
-
- if (shutdown_server)
- {
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
-
- if (decreased == false)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "ERROR: Number of threads didn't decrease\n"), -1);
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf
deleted file mode 100644
index 41c1919a08a..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous -RTORBDynamicThreadIdleTimeout 1000000"
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml
deleted file mode 100644
index bbb864e64b0..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous -RTORBDynamicThreadIdleTimeout 1000000"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl
deleted file mode 100644
index 2059c01b04f..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/run_test.pl
+++ /dev/null
@@ -1,117 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$number_of_clients = 1;
-$status = 0;
-$continuous = ($^O eq 'hpux');
-
-@configurations =
- (
- {
- file => "ior_3",
- description => "Invoking methods on servant in second RT thread pool (with lanes)",
- },
- );
-
-for $test (@configurations)
-{
- unlink $test->{file};
-}
-
-sub run_clients
-{
- my @parms = @_;
- $arg = $parms[0];
- $clients = $parms[1];
-
- for ($i = 0; $i < $clients; $i++)
- {
- $CL[$i] = new PerlACE::Process ("client", $arg);
- $CL[$i]->Spawn ();
- }
-
- for ($i = 0; $i < $clients; $i++)
- {
- $client = $CL[$i]->WaitKill (120);
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- goto kill_server;
- }
- }
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-if ($continuous) {
- $SV->Arguments ("-ORBSvcConf continuous$PerlACE::svcconf_ext");
-}
- $SV->Arguments ("-ORBDebugLevel 10 -ORBLogFile server.log");
-
-$SV->Spawn ();
-
-for $test (@configurations)
-{
- if (PerlACE::waitforfile_timed ($test->{file}, 10) == -1)
- {
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find ior file: $test->{file}\n";
- $status = 1;
- goto kill_server;
- }
- }
- }
-
-for $test (@configurations)
- {
- print STDERR "\n*************************************************************\n";
- print STDERR "$test->{description}\n";
- print STDERR "*************************************************************\n\n";
-
- run_clients ("-k file://".PerlACE::LocalFile($test->{file}), $number_of_clients);
- }
-
-print STDERR "\n************************\n";
-print STDERR "Shutting down the server\n";
-print STDERR "************************\n\n";
-
-run_clients ("-k file://".PerlACE::LocalFile($configurations[0]->{file})." -i 0 -x", 1);
-
-kill_server:
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
-for $test (@configurations)
- {
- unlink $test->{file};
- }
-
-exit $status
-
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp
deleted file mode 100644
index ea5dc6db558..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/server.cpp
+++ /dev/null
@@ -1,397 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Thread_Pool, server, "$Id$")
-
-const char *ior_output_file = "ior";
-int ior_count = 1;
-CORBA::ULong static_threads = 1;
-CORBA::ULong dynamic_threads = 25;
-long nap_time = 1000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:s:d:t:h");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 's':
- static_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'd':
- dynamic_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 't':
- nap_time = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'h':
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-s <static_threads> "
- "-d <dynamic_threads> "
- "-t <nap_time> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-write_ior_to_file (CORBA::ORB_ptr orb,
- test_ptr test
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var ior =
- orb->object_to_string (test
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- char filename[BUFSIZ];
- ACE_OS::sprintf (filename,
- "%s_%d",
- ior_output_file,
- ior_count++);
-
- FILE *output_file =
- ACE_OS::fopen (filename,
- "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
-
- ACE_OS::fclose (output_file);
-
- return 0;
-}
-
-int
-create_POA_and_register_servant (CORBA::Policy_ptr threadpool_policy,
- const char *poa_name,
- PortableServer::POAManager_ptr poa_manager,
- PortableServer::POA_ptr root_poa,
- CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb
- ACE_ENV_ARG_DECL)
-{
- // Policies for the firstPOA to be created.
- CORBA::PolicyList policies (3); policies.length (3);
-
- // Implicit_activation policy.
- policies[0] =
- root_poa->create_implicit_activation_policy
- (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Thread pool policy.
- policies[1] =
- CORBA::Policy::_duplicate (threadpool_policy);
-
- // Priority Model policy.
- policies[2] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the POA under the RootPOA.
- PortableServer::POA_var poa =
- root_poa->create_POA (poa_name,
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Creation of POAs is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- test_i *servant =
- new test_i (orb,
- poa.in (),
- nap_time);
-
- PortableServer::ServantBase_var safe_servant (servant);
- ACE_UNUSED_ARG (safe_servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int result =
- write_ior_to_file (orb,
- test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Priority default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant (this->orb_.in (),
- root_poa.in (),
- nap_time);
- test_var test =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- write_ior_to_file (this->orb_.in (),
- test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (result != 0)
- return result;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong stacksize = 0;
- CORBA::Boolean allow_request_buffering = 0;
- CORBA::ULong max_buffered_requests = 0;
- CORBA::ULong max_request_buffer_size = 0;
-
- RTCORBA::ThreadpoolId threadpool_id_1 =
- rt_orb->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- default_thread_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_1 =
- rt_orb->create_threadpool_policy (threadpool_id_1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean allow_borrowing = 0;
- RTCORBA::ThreadpoolLanes lanes (1);
- lanes.length (1);
-
- lanes[0].lane_priority = default_thread_priority;
- lanes[0].static_threads = static_threads;
- lanes[0].dynamic_threads = dynamic_threads;
-
- RTCORBA::ThreadpoolId threadpool_id_2 =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_2 =
- rt_orb->create_threadpool_policy (threadpool_id_2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- result =
- create_POA_and_register_servant (threadpool_policy_1.in (),
- "first_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- result =
- create_POA_and_register_servant (threadpool_policy_2.in (),
- "second_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf
deleted file mode 100644
index c288d674567..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf
+++ /dev/null
@@ -1 +0,0 @@
-static RT_ORB_Loader "-RTORBDynamicThreadIdleTimeout 1000000"
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml
deleted file mode 100644
index 0908328040b..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/svc.conf.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <static RT_ORB_Loader "-RTORBDynamicThreadIdleTimeout 1000000">
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl
deleted file mode 100644
index 3bc8f9af25c..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- long method (in long client_id,
- in long iteration,
- out long thread_count);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp
deleted file mode 100644
index 6fbd244dd26..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/Thread_Pool.h"
-
-ACE_RCSID(Thread_Pools, test_i, "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- long msec_sleep)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa)),
- nap_time_ ()
-{
- this->nap_time_.msec (msec_sleep);
-}
-
-CORBA::Long
-test_i::method (CORBA::Long client_id,
- CORBA::Long iteration,
- CORBA::Long_out thread_count
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the ORB_Core's TSS resources.
- TAO_ORB_Core_TSS_Resources *tss =
- this->orb_->orb_core ()->get_tss_resources ();
-
- /// Get the lane attribute in TSS.
- TAO_Thread_Lane *lane =
- static_cast <TAO_Thread_Lane *> (tss->lane_);
-
- if (lane)
- ACE_DEBUG ((LM_DEBUG,
- "Request in thread %t (pool id = %d; lane id = %d) for client %d iteration %d\n",
- lane->pool ().id (),
- lane->id (),
- client_id,
- iteration));
- else
- ACE_DEBUG ((LM_DEBUG,
- "Request in thread %t (default thread pool) for client %d iteration %d\n",
- client_id,
- iteration));
-
- ACE_OS::sleep (this->nap_time_);
-
- if (lane)
- thread_count = lane->current_threads ();
- else
- thread_count = 0;
-
- return iteration;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h b/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h
deleted file mode 100644
index 7951ca0854c..00000000000
--- a/TAO/tests/RTCORBA/Dynamic_Thread_Pool/test_i.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Irfan Pyarali
- */
-// ===================================================================
-
-#include "testS.h"
-
-class test_i :
- public POA_test
-{
-public:
- /// Constructor.
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- long msec_sleep);
-
- /// Test method.
- CORBA::Long method (CORBA::Long client_id,
- CORBA::Long iteration,
- CORBA::Long_out thread_count
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Shutdown the server.
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Our POA.
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// ORB.
- CORBA::ORB_var orb_;
-
- /// Our POA.
- PortableServer::POA_var poa_;
-
- /// Time spent in executing the upcall.
- ACE_Time_Value nap_time_;
-};
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/.cvsignore b/TAO/tests/RTCORBA/Explicit_Binding/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/README b/TAO/tests/RTCORBA/Explicit_Binding/README
deleted file mode 100644
index d3f8558d143..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/README
+++ /dev/null
@@ -1,99 +0,0 @@
-$Id$
-
-This is a test for <Object::_validate_connection> method, i.e.,
-explicit binding functionality.
-
-Description.
---------
-The goal of this test is to check that <validate_connection>
-establishes connections appropriate for the effective policy
-overrides, and that it detects policy misconfigurations and reports
-them back to the client via <inconsistent_policies> parameter.
-
-The server creates an object, which can be used through IIOP or SHMIOP,
-and publishes its IOR. The client performs three tests:
-
-1) Set ClientProtocolPolicy override to SHMIOP, and invoke
-<validate_connection> on the object. This should return TRUE, and one
-SHMIOP connection should get established.
-
-2) Invoke <test_method> on the object. The invocation should succeed
-and NO new connections should get established (connection from step 1
-should get used).
-
-3) Now set ClientProtocolPolicy override to UIOP, and invoke
-<validate_connection> on the object. It should return FALSE (because
-the server is not reachable through UIOP), and <inconsistent_policies>
-should contain the problematic override: ClientProtocolPolicy we
-specified.
-
-
-To run (on Unix):
--------
-$./server [-o <ior_output_file>] -ORBendpoint iiop:// -ORBendpoint shmiop://
-$./client [-o <ior>] -ORBdebuglevel 1
-
-
-Options:
---------
- Server:
-
--o <ior_output_file> Default: test.ior
- Filename for output of the server IOR.
-
--ORBendpoint iiop:// Default: none
--ORBendpoint shmiop:// Need to open server endpoints for several
- protocols. Client is hardcoded to use
- SHMIOP, so these options must be specified
- for the test to work.
-
- Client:
-
--o <ior> Default: file://test.ior
- IOR of the test object.
-
--ORBdebuglevel 1 Default: none
- Recommended debug level for monitoring of
- connection establishment.
-
-Expected output:
-----------------
-Below is a sample output from run_test.pl on NT. Please note that
-since in this test we are using ORB debug option
-
-1) test output may look different from that shown below as ORB debug
- messages are modified by developers
-2) the output may contain some debug information irrelevant to this
- test
-
-
-********** RTCORBA Explicit Binding Unit Test
-
-<IOR:010000000d00000049444c3a546573743a312e300000000002000000000000007e000000010
-102cd050000006865726100cd37081b00000014010f005253547078283a180e0c000000000001000
-00001000000cd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd010
-00100000000000901010000000000024f41541600000001cdcdcd01000000050000006865726100c
-d3708ffff0000024f41547e000000010102cd050000006865726100cd38081b00000014010f00525
-3547078283a180e0c00000000000100000001000000cd03000000000000000800000001cdcdcd004
-f4154010000001400000001cdcdcd01000100000000000901010000000000024f41541600000001c
-dcdcd01000000050000006865726100cd3808ffff>
-
-TAO (964|300) Loaded default protocol <IIOP_Factory>
-TAO (964|300) Loaded default protocol <SHMIOP_Factory>
-
- Test 1
-TAO (964|300) Connector::connect - looking for SHMIOP connection.
-TAO (964|300) SHMIOP connection to server <127.0.0.1:2104> on 320
-
- Test 2
-TAO (964|300) Connector::connect - looking for SHMIOP connection.
-Server: test_method invoked.
-
- Test 3
-Inconsistent policies contain ClientProtocolPolicy, as expected.
-
- Testing over - shutting down
-TAO (964|300) Connector::connect - looking for SHMIOP connection.
-Server ORB event loop finished
-TAO (964|300) SHMIOP_Client_Connection_Handler::handle_close (320, 511)
-
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc b/TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc
deleted file mode 100644
index a77351b5090..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/RTCORBA_Explicit_Binding.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/client.cpp b/TAO/tests/RTCORBA/Explicit_Binding/client.cpp
deleted file mode 100644
index 25e0135f39b..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/client.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/Strategies/advanced_resource.h"
-#include "tao/RTCORBA/RTCORBA.h"
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <ior> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB, parse arguments, and resolve references.
-
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RTORB.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return -1;
-
- // PolicyCurrent.
- object = orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (policy_current.in (), "PolicyCurrent")
- == -1)
- return -1;
-
- // Test object.
- object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Test_var server = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server.in (), "server") == -1)
- return -1;
-
- // Test 1: Check that <validate_connection> establishes an
- // appropriate connection for the current set of effective
- // policies.
- // Set ClientProtocolPolicy override to SHMIOP, and invoke
- // <validate_connection> on the object. This should succeed, and
- // SHMIOP connection should get established.
- RTCORBA::ProtocolList protocols;
- protocols.length (1);
- protocols[0].protocol_type = TAO_TAG_SHMEM_PROFILE;
- protocols[0].transport_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
- protocols[0].orb_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
-
- CORBA::PolicyList policy_list;
- policy_list.length (1);
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 1\n"));
-
- CORBA::PolicyList_var pols;
- int status = server->_validate_connection (pols.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (!status)
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: <validate_connection> returned FALSE\n"));
-
- // Test 2: Check that connection established with
- // <validate_connection> is used for subsequent invocations.
- // Invoke <test_method> on the object. This should succeed and
- // NO new connections should get established.
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 2\n"));
- server->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test 3: Check that <validate_connection> detects policy
- // misconfigurations and reports them through
- // <inconsistent_policies> argument.
- // Set ClientProtocolPolicy override to UIOP, call
- // <validate_connection>. It should return FALSE, and
- // <inconsistent_policies> should contain the problematic
- // override.
- ACE_DEBUG ((LM_DEBUG,
- "\n Test 3\n"));
-
- protocols[0].protocol_type = TAO_TAG_UIOP_PROFILE;
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- status = server->_validate_connection (pols.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (status)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("<validate_connection> returned TRUE\n")));
-
- //
- // This portion of code has been temporarily disabled.
- //
- /*
- if (pols.ptr () != 0
- && pols->length () == 1
- && pols[0u]->policy_type () == RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE)
- ACE_DEBUG ((LM_DEBUG,
- "Inconsistent policies contain "
- "ClientProtocolPolicy, as expected.\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: Inconsistent policies do not "
- "contain what's expected.\n"));
- */
-
- // Testing over. Shut down Server ORB.
- protocols[0].protocol_type = TAO_TAG_SHMEM_PROFILE;
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Testing over - shutting down\n"));
- ACE_OS::sleep (2);
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_OS::sleep (2);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in Explicit_Binding test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl b/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
deleted file mode 100755
index 288bd3ddc2e..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-print STDERR "\n********** RTCORBA Explicit Binding Unit Test\n\n";
-
-
-$SV = new PerlACE::Process ("server", "-o $iorfile -ORBendpoint iiop:// -ORBendpoint shmiop://");
-$CL = new PerlACE::Process ("client", "-o file://$iorfile -ORBdebuglevel 1");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-# Clean up SHMIOP files
-PerlACE::check_n_cleanup_files ("server_shmiop_*");
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/server.cpp b/TAO/tests/RTCORBA/Explicit_Binding/server.cpp
deleted file mode 100644
index 7c434d0c2e5..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/server.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-
-#include "tao/Strategies/advanced_resource.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-
-class Test_i : public POA_Test
-{
- // = TITLE
- // An implementation for the Test interface in test.idl
- //
-public:
- Test_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Test methods.
- void test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED/* ACE_ENV_SINGLE_ARG_PARAMETER */)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Server: test_method invoked.\n"));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-//*************************************************************************
-
-const char *ior_output_file = "test.ior";
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-int
-create_object (PortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb,
- Test_i *server_impl,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- // Register with poa.
- PortableServer::ObjectId_var id =
- poa->activate_object (server_impl ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK_RETURN (-1);
-
- CORBA::Object_var server =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Print out the IOR.
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG, "<%s>\n\n", ior.in ()));
-
- // Print ior to the file.
- if (filename != 0)
- {
- FILE *output_file= ACE_OS::fopen (filename, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (root_poa.in (), "RootPOA") == -1)
- return -1;
-
- // POAManager.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Servant.
- Test_i server_impl (orb.in ());
-
- // Create Object.
- int result;
- result = create_object (root_poa.in (),
- orb.in (),
- &server_impl,
- ior_output_file
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result == -1)
- return -1;
-
- // Run ORB Event loop.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in Explicit_Binding test server:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/svc.conf b/TAO/tests/RTCORBA/Explicit_Binding/svc.conf
deleted file mode 100644
index 57fc20f1023..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/svc.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Options for SHMIOP protocol
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop"
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/svc.conf.xml b/TAO/tests/RTCORBA/Explicit_Binding/svc.conf.xml
deleted file mode 100644
index 0c3f02e1362..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/svc.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options for SHMIOP protocol -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/test.idl b/TAO/tests/RTCORBA/Explicit_Binding/test.idl
deleted file mode 100644
index b50f6cfef47..00000000000
--- a/TAO/tests/RTCORBA/Explicit_Binding/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method ();
- // Print out a message.
-
- oneway void shutdown ();
- // Shut down the ORB.
-};
diff --git a/TAO/tests/RTCORBA/Linear_Priority/.cvsignore b/TAO/tests/RTCORBA/Linear_Priority/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Linear_Priority/README b/TAO/tests/RTCORBA/Linear_Priority/README
deleted file mode 100644
index 5064c84bdce..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/README
+++ /dev/null
@@ -1,36 +0,0 @@
-$Id$
-
-Description:
-
-This is a test for the Linear Priority mapping in TAO. In addition,
-this test combines and tests several RT policies in different ways.
-This test can also be used for testing the different scheduling
-policies (e.g., FIFO, RR, OTHER) by using the ORBSchedPolicy and
-ORBScopePolicy options in svc.conf file.
-
-- The server can be setup to use bands or no bands and thread lanes or
- no lanes.
-
-- The client can be setup to use bands or no bands and different
- invocation priorities. It creates a thread for each invocation
- priority and issues multiple requests to the server from each
- thread.
-
-- The following policy combinations are tested in this example:
- __________________________________________________
-
- Server-side Thread Client-side Multi-priority
- Bands Lanes Bands Clients
- __________________________________________________
-
- NO NO NO NO
- YES NO NO NO
- NO YES NO NO
- YES YES NO NO
- NO NO YES NO
- NO YES YES NO
- NO NO NO YES
- YES NO NO YES
- YES YES NO YES
- NO NO YES YES
- NO YES YES YES
diff --git a/TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc b/TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc
deleted file mode 100644
index 87178218057..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/RTCORBA_Linear_Priority.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Linear_Priority/bands b/TAO/tests/RTCORBA/Linear_Priority/bands
deleted file mode 100644
index a3f7158df97..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/bands
+++ /dev/null
@@ -1 +0,0 @@
-0 5000 5000 10000 10000 15000 15000 20000 20000 25000 25000 30000
diff --git a/TAO/tests/RTCORBA/Linear_Priority/client.cpp b/TAO/tests/RTCORBA/Linear_Priority/client.cpp
deleted file mode 100644
index 6588b34f7a4..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/client.cpp
+++ /dev/null
@@ -1,389 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/ORB_Core.h"
-#include "../check_supported_priorities.cpp"
-#include "../common_args.cpp"
-
-static int iterations = 5;
-static int shutdown_server = 0;
-static int debug = 1;
-
-static const char *ior = "file://ior";
-
-static const char *invocation_priorities_file = "invocation_priorities";
-static const char *bands_file = "empty_file";
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "b:d:p:k:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'd':
- debug = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case 'p':
- invocation_priorities_file = get_opts.opt_arg ();
- break;
-
- case 'b':
- bands_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-b <bands_file> "
- "-d <debug> "
- "-p <invocation_priorities_file> "
- "-k ior "
- "-i iterations "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-class Worker_Thread : public ACE_Task_Base
-{
-public:
- Worker_Thread (ACE_Thread_Manager &thread_manager,
- test_ptr test,
- RTCORBA::Current_ptr current,
- CORBA::Short priority);
-
- int svc (void);
-
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- test_var test_;
- RTCORBA::Current_var current_;
- CORBA::Short priority_;
-};
-
-Worker_Thread::Worker_Thread (ACE_Thread_Manager &thread_manager,
- test_ptr test,
- RTCORBA::Current_ptr current,
- CORBA::Short priority)
- : ACE_Task_Base (&thread_manager),
- test_ (test::_duplicate (test)),
- current_ (RTCORBA::Current::_duplicate (current)),
- priority_ (priority)
-{
-}
-
-void
-Worker_Thread::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Try to validate the connection several times, ignoring transient
- // exceptions. If the connection can still not be setup, return
- // failure.
- CORBA::PolicyList_var inconsistent_policies;
- int max_attempts = 10;
- int current_attempt = 0;
- for (;;)
- {
- ACE_TRY
- {
- ++current_attempt;
- this->test_->_validate_connection (inconsistent_policies.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If successful, we are done.
- return;
- }
- ACE_CATCH (CORBA::TRANSIENT, exception)
- {
- // If we have reach our maximum number of tries, throw exception.
- if (current_attempt == max_attempts)
- ACE_RE_THROW;
- // Otherwise, ignore...
- }
- ACE_CATCHANY
- {
- // Rethrow any other exceptions.
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-}
-
-int
-Worker_Thread::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->current_->the_priority (this->priority_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i < iterations; i++)
- {
- this->test_->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Worker Thread exception:");
- }
- ACE_ENDTRY;
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- current->the_priority (0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ULong_Array priorities;
- int result =
- get_values ("client",
- invocation_priorities_file,
- "invocation priorities",
- priorities,
- debug);
- if (result != 0)
- return result;
-
- CORBA::PolicyList policies;
-
- result =
- get_priority_bands ("client",
- bands_file,
- rt_orb.in (),
- policies,
- debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- policy_manager->set_policy_overrides (policies,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- u_long i = 0;
-
- // Thread Manager for managing workers.
- ACE_Thread_Manager thread_manager;
-
- // Workers.
- Worker_Thread **workers = 0;
-
- ACE_NEW_RETURN (workers,
- Worker_Thread *[priorities.size ()],
- -1);
-
- for (i = 0;
- i < priorities.size ();
- ++i)
- {
- ACE_NEW_RETURN (workers[i],
- Worker_Thread (thread_manager,
- test.in (),
- current.in (),
- priorities[i]),
- -1);
-
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- this->orb_->orb_core ()->orb_params ()->thread_creation_flags ();
-
- result =
- workers[i]->activate (flags);
- if (result != 0)
- return result;
- }
-
- thread_manager.wait ();
-
- for (i = 0;
- i < priorities.size ();
- ++i)
- {
- delete workers[i];
- }
- delete[] workers;
-
- if (shutdown_server)
- {
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Unexpected exception!");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Unexpected exception!");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Linear_Priority/empty_file b/TAO/tests/RTCORBA/Linear_Priority/empty_file
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/empty_file
+++ /dev/null
diff --git a/TAO/tests/RTCORBA/Linear_Priority/invocation_priorities b/TAO/tests/RTCORBA/Linear_Priority/invocation_priorities
deleted file mode 100644
index 2d32fee52d0..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/invocation_priorities
+++ /dev/null
@@ -1 +0,0 @@
-2500 7500 12500 17500 22500 27500 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Linear_Priority/lanes b/TAO/tests/RTCORBA/Linear_Priority/lanes
deleted file mode 100644
index 02162bc453f..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/lanes
+++ /dev/null
@@ -1 +0,0 @@
-0 5000 10000 15000 20000 25000 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Linear_Priority/run_test.pl b/TAO/tests/RTCORBA/Linear_Priority/run_test.pl
deleted file mode 100755
index b5b844fcfa7..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/run_test.pl
+++ /dev/null
@@ -1,142 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile("ior");
-
-@configurations =
- (
- {
- server => "-b empty_file -l empty_file",
- client => "-b empty_file -p empty_file -x",
- },
- {
- server => "-b bands -l empty_file",
- client => "-b empty_file -p empty_file -x",
- },
- {
- server => "-b empty_file -l lanes",
- client => "-b empty_file -p empty_file -x",
- },
- {
- server => "-b bands -l lanes",
- client => "-b empty_file -p empty_file -x",
- },
- {
- server => "-b empty_file -l empty_file",
- client => "-b bands -p empty_file -x",
- },
- {
- server => "-b empty_file -l lanes",
- client => "-b bands -p empty_file -x",
- },
- {
- server => "-b empty_file -l empty_file",
- client => "-b empty_file -p invocation_priorities -x",
- },
- {
- server => "-b bands -l empty_file",
- client => "-b empty_file -p invocation_priorities -x",
- },
- {
- server => "-b bands -l lanes",
- client => "-b empty_file -p invocation_priorities -x",
- },
- {
- server => "-b empty_file -l empty_file",
- client => "-b bands -p invocation_priorities -x",
- },
- {
- server => "-b empty_file -l lanes",
- client => "-b bands -p invocation_priorities -x",
- },
- );
-
-sub run_client
-{
- my $arg = shift;
- $CL = new PerlACE::Process ("client", "-k file://$iorfile " . $arg);
-
- $CL->Spawn ();
-
- $client = $CL->WaitKill (120);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- zap_server (1);
- }
-}
-
-sub run_server
-{
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", @_);
- }
- else {
- $SV = new PerlACE::Process ("server", @_);
- }
- if ($SV->Spawn () == -1) {
- exit 1;
- }
-
- if (PerlACE::waitforfile_timed ($iorfile, 10) == -1)
- {
- check_supported_priorities ($SV);
- print STDERR "ERROR: cannot find ior file: $iorfile\n";
- $status = 1;
- zap_server (1);
- }
-}
-
-sub zap_server
-{
- $server = $SV->WaitKill (5);
-
- if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- unlink $iorfile;
-
- if ($_[0])
- {
- exit $status;
- }
-}
-
-sub check_supported_priorities
-{
- $process = shift;
- $returnVal = $process->TimedWait (1);
- if ($returnVal == 2) {
- # Mark as no longer running to avoid errors on exit.
- $process->{RUNNING} = 0;
- exit 0;
- }
-}
-
-for $test (@configurations)
-{
- print STDERR "\n******************************************************\n";
-
- unlink $iorfile;
-
- run_server ($test->{server});
-
- run_client ($test->{client});
-
- zap_server (0);
-}
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Linear_Priority/server.cpp b/TAO/tests/RTCORBA/Linear_Priority/server.cpp
deleted file mode 100644
index 9129c0f3ee9..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/server.cpp
+++ /dev/null
@@ -1,354 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "tao/ORB_Core.h"
-#include "testS.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-#include "../common_args.cpp"
-
-class test_i :
- public POA_test
-{
-public:
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::method\n"));
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::shutdown\n"));
-
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-static CORBA::ULong stacksize = 0;
-static CORBA::ULong static_threads = 2;
-static CORBA::ULong dynamic_threads = 0;
-static CORBA::Boolean allow_request_buffering = 0;
-static CORBA::ULong max_buffered_requests = 0;
-static CORBA::ULong max_request_buffer_size = 0;
-static CORBA::Boolean allow_borrowing = 0;
-
-static const char *ior = "ior";
-static int debug = 1;
-
-static const char *bands_file = "bands";
-static const char *lanes_file = "lanes";
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "b:d:l:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'b':
- bands_file = get_opts.opt_arg ();
- break;
-
- case 'd':
- debug = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'l':
- lanes_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-b <bands_file> "
- "-d <debug> "
- "-l <lanes_file> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-static void
-write_iors_to_file (CORBA::Object_ptr object,
- CORBA::ORB_ptr orb,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- FILE *file =
- ACE_OS::fopen (filename, "w");
- ACE_ASSERT (file != 0);
-
- CORBA::String_var ior =
- orb->object_to_string (object
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- u_int result = 0;
- result =
- ACE_OS::fprintf (file,
- "%s",
- ior.in ());
-
- ACE_ASSERT (result == ACE_OS::strlen (ior.in ()));
- ACE_UNUSED_ARG (result);
-
- ACE_OS::fclose (file);
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyList policies;
-
- int result =
- get_priority_bands ("server",
- bands_file,
- rt_orb.in (),
- policies,
- debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- result =
- get_priority_lanes ("server",
- lanes_file,
- rt_orb.in (),
- stacksize,
- static_threads,
- dynamic_threads,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size,
- allow_borrowing,
- policies,
- debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- CORBA::Policy_var priority_model_policy =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Implicit_activation policy.
- CORBA::Policy_var implicit_activation_policy =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- priority_model_policy;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- implicit_activation_policy;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("child",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (this->orb_.in (),
- poa.in ()),
- CORBA::NO_MEMORY ());
- ACE_TRY_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- write_iors_to_file (test.in (),
- this->orb_.in (),
- ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Linear_Priority/svc.conf b/TAO/tests/RTCORBA/Linear_Priority/svc.conf
deleted file mode 100644
index 56e9a13fea0..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/svc.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Options required for regular testing; comment out for real-time testing
-static RT_ORB_Loader "-ORBPriorityMapping linear"
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBPriorityMapping linear -ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/Linear_Priority/svc.conf.xml b/TAO/tests/RTCORBA/Linear_Priority/svc.conf.xml
deleted file mode 100644
index b798a25865d..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/svc.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options required for regular testing -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping linear"/>
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBPriorityMapping linear -ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Linear_Priority/test.idl b/TAO/tests/RTCORBA/Linear_Priority/test.idl
deleted file mode 100644
index 93c7ac56f50..00000000000
--- a/TAO/tests/RTCORBA/Linear_Priority/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
-
- void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/.cvsignore b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/.cvsignore
deleted file mode 100644
index 7f6ba2d23d8..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-client
-server
-test_run.data
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README
deleted file mode 100644
index 0cf16bae659..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README
+++ /dev/null
@@ -1,41 +0,0 @@
-$Id$
-
-This test involves a multithreaded client. The purpose of the test is
-to verify that client-side and server-side RTCORBA processing works ok
-when multiple threads are making invocations.
-
-NOTE:
------
-
-Since output verification script relies on ORB debug messages, i.e.,
-it checks for certain debug messages, it is BRITTLE. Whenever ORB
-developers modify/remove certain debug messages in the ORB, the output
-verification script may start reporting that there is an error, since
-something it was looking for was not found. In such case,
-process-output.pl must be updated to reflect debug output changes.
-
-Description
------------
-
-Server creates an object with RTCORBA::CLIENT_PROPAGATED priority
-model, and writes its IOR to the file.
-
-Client spawns two threads of different priorities. Each thread sets
-RTCORBA::ClientProtocolPolicy override to a single protocol on the
-PolicyCurrent level. After setting the override, each thread performs
-a number of invocations on the server object in a loop. The number of
-invocations, each thread's priority and protocol are all specified
-through command-line arguments.
-
-This test consists of two parts. In the first, we run client and
-server, which follow the description above. We also turn on the
-debugging output for the server, and collect the entire test output
-(client and server) into a data file. The second part of the test is
-verifying the output of the test using process-output.pl perl script.
-(The perl script is used since a large number of iterations results in
-a sizeable output, which is impractical to verify manually).
-
-run_test.pl does both, i.e., it runs client and server and then runs
-the verification script on the output. See run_test.pl for
-instructions on how to run both client/server and the verification
-script.
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc
deleted file mode 100644
index a77351b5090..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/RTCORBA_MT_Client_Proto_Prio.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
deleted file mode 100644
index de8d374edf7..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
+++ /dev/null
@@ -1,440 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTCORBA/Priority_Mapping_Manager.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "ace/Barrier.h"
-#include "tao/ORB_Core.h"
-#include "../check_supported_priorities.cpp"
-#include "tao/Strategies/advanced_resource.h"
-
-class Worker_Thread : public ACE_Task_Base
-{
- // = TITLE
- // Runs one client worker thread.
- //
- // = DESCRIPTION
- // Sets ClientProtocolPolicy override to the specified value on
- // the Current level, sets thread priority to the specified value
- // and waits on barrier for other worker threads. Then loops
- // making invocations on the specified server object.
- //
-public:
- Worker_Thread (CORBA::ORB_ptr orb,
- Test_ptr server,
- CORBA::ULong protocol_type,
- ACE_Barrier *barrier);
- // Constructor.
-
- virtual int svc (void);
- // Do work.
-
-private:
- CORBA::ORB_ptr orb_;
- // ORB.
-
- Test_ptr server_;
- // The server.
-
- CORBA::ULong protocol_type_;
- // Protocol for ClientProtocolPolicy.
-
- ACE_Barrier *synchronizer_;
- // Mechanism for synchronization with other worker threads.
-};
-
-// ****************************************************************
-const char *ior = "file://test.ior";
-int iterations = 100;
-CORBA::Short priority1 = -1;
-CORBA::Short priority2 = -1;
-CORBA::ULong protocol1 = 1413566210;
-CORBA::ULong protocol2 = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:a:b:e:f:n:");
- int c, result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'n':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'o':
- ior = get_opts.opt_arg ();
- break;
- case 'a':
- result = ::sscanf (get_opts.opt_arg (),
- "%hd",
- &priority1);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-a> option"),
- -1);
- break;
- case 'b':
- result = ::sscanf (get_opts.opt_arg (),
- "%hd",
- &priority2);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-b> option"),
- -1);
- break;
- case 'e':
- result = ::sscanf (get_opts.opt_arg (),
- "%u",
- &protocol1);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-e> option"),
- -1);
- break;
- case 'f':
- result = ::sscanf (get_opts.opt_arg (),
- "%u",
- &protocol2);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-f> option"),
- -1);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <ior> "
- "-a <priority1> "
- "-b <priority2> "
- "-e <protocol_type1> "
- "-f <protocol_type2> "
- "-n <number_of_iterations> "
- "\n",
- argv [0]),
- -1);
- }
-
- if (priority1 < 0
- || priority2 < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Valid thread priorities must be specified.\n"
- "See README for command-line options.\n"),
- -1);
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- // Priority Mapping Manager.
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("PriorityMappingManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::PriorityMappingManager_var mapping_manager =
- RTCORBA::PriorityMappingManager::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (mapping_manager.in (), "Mapping Manager") == -1)
- return -1;
-
- RTCORBA::PriorityMapping *pm =
- mapping_manager->mapping ();
-
- // RTCurrent.
- object =
- this->orb_->resolve_initial_references ("RTCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (current.in (), "RTCurrent") == -1)
- return -1;
-
- // Obtain Test object reference.
- object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Test_var server = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server.in (), "Test object") == -1)
- return -1;
-
- // Check that test object is configured with CLIENT_PROPAGATED
- // PriorityModelPolicy.
- CORBA::Policy_var policy =
- server->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PriorityModelPolicy_var priority_policy =
- RTCORBA::PriorityModelPolicy::_narrow (policy.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (check_for_nil (priority_policy.in (), "PriorityModelPolicy") == -1)
- return -1;
-
- RTCORBA::PriorityModel priority_model =
- priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (priority_model != RTCORBA::CLIENT_PROPAGATED)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: priority_model != "
- "RTCORBA::CLIENT_PROPAGATED!\n"),
- -1);
-
- // Spawn two worker threads.
- ACE_Barrier thread_barrier (2);
- int flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- this->orb_->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Worker 1.
- Worker_Thread worker1 (this->orb_.in (),
- server.in (),
- protocol1,
- &thread_barrier);
-
- CORBA::Short native_priority1 = 0;
- if (pm->to_native (priority1, native_priority1) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot convert corba priority %d to native priority\n",
- priority1),
- -1);
-
- if (worker1.activate (flags,
- 1, 0,
- native_priority1) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate first client worker threads\n"),
- -1);
-
- // Worker 2.
- Worker_Thread worker2 (this->orb_.in (),
- server.in (),
- protocol2,
- &thread_barrier);
-
- CORBA::Short native_priority2 = 0;
- if (pm->to_native (priority2, native_priority2) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot convert corba priority %d to native priority\n",
- priority2),
- -1);
-
- if (worker2.activate (flags,
- 1, 0,
- native_priority2) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate second client worker threads\n"),
- -1);
-
- // Wait for worker threads to finish.
- ACE_Thread_Manager::instance ()->wait ();
-
- // Testing over. Shut down the server.
- ACE_DEBUG ((LM_DEBUG, "Client threads finished\n"));
- current->the_priority (priority1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception in MT_Client_Protocol_Priority test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB, resolve references and parse arguments.
-
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception in MT_Client_Protocol_Priority test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-// ****************************************************************
-
-Worker_Thread::Worker_Thread (CORBA::ORB_ptr orb,
- Test_ptr server,
- CORBA::ULong protocol_type,
- ACE_Barrier *thread_barrier)
- : orb_ (orb),
- server_ (server),
- protocol_type_ (protocol_type),
- synchronizer_ (thread_barrier)
-{
-}
-
-int
-Worker_Thread::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- // RTORB.
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return 0;
-
- // PolicyCurrent.
- object =
- this->orb_->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (policy_current.in (), "PolicyCurrent")
- == -1)
- return 0;
-
- // Set ClientProtocolPolicy override on the Current.
- RTCORBA::ProtocolList protocols;
- protocols.length (1);
- protocols[0].protocol_type = this->protocol_type_;
- protocols[0].transport_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
- protocols[0].orb_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
-
- CORBA::PolicyList policy_list;
- policy_list.length (1);
- policy_list[0] =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait for other threads.
- this->synchronizer_->wait ();
-
- for (int i = 0; i < iterations; ++i)
- {
- // Invoke method.
- this->server_->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Worker Thread exception:");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
deleted file mode 100755
index 56cc7f6a747..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
+++ /dev/null
@@ -1,161 +0,0 @@
-# $Id$
-# -*- perl -*-
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# Usage:
-# process-output.pl output-filename number-of-iterations priority1 priority2
-
-# This is a Perl script that processes the output of the
-# MT_Client_Protocol_Priority test run.
-
-# The following checks are performed:
-# 1) There are no errors or excpetion messages.
-# 2) Both server and client termination messages are present, i.e.,
-# "Client thrreads finished" and "Server ORB event loop finished".
-# 3) Number of times servant is invoked equals 2 * number of
-# iterations (for two threads).
-# 4) Number of requests using iiop is equal to the number of requests using
-# shmiop, which is equal to the specified number of iterations.
-# 5) Number of requests at priority1 is equal to the number of
-# requests at priority2, which is equal to the specified number of
-# iterations.
-
-# Command-line args.
-$input_file = $ARGV[0];
-$iterations = $ARGV[1];
-$priority1 = $ARGV[2];
-$priority2 = $ARGV[3];
-
-$errors = 0;
-
-# Open the output file.
-if ($input_file and $ARGV[1])
-{
- open (DATA, $input_file);
-}
-else
-{
- die "Usage: process-output.pl output-file-name "
- ."number-of-iterations priority1 priority2\n";
-}
-
-$thread_priority_pattern =
- "RTCORBA::CLIENT_PROPAGATED processing using default thread pool";
-
-$iiop_requests = 0;
-$shmiop_requests = 0;
-$priority1_requests = 0;
-$priority2_requests = 0;
-$threads_finished = 0;
-$server_shutdown = 0;
-$test_method = 0;
-
-# Process the output.
-while ($line = <DATA>)
-{
- # Process the line.
- chomp $line;
- @words = split (/ /, $line);
-
- if ($line eq "test_method invoked")
- {
- ++$test_method;
- }
-
- if ($words[3] eq "SHMIOP_Server_Connection_Handler::handle_input"
- and $threads_finished == 0)
- {
- ++$shmiop_requests;
- }
-
- if ($words[3] eq "IIOP_Server_Connection_Handler::handle_input"
- and $threads_finished == 0)
- {
- ++$iiop_requests;
- }
-
- if ($line eq "Client threads finished")
- {
- $threads_finished = 1;
- }
-
- if ($line eq "Server ORB event loop finished")
- {
- $server_shutdown = 1;
- }
-
- if ($line =~ /$thread_priority_pattern/
- and $threads_finished == 0)
- {
- if ($words[@words - 1] == $priority1)
- {
- ++$priority1_requests;
- }
- elsif ($words[@words - 1] == $priority2)
- {
- ++$priority2_requests;
- }
- }
-
- # Make sure there are no errors or exceptions.
- if ($line =~ /error/i
- or $line =~ /exception/i)
- {
- close (DATA);
- die "Error is detected in the output file <$input_file> \n";
- }
-}
-close (DATA);
-
-# Go through processing results.
-if ($server_shutdown == 0
- or $threads_finished == 0)
-{
- print "ERROR: Missing test over message\n";
- ++$errors;
-}
-#
-# This condition is busted right now because the debug message
-# that used to signal the iiop or shmiop request have been removed
-# so we cannot count them anymore. The count is in fact zero for
-# both. Nonetheless the method are invoked.
-#
-#elsif ($iiop_requests != $shmiop_requests
-# or $iiop_requests != $iterations)
-#
-elsif ($iiop_requests != $shmiop_requests)
-{
- print "ERROR: Number of iiop requests differs from shmiop differs from "
- ."number of iterations\n";
- print "IIOP Request: ";
- print $iiop_requests;
- print "\n";
-
- print "IIOP Request: ";
- print $iiop_requests;
- print "\n";
- ++$errors;
-}
-elsif (($priority1 != $priority2
- and ($priority1_requests != $priority2_requests
- or $priority1_requests != $iterations))
- or ($priority1 == $priority2
- and ($priority2_requests != 0
- or $priority1_requests != 2*$iterations)))
-{
- print "ERROR: Nonmatching number of requests of each priority\n";
- ++$errors;
-}
-elsif ($test_method != 2*$iterations)
-{
- print "ERROR: Incorrect number servant invocations\n";
- ++$errors;
-}
-else
-{
- print "Test output is ok \n";
-}
-
-exit $errors;
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl
deleted file mode 100755
index 5e38104203f..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl
+++ /dev/null
@@ -1,163 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$quiet = 0;
-
-# check for -q flag
-if ($#ARGV >= 0 && $ARGV[0] eq '-q') {
- $quiet = 1;
-}
-
-# Test parameters.
-$iorfile = PerlACE::LocalFile ("test.ior");
-$data_file = PerlACE::LocalFile ("test_run.data");
-
-$debug_level = 1;
-$iterations = 50;
-
-if ($^O eq "MSWin32") {
- $priority1 = 2;
- $priority2 = 1;
-}
-elsif ($^O eq "dec_osf") {
- $priority1 = 20;
- $priority2 = 25;
-}
-elsif ($^O eq "hpux") {
- $priority1 = 17;
- $priority2 = 22;
-}
-elsif ($^O eq "irix") {
- $priority1 = 27;
- $priority2 = 33;
-}
-else {
- $priority1 = 45;
- $priority2 = 50;
-}
-
-# Clean up leftovers from previous runs.
-unlink $iorfile;
-unlink $data_file;
-
-$server_args =
- "-ORBdebuglevel $debug_level "
- ."-ORBendpoint iiop:// "
- .(PerlACE::is_vxworks_test() ? "" : "-ORBendpoint shmiop:// ");
-
-$client_args =
- "-o file://$iorfile "
- ."-a $priority1 -b $priority2 -e 1413566210 -f 0 -n $iterations";
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior $server_args");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile $server_args");
-}
-$CL = new PerlACE::Process ("client", $client_args);
-
-print STDERR "\n********** MT Client Protocol & CLIENT_PROPAGATED combo Test\n\n";
-
-# Redirect the output of the test run to a file, so that we can process it later.
-
-open (OLDOUT, ">&STDOUT");
-open (STDOUT, ">$data_file") or die "can't redirect stdout: $!";
-open (OLDERR, ">&STDERR");
-open (STDERR, ">&STDOUT") or die "can't redirect stderror: $!";
-
-# just here to quiet warnings
-$fh = \*OLDOUT;
-$fh = \*OLDERR;
-
-# Run server and client.
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1)
-{
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Could not change priority levels so exit.
-
- # redirect STDOUT away from $data_file and set back to normal
- close (STDERR);
- close (STDOUT);
- open (STDOUT, ">&OLDOUT");
- open (STDERR, ">&OLDERR");
-
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
- }
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0)
-{
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0)
-{
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-close (STDERR);
-close (STDOUT);
-open (STDOUT, ">&OLDOUT");
-open (STDERR, ">&OLDERR");
-
-unlink $iorfile;
-
-# Run a processing script on the test output.
-print STDERR "\n********** Processing test output\n\n";
-
-$errors = system ("perl process-output.pl $data_file $iterations $priority1 $priority2") >> 8;
-
-if ($errors > 0)
-{
- $status = 1;
-
- if (!$quiet) {
- print STDERR "Errors Detected, printing output\n";
- if (open (DATA, "<$data_file"))
- {
- print STDERR "================================= Begin\n";
- print STDERR <DATA>;
- print STDERR "================================= End\n";
- close (DATA);
- }
- else
- {
- print STDERR "ERROR: Could not open $data_file\n";
- }
- }
-}
-
-unlink $iorfile;
-unlink $data_file;
-
-# Clean up shmiop files
-PerlACE::check_n_cleanup_files ("server_shmiop_*");
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf.xml b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf.xml
deleted file mode 100644
index e2b638b90a3..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/RTCORBA/MT_Client_Protocol_Priority/server.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <dynamic id="SHMIOP_Factory" type="Service_Object">
- <initializer path="TAO_Strategies" init="_make_TAO_SHMIOP_Protocol_Factory" params="-MMAPFilePrefix server_shmiop "/>
- </dynamic>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp
deleted file mode 100644
index 893dbddf688..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "tao/Strategies/advanced_resource.h"
-#include "../check_supported_priorities.cpp"
-
-class Test_i : public POA_Test
-{
- // = TITLE
- // An implementation for the Test interface in test.idl
- //
-public:
- Test_i (CORBA::ORB_ptr orb);
- // ctor
-
- void test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /* ACE_ENV_SINGLE_ARG_PARAMETER */)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "test_method invoked\n"));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-//*************************************************************************
-
-const char *ior_output_file = "test.ior";
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- // RTORB.
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return -1;
-
- // RootPOA.
- object =
- this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (root_poa.in (), "RootPOA") == -1)
- return -1;
-
- // POAManager.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create POA with CLIENT_PROPAGATED PriorityModelPolicy.
- CORBA::PolicyList poa_policy_list;
- poa_policy_list.length (1);
- poa_policy_list[0] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("Child_POA",
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create object.
- Test_i server_impl (this->orb_.in ());
-
- PortableServer::ObjectId_var id =
- child_poa->activate_object (&server_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server =
- child_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Print Object IOR.
- CORBA::String_var ior =
- this->orb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n\n", ior.in ()));
-
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Activate POA manager.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Start ORB event loop.
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in MT_Client_Protocol_Priority test server:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf
deleted file mode 100644
index d5c77cef4a9..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# Options for SHMIOP protocol
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop"
-
-# No other options required for regular testing
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf.xml b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf.xml
deleted file mode 100644
index 20e6e885da4..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options for SHMIOP protocol -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop"/>
- <!-- No other options required for regular testing -->
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/test.idl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/test.idl
deleted file mode 100644
index 521ad2529af..00000000000
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method ();
- // no-op.
-
- oneway void shutdown ();
- // Shut down the ORB.
-};
diff --git a/TAO/tests/RTCORBA/ORB_init/.cvsignore b/TAO/tests/RTCORBA/ORB_init/.cvsignore
deleted file mode 100644
index c32f7b71039..00000000000
--- a/TAO/tests/RTCORBA/ORB_init/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-ORB_init
diff --git a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp b/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp
deleted file mode 100644
index 9277febd56e..00000000000
--- a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// $Id$
-
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/ORB.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-int
-test_multiple_orbs (const char *test_name,
- int argc,
- char *argv[],
- int iterations,
- int rt_orb,
- int destroy)
-{
- CORBA::ORB_var *orbs =
- new CORBA::ORB_var[iterations];
-
- RTCORBA::RTORB_var *rt_orbs =
- new RTCORBA::RTORB_var[iterations];
-
- ACE_TRY_NEW_ENV
- {
- for (int i = 0;
- i < iterations;
- ++i)
- {
- char name[100];
- ACE_OS::sprintf (name, "%s %d", test_name, i);
-
- orbs[i] =
- CORBA::ORB_init (argc,
- argv,
- name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (rt_orb)
- {
- CORBA::Object_var object =
- orbs[i]->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- rt_orbs[i] =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (rt_orbs[i].in () != RTCORBA::RTORB::_nil ());
- }
- }
-
- if (destroy)
- {
- for (int i = 0;
- i < iterations;
- ++i)
- {
- orbs[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in ORB_init");
- return -1;
- }
- ACE_ENDTRY;
-
- delete[] rt_orbs;
- delete[] orbs;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int iterations = 5;
- int rt_orb = 0;
- int destroy = 0;
-
- int result =
- test_multiple_orbs ("non-RT ORBs, disable destroy",
- argc,
- argv,
- iterations,
- rt_orb,
- destroy);
- ACE_ASSERT (result == 0);
-
- destroy = 1;
- rt_orb = 0;
-
- result =
- test_multiple_orbs ("non-RT ORBs, enable destroy",
- argc,
- argv,
- iterations,
- rt_orb,
- destroy);
- ACE_ASSERT (result == 0);
-
- destroy = 0;
- rt_orb = 1;
-
- result =
- test_multiple_orbs ("RT ORBs, disable destroy",
- argc,
- argv,
- iterations,
- rt_orb,
- destroy);
- ACE_ASSERT (result == 0);
-
- destroy = 1;
- rt_orb = 1;
-
- result =
- test_multiple_orbs ("RT ORBs, enable destroy",
- argc,
- argv,
- iterations,
- rt_orb,
- destroy);
- ACE_ASSERT (result == 0);
-
- return result;
-}
diff --git a/TAO/tests/RTCORBA/ORB_init/README b/TAO/tests/RTCORBA/ORB_init/README
deleted file mode 100644
index c7aa666a92e..00000000000
--- a/TAO/tests/RTCORBA/ORB_init/README
+++ /dev/null
@@ -1,6 +0,0 @@
-$Id$
-
-This is a unit test for the creation of multiple RT ORBs.
-
-
-
diff --git a/TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc b/TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc
deleted file mode 100644
index 54605e4c57a..00000000000
--- a/TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc
+++ /dev/null
@@ -1,6 +0,0 @@
-// $Id$
-
-project (ORB_init_RT) : rt_client {
- exename = ORB_init
-}
-
diff --git a/TAO/tests/RTCORBA/ORB_init/run_test.pl b/TAO/tests/RTCORBA/ORB_init/run_test.pl
deleted file mode 100755
index 356ff8edb52..00000000000
--- a/TAO/tests/RTCORBA/ORB_init/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-print STDERR "\n********** RTCORBA ORB_init Unit Test **********\n\n";
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("ORB_init");
-}
-else {
- $T = new PerlACE::Process ("ORB_init");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/.cvsignore b/TAO/tests/RTCORBA/Persistent_IOR/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/README b/TAO/tests/RTCORBA/Persistent_IOR/README
deleted file mode 100644
index c5c2d19824d..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/README
+++ /dev/null
@@ -1,17 +0,0 @@
-$Id$
-
-Description:
-
-This test makes sure that:
-
-- For POAs using the default thread pool, the user can continue to use
--ORBEndpoint option.
-
-- Makes sure that if the user tries to combine thread pools and
-persistence, an InvalidPolicy exception is no longer thrown since this
-feature is now supported with the -ORBLaneEndpoint option.
-
-- Makes sure that for POAs using thread pools, the user can specify
-the protocol selection, protocol version, and other protocol specific
-options (basically everything other than the endpoint address)
-through the -ORBEndpoint option.
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc b/TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc
deleted file mode 100644
index 87178218057..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/RTCORBA_Persistent_IOR.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/client.cpp b/TAO/tests/RTCORBA/Persistent_IOR/client.cpp
deleted file mode 100644
index 6e9b26cbec7..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/client.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-
-static int iterations = 5;
-static int shutdown_server = 0;
-
-static const char *ior = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k ior "
- "-i iterations "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- if (ior == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error: No IOR specified\n"),
- -1);
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- CORBA::Object_var object =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (test.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil reference <%s>\n",
- ior),
- 1);
- }
-
- for (int i = 0; i < iterations; i++)
- {
- test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (shutdown_server)
- {
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Unexpected exception!");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/continuous.conf b/TAO/tests/RTCORBA/Persistent_IOR/continuous.conf
deleted file mode 100644
index 8d8795f4817..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous"
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/continuous.conf.xml b/TAO/tests/RTCORBA/Persistent_IOR/continuous.conf.xml
deleted file mode 100644
index f297697bc7c..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/run_test.pl b/TAO/tests/RTCORBA/Persistent_IOR/run_test.pl
deleted file mode 100755
index 5b066f419eb..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/run_test.pl
+++ /dev/null
@@ -1,145 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iiop_port = 27532;
-$tp_iiop_port = 27533;
-
-$continuous = ($^O eq 'hpux');
-
-$extra_server_args = ($continuous ? "-ORBSvcConf continuous$PerlACE::svcconf_ext " : '') .
- "-d 1 -ORBEndpoint iiop://1.2\@:$iiop_port -ORBLaneEndpoint 2:0 iiop://1.2\@:$tp_iiop_port";
-
-@iorfiles =
- (
- "not_used_ior_1",
- "not_used_ior_2",
- "persistent_ior",
- "transient_ior",
- "tp_persistent_ior",
- );
-
-@configurations =
- (
- {
- iorfiles => [ "persistent_ior", "tp_persistent_ior", "transient_ior" ],
- server => "-a tp_persistent_ior -p persistent_ior -t transient_ior $extra_server_args",
- clients => [ "-k file://".PerlACE::LocalFile("tp_persistent_ior"),
- "-k file://".PerlACE::LocalFile("persistent_ior"),
- "-k file://".PerlACE::LocalFile("transient_ior")." -x" ],
- },
- {
- iorfiles => [ "not_used_ior_1", "not_used_ior_2", "transient_ior" ],
- server => "-a not_used_ior_1 -p not_used_ior_2 -t transient_ior $extra_server_args",
- clients => [ "-k file://".PerlACE::LocalFile("tp_persistent_ior"),
- "-k file://".PerlACE::LocalFile("persistent_ior"),
- "-k file://".PerlACE::LocalFile("transient_ior")." -x" ],
- },
- );
-
-sub run_client
-{
- print "\nRunning client with the following args: @_\n\n";
-
- $CL = new PerlACE::Process ("client", @_);
-
- $CL->Spawn ();
-
- $client = $CL->WaitKill (120);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- zap_server (1);
- }
-}
-
-sub run_server
-{
- my @parms = @_;
- my $args = $parms[0];
- my $iorfiles = $parms[1];
-
- print "\nRunning server with the following args: $args\n\n";
-
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", $args);
- }
- else {
- $SV = new PerlACE::Process ("server", $args);
- }
-
- $SV->Spawn ();
-
- $server = $SV->Wait (10);
- if ($server == 0)
- {
- return 0;
- }
-
- for $file (@$iorfiles)
- {
- if (PerlACE::waitforfile_timed ($file, 1) == -1)
- {
- print STDERR "ERROR: cannot find ior file: $file\n";
- $status = 1;
- zap_server (1);
- }
- }
-}
-
-sub zap_server
-{
- $server = $SV->WaitKill (5);
-
- if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- if ($_[0])
- {
- for $file (@iorfiles)
- {
- unlink $file;
- }
-
- exit $status;
- }
-}
-
-for $file (@iorfiles)
-{
- unlink $file;
-}
-
-for $test (@configurations)
-{
- print STDERR "\n******************************************************\n";
-
- run_server ($test->{server}, $test->{iorfiles});
-
- my $clients = $test->{clients};
- for $args (@$clients)
- {
- run_client ($args);
- }
-
- zap_server (0);
-}
-
-for $file (@iorfiles)
-{
- unlink $file;
-}
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/server.cpp b/TAO/tests/RTCORBA/Persistent_IOR/server.cpp
deleted file mode 100644
index d75fb4a6afd..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/server.cpp
+++ /dev/null
@@ -1,447 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testS.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_string.h"
-
-class test_i :
- public POA_test
-{
-public:
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::method\n"));
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::shutdown\n"));
-
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-static const char *persistent_ior = "persistent_ior";
-static const char *transient_ior = "transient_ior";
-static const char *tp_persistent_ior = "tp_persistent_ior";
-static int debug = 0;
-
-static CORBA::ULong stacksize = 0;
-static CORBA::ULong static_threads = 2;
-static CORBA::ULong dynamic_threads = 0;
-static RTCORBA::Priority default_thread_priority;
-static CORBA::Boolean allow_request_buffering = 0;
-static CORBA::ULong max_buffered_requests = 0;
-static CORBA::ULong max_request_buffer_size = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "a:p:t:d:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'a':
- tp_persistent_ior = get_opts.opt_arg ();
- break;
-
- case 'p':
- persistent_ior = get_opts.opt_arg ();
- break;
-
- case 't':
- transient_ior = get_opts.opt_arg ();
- break;
-
- case 'd':
- debug = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-a <tp persistent ior file> "
- "-p <persistent ior file> "
- "-t <transient ior file> "
- "-d <debug> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-static void
-write_iors_to_file (CORBA::Object_ptr object,
- CORBA::ORB_ptr orb,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- FILE *file =
- ACE_OS::fopen (filename, "w");
- ACE_ASSERT (file != 0);
-
- CORBA::String_var ior =
- orb->object_to_string (object
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "%s: %s\n",
- filename,
- ior.in ()));
-
- u_int result = 0;
- result =
- ACE_OS::fprintf (file,
- "%s",
- ior.in ());
-
- ACE_ASSERT (result == ACE_OS::strlen (ior.in ()));
- ACE_UNUSED_ARG (result);
-
- ACE_OS::fclose (file);
-}
-
-void
-create_poa_and_servant_with_persistent_policy (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr poa_manager
- ACE_ENV_ARG_DECL)
-{
- CORBA::PolicyList policies;
-
- CORBA::Policy_var implicit_activation_policy =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var lifespan_policy =
- root_poa->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- implicit_activation_policy;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- lifespan_policy;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("persistent_child",
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (orb,
- poa.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (test.in (),
- orb,
- persistent_ior
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-create_poa_and_servant_with_tp_policy (CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr poa_manager
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolId threadpool_id =
- rt_orb->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- default_thread_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var threadpool_policy =
- rt_orb->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var implicit_activation_policy =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::PolicyList policies;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- implicit_activation_policy;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- threadpool_policy;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("tp_child",
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (orb,
- poa.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (test.in (),
- orb,
- transient_ior
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-create_poa_with_tp_and_persistent_policy (CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr poa_manager
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolId threadpool_id =
- rt_orb->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- default_thread_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var threadpool_policy =
- rt_orb->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var implicit_activation_policy =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var lifespan_policy =
- root_poa->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::PolicyList policies;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- implicit_activation_policy;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- threadpool_policy;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- lifespan_policy;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("tp_persistent_child",
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (orb,
- poa.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (test.in (),
- orb,
- tp_persistent_ior
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- orb->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- create_poa_and_servant_with_tp_policy (orb.in (),
- rt_orb.in (),
- root_poa.in (),
- poa_manager.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- create_poa_and_servant_with_persistent_policy (orb.in (),
- root_poa.in (),
- poa_manager.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- create_poa_with_tp_and_persistent_policy (orb.in (),
- rt_orb.in (),
- root_poa.in (),
- poa_manager.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::INTERNAL, ex)
- {
- if ((ex.minor() & 0x1F) == 9) {
- ACE_DEBUG ((LM_DEBUG, "You must be superuser to run "
- "this test on this platform.\n"));
- return 0;
- }
- else {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Persistent_IOR/test.idl b/TAO/tests/RTCORBA/Persistent_IOR/test.idl
deleted file mode 100644
index 5c4d926d6cf..00000000000
--- a/TAO/tests/RTCORBA/Persistent_IOR/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/Policies/.cvsignore b/TAO/tests/RTCORBA/Policies/.cvsignore
deleted file mode 100644
index a5bf361f073..00000000000
--- a/TAO/tests/RTCORBA/Policies/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Policies
diff --git a/TAO/tests/RTCORBA/Policies/Policies.cpp b/TAO/tests/RTCORBA/Policies/Policies.cpp
deleted file mode 100644
index 63d97ab4717..00000000000
--- a/TAO/tests/RTCORBA/Policies/Policies.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/RTCORBA/Policies
-//
-// = FILENAME
-// Policies.cpp
-//
-// = DESCRIPTION
-// This program tests the construction of RTCORBA policies, both
-// through the generic ORB::create_policy interface and the
-// RTCORBA specific interfaces.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-//=========================================================================
-
-#include "tao/ORB.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/AnyTypeCode/Any.h"
-
-#include "ace/Log_Msg.h"
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB first.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rtorb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- /*
- * The following code should be reenabled once the OMG spec has
- * been fixed such that a RTCORBA::PriorityModelPolicy can be
- * created by using the ORB::create_policy interface.
- *
- {
- RTCORBA::PriorityModelPolicy_var policy1 =
- rtorb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- RTCORBA::minPriority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= RTCORBA::CLIENT_PROPAGATED;
- policy_value <<= RTCORBA::minPriority;
-
- CORBA::Policy_var policy =
- orb->create_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PriorityModelPolicy_var policy2 =
- RTCORBA::PriorityModelPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->priority_model () == policy2->priority_model ());
- ACE_ASSERT (policy1->server_priority () == policy2->server_priority ());
- }
-
- */
-
- {
- RTCORBA::ThreadpoolId poolid = 0;
-
- RTCORBA::ThreadpoolPolicy_var policy1 =
- rtorb->create_threadpool_policy (poolid
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= poolid;
-
- CORBA::Policy_var policy =
- orb->create_policy (RTCORBA::THREADPOOL_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ThreadpoolPolicy_var policy2 =
- RTCORBA::ThreadpoolPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (policy1->threadpool () == policy2->threadpool ());
- }
-
- {
- RTCORBA::ProtocolList empty_protocols;
-
- RTCORBA::ServerProtocolPolicy_var policy1 =
- rtorb->create_server_protocol_policy (empty_protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= empty_protocols;
-
- CORBA::Policy_var policy =
- orb->create_policy (RTCORBA::SERVER_PROTOCOL_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ServerProtocolPolicy_var policy2 =
- RTCORBA::ServerProtocolPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ProtocolList_var protocols1 =
- policy1->protocols ();
- RTCORBA::ProtocolList_var protocols2 =
- policy2->protocols ();
-
- ACE_ASSERT (protocols1->length () == protocols2->length ());
- }
-
- {
- RTCORBA::ProtocolList empty_protocols;
-
- RTCORBA::ClientProtocolPolicy_var policy1 =
- rtorb->create_client_protocol_policy (empty_protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= empty_protocols;
-
- CORBA::Policy_var policy =
- orb->create_policy (RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ClientProtocolPolicy_var policy2 =
- RTCORBA::ClientProtocolPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::ProtocolList_var protocols1 =
- policy1->protocols ();
- RTCORBA::ProtocolList_var protocols2 =
- policy2->protocols ();
-
- ACE_ASSERT (protocols1->length () == protocols2->length ());
- }
-
- {
- RTCORBA::PrivateConnectionPolicy_var policy1 =
- rtorb->create_private_connection_policy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
-
- CORBA::Policy_var policy =
- orb->create_policy (RTCORBA::PRIVATE_CONNECTION_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PrivateConnectionPolicy_var policy2 =
- RTCORBA::PrivateConnectionPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- {
- RTCORBA::PriorityBands empty_priority_bands;
-
- RTCORBA::PriorityBandedConnectionPolicy_var policy1 =
- rtorb->create_priority_banded_connection_policy (empty_priority_bands
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any policy_value;
- policy_value <<= empty_priority_bands;
-
- CORBA::Policy_var policy =
- orb->create_policy (RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE,
- policy_value
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PriorityBandedConnectionPolicy_var policy2 =
- RTCORBA::PriorityBandedConnectionPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::PriorityBands_var priority_bands1 =
- policy1->priority_bands ();
- RTCORBA::PriorityBands_var priority_bands2 =
- policy2->priority_bands ();
-
- ACE_ASSERT (priority_bands1->length () == priority_bands2->length ());
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "%s successful\n",
- argv[0]));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Policies/Policies.mpc b/TAO/tests/RTCORBA/Policies/Policies.mpc
deleted file mode 100644
index 1e97eefaee4..00000000000
--- a/TAO/tests/RTCORBA/Policies/Policies.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(RTCORBA Policies Server): rt_server, minimum_corba {
-}
diff --git a/TAO/tests/RTCORBA/Policies/run_test.pl b/TAO/tests/RTCORBA/Policies/run_test.pl
deleted file mode 100755
index 8c87f1f6805..00000000000
--- a/TAO/tests/RTCORBA/Policies/run_test.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("Policies");
-}
-else {
- $T = new PerlACE::Process ("Policies");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/.cvsignore b/TAO/tests/RTCORBA/Policy_Combinations/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/README b/TAO/tests/RTCORBA/Policy_Combinations/README
deleted file mode 100644
index 7dd8ed6e665..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/README
+++ /dev/null
@@ -1,44 +0,0 @@
-$Id$
-
-Description:
-
-Test combines and tests several RT policies in different ways.
-
-- The IDL interface has two methods: method() and
- prioritized_method().
-
-- The client sets its thread to the default priority, calls method()
- which returns a priority. If the priority returned is different
- from <TAO_INVALID_PRIORITY>, the client sets its thread to the
- priority returned by the server and calls prioritized_method()
-
-- The servant returns the <client_priority_> member in method(). In
- prioritized_method(), it makes sure that the thread running the
- upcall is at priority <server_priority_>. These two members allow
- several different policies to be tested with the same code.
-
-- In addition to testing servants in the RootPOA and in a simple child
- POA, the following policy combinations are tested in this example:
- ________________________________________________________________________________
-
- Thread-pool BANDS PRIORITY MODEL Client Priority Server Priority
- ________________________________________________________________________________
-
- Default Pool NO CLIENT_PROPAGATED 3 3
- Default Pool NO SERVER_DECLARED 3 5
- Without Lanes NO CLIENT_PROPAGATED 1 1
- Without Lanes NO SERVER_DECLARED 1 5
- With Lanes NO CLIENT_PROPAGATED 2 2
- With Lanes NO SERVER_DECLARED 3 5
- Default Pool YES CLIENT_PROPAGATED 3 3
- Default Pool YES SERVER_DECLARED 1 5
- Without Lanes YES CLIENT_PROPAGATED 1 1
- Without Lanes YES SERVER_DECLARED 3 5
- With Lanes YES CLIENT_PROPAGATED 3 2
- With Lanes YES SERVER_DECLARED 1 5
-
- where the priorities are relative to the minimum priority of the
- thread scheduling policy used for the test.
-
-- This test uses the -ORBPriorityMapping continuous option.
-
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc b/TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc
deleted file mode 100644
index c7a5f0c3229..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/RTCORBA_Policy_Combinations.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/client.cpp b/TAO/tests/RTCORBA/Policy_Combinations/client.cpp
deleted file mode 100644
index 56f29a399f9..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/client.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "testC.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "../check_supported_priorities.cpp"
-
-static const char *ior = 0;
-static int iterations = 5;
-static int shutdown_server = 0;
-static RTCORBA::Priority default_thread_priority;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k ior "
- "-i iterations "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- if (ior == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "An IOR must be specified\n"),
- -1);
-
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i < iterations; i++)
- {
- current->the_priority (default_thread_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Short priority =
- test->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (priority != TAO_INVALID_PRIORITY)
- {
- current->the_priority (priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test->prioritized_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
-
- if (shutdown_server)
- {
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Unexpected exception!");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // The following finds out the lowest priority for this
- // scheduling policy. This will give us the biggest range on NT
- // since the default priority is 0 where as the lowest priority
- // is -15.
- int minimum_priority =
- ACE_Sched_Params::priority_min (orb->orb_core ()->orb_params ()->ace_sched_policy ());
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags,
- 1, 0,
- minimum_priority);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Unexpected exception!");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/run_test.pl b/TAO/tests/RTCORBA/Policy_Combinations/run_test.pl
deleted file mode 100755
index 0c424ce42f1..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/run_test.pl
+++ /dev/null
@@ -1,112 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-@iorfiles =
- (
- "root",
- "child",
- "default_pool_no_bands_client_propagated",
- "default_pool_no_bands_server_declared",
- "no_lanes_no_bands_client_propagated",
- "no_lanes_no_bands_server_declared",
- "lanes_no_bands_client_propagated",
- "lanes_no_bands_server_declared",
- "default_pool_bands_client_propagated",
- "default_pool_bands_server_declared",
- "no_lanes_bands_client_propagated",
- "no_lanes_bands_server_declared",
- "lanes_bands_client_propagated",
- "lanes_bands_server_declared",
- );
-
-sub run_client
-{
- $CL = new PerlACE::Process ("client", @_);
-
- $CL->Spawn ();
-
- $client = $CL->WaitKill (120);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- goto kill_server;
- }
-}
-
-for $file (@iorfiles)
-{
- unlink $file;
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-$SV->Spawn ();
-
-for $file (@iorfiles)
-{
- $file = PerlACE::LocalFile($file);
- if (PerlACE::waitforfile_timed ($file, $PerlACE::wait_interval_for_process_creation) == -1)
- {
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find ior file: $file\n";
- $status = 1;
- goto kill_server;
- }
- }
-
- print STDERR "\n******************************************************\n";
- print STDERR "Invoking methods on servant in $file poa\n";
- print STDERR "******************************************************\n\n";
-
- run_client ("-k file://$file");
-}
-
-{
- print STDERR "\n**************************\n";
- print STDERR "Shutting down the server\n";
- print STDERR "**************************\n\n";
-
- run_client ("-k file://$iorfiles[0] -i 0 -x");
-}
-
- kill_server:
-
-{
- $server = $SV->WaitKill (5);
-
- if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- for $file (@iorfiles)
- {
- unlink $file;
- }
-}
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/server.cpp b/TAO/tests/RTCORBA/Policy_Combinations/server.cpp
deleted file mode 100644
index db378d994bd..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/server.cpp
+++ /dev/null
@@ -1,975 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testS.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-class test_i :
- public POA_test
-{
-public:
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- CORBA::Short server_priority,
- CORBA::Short client_priority);
-
- CORBA::Short method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void prioritized_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
- CORBA::Short server_priority_;
- CORBA::Short client_priority_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- CORBA::Short server_priority,
- CORBA::Short client_priority)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa)),
- server_priority_ (server_priority),
- client_priority_ (client_priority)
-{
-}
-
-CORBA::Short
-test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::method\n"));
-
- return this->client_priority_;
-}
-
-void
-test_i::prioritized_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Short priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "test_i::prioritized_method: client = %d server = %d (should be %d)\n",
- this->client_priority_,
- priority,
- this->server_priority_));
-
- ACE_ASSERT (this->server_priority_ == priority);
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::shutdown\n"));
-
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-static CORBA::Short server_priority;
-static CORBA::Short client_priority;
-static CORBA::ULong stacksize = 0;
-static CORBA::ULong static_threads = 2;
-static CORBA::ULong dynamic_threads = 0;
-static RTCORBA::Priority default_thread_priority;
-static CORBA::Boolean allow_request_buffering = 0;
-static CORBA::ULong max_buffered_requests = 0;
-static CORBA::ULong max_request_buffer_size = 0;
-static CORBA::Boolean allow_borrowing = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "s:c:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 's':
- ::server_priority = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'c':
- ::client_priority = ::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-s server priority "
- "-c client priority "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-static void
-write_iors_to_file (CORBA::Object_ptr object,
- CORBA::ORB_ptr orb,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- FILE *file =
- ACE_OS::fopen (filename, "w");
- ACE_ASSERT (file != 0);
-
- CORBA::String_var ior =
- orb->object_to_string (object
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- u_int result = 0;
- result =
- ACE_OS::fprintf (file,
- "%s",
- ior.in ());
-
- ACE_ASSERT (result == ACE_OS::strlen (ior.in ()));
- ACE_UNUSED_ARG (result);
-
- ACE_OS::fclose (file);
-}
-
-class server
-{
-public:
- server (CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr poa_manager);
-
- void test_root_poa (ACE_ENV_SINGLE_ARG_DECL);
- void test_child_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- typedef void (server::*test_function) (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_default_pool_poa (CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_bands_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_no_lanes_poa (CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_lanes_poa (CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_no_bands_client_propagated_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_bands_client_propagated_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_no_bands_server_declared_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_bands_server_declared_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL);
-
- void test_default_pool_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_no_lanes_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_lanes_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_default_pool_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_no_lanes_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_lanes_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_default_pool_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_no_lanes_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_lanes_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_default_pool_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_no_lanes_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL);
-
- void test_lanes_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
-
- CORBA::ORB_var orb_;
- RTCORBA::RTORB_var rt_orb_;
- PortableServer::POA_var root_poa_;
- PortableServer::POAManager_var poa_manager_;
-};
-
-server::server (CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr poa_manager)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- rt_orb_ (RTCORBA::RTORB::_duplicate (rt_orb)),
- root_poa_ (PortableServer::POA::_duplicate (root_poa)),
- poa_manager_ (PortableServer::POAManager::_duplicate (poa_manager))
-{
-}
-
-void
-server::test_root_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (this->orb_.in (),
- this->root_poa_.in (),
- TAO_INVALID_PRIORITY,
- TAO_INVALID_PRIORITY),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (test.in (),
- this->orb_.in (),
- "root"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_child_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::PolicyList policies;
- policies.length (1);
- policies[policies.length () - 1] =
- this->root_poa_->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::POA_var poa =
- this->root_poa_->create_POA ("child",
- this->poa_manager_.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (this->orb_.in (),
- poa.in (),
- TAO_INVALID_PRIORITY,
- TAO_INVALID_PRIORITY),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (test.in (),
- this->orb_.in (),
- "child"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_default_pool_poa (CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- CORBA::PolicyList empty_policies;
- (this->*function) (empty_policies,
- server_priority,
- client_priority,
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_bands_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::PriorityBands bands;
- bands.length (3);
-
- bands[0].low = default_thread_priority;
- bands[0].high = default_thread_priority;
- bands[1].low = ::server_priority - 1;
- bands[1].high = ::server_priority + 1;
- bands[2].low = ::client_priority - 1;
- bands[2].high = ::client_priority + 1;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- this->rt_orb_->create_priority_banded_connection_policy (bands
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- (this->*function) (policies,
- server_priority,
- client_priority,
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_no_lanes_poa (CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolId threadpool_id =
- this->rt_orb_->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- default_thread_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var threadpool_policy =
- this->rt_orb_->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::PolicyList policies;
- policies.length (1);
- policies[0] =
- threadpool_policy;
-
- (this->*function) (policies,
- server_priority,
- client_priority,
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_lanes_poa (CORBA::Short server_priority,
- CORBA::Short client_priority,
- server::test_function function,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolLanes lanes;
- lanes.length (3);
-
- lanes[0].lane_priority = ::client_priority;
- lanes[0].static_threads = static_threads;
- lanes[0].dynamic_threads = dynamic_threads;
-
- lanes[1].lane_priority = ::server_priority;
- lanes[1].static_threads = static_threads;
- lanes[1].dynamic_threads = dynamic_threads;
-
- lanes[2].lane_priority = default_thread_priority;
- lanes[2].static_threads = static_threads;
- lanes[2].dynamic_threads = dynamic_threads;
-
- RTCORBA::ThreadpoolId threadpool_id =
- this->rt_orb_->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Policy_var threadpool_policy =
- this->rt_orb_->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::PolicyList policies;
- policies.length (1);
- policies[0] =
- threadpool_policy;
-
- (this->*function) (policies,
- server_priority,
- client_priority,
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_no_bands_client_propagated_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- this->rt_orb_->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- default_thread_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::POA_var poa =
- this->root_poa_->create_POA (test_name,
- this->poa_manager_.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- RTPortableServer::POA_var rt_poa =
- RTPortableServer::POA::_narrow (poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (this->orb_.in (),
- poa.in (),
- server_priority,
- client_priority),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- PortableServer::ObjectId_var id =
- rt_poa->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (object.in (),
- this->orb_.in (),
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_bands_client_propagated_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- this->test_bands_poa (policies,
- server_priority,
- client_priority,
- &server::test_no_bands_client_propagated_poa,
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_default_pool_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_default_pool_poa (::client_priority + 1,
- ::client_priority + 1,
- &server::test_no_bands_client_propagated_poa,
- "default_pool_no_bands_client_propagated"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_no_lanes_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_no_lanes_poa (::client_priority - 1,
- ::client_priority - 1,
- &server::test_no_bands_client_propagated_poa,
- "no_lanes_no_bands_client_propagated"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_lanes_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_lanes_poa (::client_priority,
- ::client_priority,
- &server::test_no_bands_client_propagated_poa,
- "lanes_no_bands_client_propagated"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_default_pool_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_default_pool_poa (::client_priority + 1,
- ::client_priority + 1,
- &server::test_bands_client_propagated_poa,
- "default_pool_bands_client_propagated"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_no_lanes_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_no_lanes_poa (::client_priority - 1,
- ::client_priority - 1,
- &server::test_bands_client_propagated_poa,
- "no_lanes_bands_client_propagated"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_lanes_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_lanes_poa (::client_priority,
- ::client_priority + 1,
- &server::test_bands_client_propagated_poa,
- "lanes_bands_client_propagated"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-}
-
-void
-server::test_no_bands_server_declared_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- this->rt_orb_->create_priority_model_policy (RTCORBA::SERVER_DECLARED,
- default_thread_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::POA_var poa =
- this->root_poa_->create_POA (test_name,
- this->poa_manager_.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- RTPortableServer::POA_var rt_poa =
- RTPortableServer::POA::_narrow (poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (this->orb_.in (),
- poa.in (),
- server_priority,
- client_priority),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- PortableServer::ObjectId_var id =
- rt_poa->activate_object_with_priority (servant,
- ::server_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (object.in (),
- this->orb_.in (),
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_bands_server_declared_poa (CORBA::PolicyList &policies,
- CORBA::Short server_priority,
- CORBA::Short client_priority,
- const char *test_name
- ACE_ENV_ARG_DECL)
-{
- this->test_bands_poa (policies,
- server_priority,
- client_priority,
- &server::test_no_bands_server_declared_poa,
- test_name
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_default_pool_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_default_pool_poa (::server_priority,
- ::client_priority + 1,
- &server::test_no_bands_server_declared_poa,
- "default_pool_no_bands_server_declared"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_no_lanes_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_no_lanes_poa (::server_priority,
- ::client_priority - 1,
- &server::test_no_bands_server_declared_poa,
- "no_lanes_no_bands_server_declared"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_lanes_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_lanes_poa (::server_priority,
- ::client_priority + 1,
- &server::test_no_bands_server_declared_poa,
- "lanes_no_bands_server_declared"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_default_pool_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_default_pool_poa (::server_priority,
- ::client_priority - 1,
- &server::test_bands_server_declared_poa,
- "default_pool_bands_server_declared"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_no_lanes_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_no_lanes_poa (::server_priority,
- ::client_priority + 1,
- &server::test_bands_server_declared_poa,
- "no_lanes_bands_server_declared"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-server::test_lanes_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->test_lanes_poa (::server_priority,
- ::client_priority - 1,
- &server::test_bands_server_declared_poa,
- "lanes_bands_server_declared"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The following sets the current thread to the lowest priority
- // for this scheduling policy. This will give us the biggest
- // range on NT since the default priority is 0 where as the
- // lowest priority is -15.
- ACE_hthread_t current_thread;
- ACE_Thread::self (current_thread);
-
- int sched_policy =
- this->orb_->orb_core ()->orb_params ()->ace_sched_policy ();
-
- int minimum_priority =
- ACE_Sched_Params::priority_min (sched_policy);
-
- int result =
- ACE_Thread::setprio (current_thread,
- minimum_priority);
- if (result != 0)
- return result;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client_priority =
- default_thread_priority + 2;
-
- server_priority =
- default_thread_priority + 5;
-
- object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server server (this->orb_.in (),
- rt_orb.in (),
- root_poa.in (),
- poa_manager.in ());
-
- server.test_root_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_child_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_default_pool_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_default_pool_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_no_lanes_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_no_lanes_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_lanes_no_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_lanes_no_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_default_pool_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_default_pool_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_no_lanes_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_no_lanes_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_lanes_bands_client_propagated_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server.test_lanes_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/svc.conf b/TAO/tests/RTCORBA/Policy_Combinations/svc.conf
deleted file mode 100644
index 4f8bca41eeb..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/svc.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# Options required for regular testing; comment out for real-time testing
-static RT_ORB_Loader "-ORBPriorityMapping continuous"
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBPriorityMapping continuous -ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
-
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/svc.conf.xml b/TAO/tests/RTCORBA/Policy_Combinations/svc.conf.xml
deleted file mode 100644
index 575234501d6..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/svc.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options required for regular testing -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous"/>
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBPriorityMapping continuous -ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Policy_Combinations/test.idl b/TAO/tests/RTCORBA/Policy_Combinations/test.idl
deleted file mode 100644
index 6d6ba1c9f84..00000000000
--- a/TAO/tests/RTCORBA/Policy_Combinations/test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-interface test
-{
- short method ();
-
- void prioritized_method ();
-
- void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/.cvsignore b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc
deleted file mode 100644
index ebf79370785..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/Priority_Inversion_With_Bands.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server, minimum_corba {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/README b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/README
deleted file mode 100644
index d49a4f22696..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/README
+++ /dev/null
@@ -1,51 +0,0 @@
-
-$Id$
-
-Description:
-
-This test check for priority inversion when using different RTCORBA
-configurations. The following four configurations are tested:
-
-(a) Thread lanes without bands
-(b) Thread lanes with bands
-(c) Thread pool without bands
-(d) Thread pool with bands
-
-The server has a servant registered with a POA serviced by a thread
-pool without lanes and another servant registered with a POA serviced
-by a thread pool with lanes. The thread pool with lanes has a low and
-a high priority lane.
-
-The client makes several oneway low priority invocations followed by
-several oneway high priority invocations. Each invocation performs
-about 2 seconds of CPU bound work. Priority inversion occurs if low
-priority invocations get processed before high priority invocations.
-
-(a) shows the best result of high priority requests getting serviced
-before low priority requests even though low priority requests were
-sent before high priority requests. This is because low priority
-invocations are processed by the low priority lane and high priority
-invocations are processed by the high priority lane. In addition, low
-priority requests are sent on a different connection than the high
-priority requests since each lane has a different endpoint.
-
-(b) does not improve on (a) since the requests are already sent on
-different connections.
-
-(c) shows priority inversion as low priority requests get processed
-before high priority requests. This is because only one connection is
-used for both low and high priority requests. Therefore, the high
-priority requests are queued behind the low priority requests.
-
-(d) shows improvement on (c) since using bands allows the high
-priority requests to go on a different connection than the low
-priority requests. However, priority inversion still exists since the
-server does not distinguish between the low priority connection and
-the high priority connection and therefore treats them equally.
-Removing this priority inversion will require two improvements: (1)
-band information needs to be propagated to the server when a banded
-connection is established by the client; (2) server side dispatching
-needs to be based on the priority of the connections.
-
-See run_test.pl to see how to run this test. The server
-static_threads should be set to the number of CPUs on the machine.
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp
deleted file mode 100644
index d33a71f3f25..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/client.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Priority_Inversion_With_Bands, client, "$Id$")
-
-static const char *ior = "file://ior_1";
-static int iterations = 12;
-static CORBA::ULong work = 2;
-static int make_banded_invocations = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "b:k:i:w:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'b':
- make_banded_invocations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'w':
- work = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s\n"
- "\t-b <make banded invocations> (default to %d)\n"
- "\t-k <ior> (default to %s)\n"
- "\t-i <iterations> (default to %d)\n"
- "\t-w <work> (default to %d)\n"
- "\n",
- argv [0],
- make_banded_invocations,
- ior,
- iterations,
- work),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var rt_current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Priority default_thread_priority =
- rt_current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Priority low_priority =
- default_thread_priority;
-
- RTCORBA::Priority high_priority =
- default_thread_priority + 1;
-
- if (make_banded_invocations)
- {
- RTCORBA::PriorityBands bands;
- bands.length (2);
- bands[0].low = low_priority;
- bands[0].high = low_priority;
- bands[1].low = high_priority;
- bands[1].high = high_priority;
-
- CORBA::PolicyList policies;
- policies.length (1);
- policies[0] =
- rt_orb->create_priority_banded_connection_policy (bands
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- test->_set_policy_overrides (policies,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test =
- test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- rt_current->the_priority (low_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test->initialize (iterations * 2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int i = 0;
- char iteration_description[BUFSIZ];
- for (i = 0; i != iterations; ++i)
- {
- ACE_OS::sprintf (iteration_description, "L:%02d", i);
- test->method (work,
- iteration_description
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- rt_current->the_priority (high_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (i = 0; i != iterations; ++i)
- {
- ACE_OS::sprintf (iteration_description, "H:%02d", i);
- test->method (work,
- iteration_description
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf
deleted file mode 100644
index 8d8795f4817..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous"
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf.xml b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf.xml
deleted file mode 100644
index f297697bc7c..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl
deleted file mode 100755
index 1afb4f6f967..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/run_test.pl
+++ /dev/null
@@ -1,123 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$server_static_threads = 1;
-$server_dynamic_threads = 0;
-$status = 0;
-$continuous = ($^O eq 'hpux');
-$common_args = ($continuous ? "-ORBSvcConf continuous$PerlACE::svcconf_ext" : '');
-
-@configurations =
- (
- {
- file => "ior_2",
- args => "-b 0",
- description => "Invoking methods on servant in thread lanes without bands",
- },
- {
- file => "ior_2",
- args => "-b 1",
- description => "Invoking methods on servant in thread lanes with bands",
- },
- {
- file => "ior_1",
- args => "-b 0",
- description => "Invoking methods on servant in thread pool without bands",
- },
- {
- file => "ior_1",
- args => "-b 1",
- description => "Invoking methods on servant in thread pool with bands",
- },
- );
-
-sub run_test
- {
- for $test (@configurations)
- {
- unlink PerlACE::LocalFile($test->{file});
- }
-
- my @parms = @_;
- $arg = $parms[0];
-
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "$common_args -s $server_static_threads -d $server_dynamic_threads");
- }
- else {
- $SV = new PerlACE::Process ("server", "$common_args -s $server_static_threads -d $server_dynamic_threads");
- }
-
- $server = $SV->Spawn ();
- if ($server == -1)
- {
- exit $status;
- }
-
- for $test (@configurations)
- {
- if (PerlACE::waitforfile_timed (PerlACE::LocalFile($test->{file}),$PerlACE::wait_interval_for_process_creation ) == -1)
- {
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find ior file: $test->{file}\n";
- $status = 1;
- goto kill_server;
- }
- }
- print $test->{file}."\n";
- }
-
- $CL[$i] = new PerlACE::Process ("client", "$common_args $arg");
- $CL[$i]->Spawn ();
-
- $client = $CL[$i]->WaitKill (20);
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- goto kill_server;
- }
-
- kill_server:
-
- $server = $SV->WaitKill (120);
-
- if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- for $test (@configurations)
- {
- unlink PerlACE::LocalFile($test->{file});
- }
- }
-
-for $test (@configurations)
- {
- print STDERR "\n*************************************************************\n";
- print STDERR "$test->{description}\n";
- print STDERR "*************************************************************\n\n";
-
- my $file = PerlACE::LocalFile($test->{file});
- run_test ("-k file://$file $test->{args}");
- }
-
-exit $status
-
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
deleted file mode 100644
index e8259069e76..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
+++ /dev/null
@@ -1,389 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Priority_Inversion_With_Bands, server, "$Id$")
-
-static const char *ior_output_file = "ior";
-static int ior_count = 1;
-static CORBA::ULong static_threads = 1;
-static CORBA::ULong dynamic_threads = 0;
-static RTCORBA::Priority low_priority;
-static RTCORBA::Priority high_priority;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:s:d:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 's':
- static_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'd':
- dynamic_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s\n"
- "\t-o <iorfile> (defaults to %s)\n"
- "\t-s <static_threads> (defaults to %d)\n"
- "\t-d <dynamic_threads> (defaults to %d)\n"
- "\n",
- argv [0],
- ior_output_file,
- static_threads,
- dynamic_threads),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-write_ior_to_file (CORBA::ORB_ptr orb,
- test_ptr test
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var ior =
- orb->object_to_string (test
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- char filename[BUFSIZ];
- ACE_OS::sprintf (filename,
- "%s_%d",
- ior_output_file,
- ior_count++);
-
- FILE *output_file =
- ACE_OS::fopen (filename,
- "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
-
- ACE_OS::fclose (output_file);
-
- return 0;
-}
-
-
-int
-create_POA_and_register_servant (CORBA::Policy_ptr threadpool_policy,
- const char *poa_name,
- PortableServer::POAManager_ptr poa_manager,
- PortableServer::POA_ptr root_poa,
- CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb
- ACE_ENV_ARG_DECL)
-{
- // Policies for the firstPOA to be created.
- CORBA::PolicyList policies (3); policies.length (3);
-
- // Implicit_activation policy.
- policies[0] =
- root_poa->create_implicit_activation_policy
- (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Thread pool policy.
- policies[1] =
- CORBA::Policy::_duplicate (threadpool_policy);
-
- // Priority Model policy.
- policies[2] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the POA under the RootPOA.
- PortableServer::POA_var poa =
- root_poa->create_POA (poa_name,
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Creation of POAs is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- test_i *servant =
- new test_i (orb,
- poa.in (),
- low_priority,
- high_priority);
-
- PortableServer::ServantBase_var safe_servant (servant);
- ACE_UNUSED_ARG (safe_servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int result =
- write_ior_to_file (orb,
- test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Priority default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- low_priority = default_thread_priority;
- high_priority = default_thread_priority + 1;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong stacksize = 0;
- CORBA::Boolean allow_request_buffering = 0;
- CORBA::ULong max_buffered_requests = 0;
- CORBA::ULong max_request_buffer_size = 0;
-
- RTCORBA::ThreadpoolId threadpool_id_1 =
- rt_orb->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- low_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_1 =
- rt_orb->create_threadpool_policy (threadpool_id_1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean allow_borrowing = 0;
- RTCORBA::ThreadpoolLanes lanes (2);
- lanes.length (2);
-
- lanes[0].lane_priority = low_priority;
- lanes[0].static_threads = static_threads;
- lanes[0].dynamic_threads = dynamic_threads;
-
- lanes[1].lane_priority = high_priority;
- lanes[1].static_threads = static_threads;
- lanes[1].dynamic_threads = dynamic_threads;
-
- RTCORBA::ThreadpoolId threadpool_id_2 =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_2 =
- rt_orb->create_threadpool_policy (threadpool_id_2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- create_POA_and_register_servant (threadpool_policy_1.in (),
- "first_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- result =
- create_POA_and_register_servant (threadpool_policy_2.in (),
- "second_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf
deleted file mode 100644
index 2154375e265..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# No options required for regular testing
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf.xml b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf.xml
deleted file mode 100644
index b589f90605b..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/svc.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- No options required for regular testing -->
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test.idl b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test.idl
deleted file mode 100644
index 331c73291bd..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- void initialize (in unsigned long total_iterations);
-
- oneway void method (in unsigned long work,
- in string iteration);
-};
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.cpp b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.cpp
deleted file mode 100644
index e4ae87b051b..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/Thread_Pool.h"
-#include "ace/Countdown_Time.h"
-
-ACE_RCSID(Priority_Inversion_With_Bands, test_i, "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- RTCORBA::Priority low_priority,
- RTCORBA::Priority high_priority)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa)),
- low_priority_ (low_priority),
- high_priority_ (high_priority),
- rt_current_ (),
- work_iterations_in_one_sec_ (0),
- prime_number_ (9619),
- current_iteration_ (0),
- total_iterations_ (0)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
-
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->rt_current_ =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
-
- this->work_iterations_in_one_sec_ =
- this->estimate_iterations ();
- }
- ACE_CATCHANY
- {
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
-}
-
-void
-test_i::method (CORBA::ULong work,
- const char * iteration
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the ORB_Core's TSS resources.
- TAO_ORB_Core_TSS_Resources *tss =
- this->orb_->orb_core ()->get_tss_resources ();
-
- /// Get the lane attribute in TSS.
- TAO_Thread_Lane *lane =
- (TAO_Thread_Lane *) tss->lane_;
-
- RTCORBA::Priority current_priority =
- this->rt_current_->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const char *priority_string = 0;
- if (current_priority == this->low_priority_)
- priority_string = "low";
- else if (current_priority == this->high_priority_)
- priority_string = "high";
- else
- {
- ACE_ERROR ((LM_ERROR, "ERROR: %d != %d and %d != %d\n",
- current_priority, this->low_priority_,
- current_priority, this->high_priority_));
- ACE_ASSERT (0);
- }
-
-
- ACE_DEBUG ((LM_DEBUG,
- "test_i::method - %s started at %T (%P|%t|%d|%d) for %d secs at priority %s\n",
- iteration,
- lane->pool ().id (),
- lane->id (),
- work,
- priority_string));
-
- this->work (work);
-
- ACE_DEBUG ((LM_DEBUG,
- "test_i::method - %s ended at %T (%P|%t|%d|%d)\n",
- iteration,
- lane->pool ().id (),
- lane->id ()));
-
- ++this->current_iteration_;
-
- if (this->current_iteration_ == this->total_iterations_)
- {
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-void
-test_i::initialize (CORBA::ULong total_iterations
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->total_iterations_ = total_iterations;
-}
-
-int
-test_i::estimate_iterations (void)
-{
- // Estimate for 2 seconds.
- ACE_Time_Value work_time (2);
- ACE_Countdown_Time countdown (&work_time);
-
- int i = 0;
- for (; work_time > ACE_Time_Value::zero; ++i)
- {
- ACE::is_prime (this->prime_number_,
- 2,
- this->prime_number_ / 2);
-
- countdown.update ();
- }
-
- return i / 2;
-}
-
-void
-test_i::work (CORBA::ULong work)
-{
- int i =
- this->work_iterations_in_one_sec_ * work;
-
- for (; i > 0; --i)
- {
- ACE::is_prime (this->prime_number_,
- 2,
- this->prime_number_ / 2);
- }
-}
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.h b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.h
deleted file mode 100644
index 634167f5f35..00000000000
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/test_i.h
+++ /dev/null
@@ -1,71 +0,0 @@
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Irfan Pyarali
- */
-// ===================================================================
-
-#include "testS.h"
-#include "tao/RTCORBA/RTCORBA.h"
-
-class test_i :
- public POA_test
-{
-public:
- /// Constructor.
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- RTCORBA::Priority low_priority,
- RTCORBA::Priority high_priority);
-
- /// Initialize the server.
- void initialize (CORBA::ULong total_iterations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Test method.
- void method (CORBA::ULong work,
- const char *iteration
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Our POA.
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Work (burn CPU).
- void work (CORBA::ULong work);
-
- /// Estimates work iterations performed per second.
- int estimate_iterations (void);
-
-private:
- /// ORB.
- CORBA::ORB_var orb_;
-
- /// Our POA.
- PortableServer::POA_var poa_;
-
- /// Value for low priority.
- RTCORBA::Priority low_priority_;
-
- /// Value for high priority.
- RTCORBA::Priority high_priority_;
-
- // RTCORBA Current.
- RTCORBA::Current_var rt_current_;
-
- /// Number of work iterations that can be performed in one second.
- int work_iterations_in_one_sec_;
-
- /// Prime number used for burning CPU.
- CORBA::ULong prime_number_;
-
- /// Current iteration.
- CORBA::ULong current_iteration_;
-
- /// Total iterations for this test.
- CORBA::ULong total_iterations_;
-};
diff --git a/TAO/tests/RTCORBA/Private_Connection/.cvsignore b/TAO/tests/RTCORBA/Private_Connection/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Private_Connection/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Private_Connection/README b/TAO/tests/RTCORBA/Private_Connection/README
deleted file mode 100644
index 8ba353b0f57..00000000000
--- a/TAO/tests/RTCORBA/Private_Connection/README
+++ /dev/null
@@ -1,132 +0,0 @@
-$Id$
-
-This is a unit test for RTCORBA::PrivateConnectionPolicy.
-
-Description.
---------
-The server creates two servants, registers them with the Root POA,
-prints out their IORs and waits for the requests from the client. The
-client obtains the IORs, makes several invocations on the objects,
-then sets RTCORBA::PrivateConnectionPolicy on PolicyCurrent (i.e.,
-thread-level) and makes a few more invocations on the objects.
-
-The goal of the test is to check that new connections are established
-only when expected, and that appropriate connection is used for each
-invocation. Since what we are trying to verify are the internal
-workings of the ORB, we are relying on ORB debug messages to do it.
-
-Client makes a total of 8 invocations (not counting the shutdown
-request at the end). A message containing invocation number, whether
-the new connection is to be established, and, if not, which one should
-be reused, is printed out before each invocation. ORB debug messages
-that follow allow us to verify whether things worked as expected. See
-Expected output section below for more information.
-
-To run (on Unix):
--------
-$./server [-o <ior_output_file1> -p <ior_output_file2>]
-$./client [-o <ior1> -p <ior2>] -ORBdebuglevel 3
-
-
-Options:
---------
- Server:
-
--o <ior_output_file1> Default: test1.ior
- Filename for output of the IOR of the first
- testing object.
-
--p <ior_output_file2> Default: test2.ior
- Filename for output of the IOR of the
- second testing object.
-
- Client:
-
--o <ior1> Default: file://test1.ior
- IOR of the first test object.
-
--p <ior2> Default: file://test2.ior
- IOR of the second test object.
-
--ORBdebuglevel 3 Default: none
- Recommended debug level is 3 or higher.
-
-Expected output:
-----------------
-Below is a sample output from run_test.pl on NT. Please note that
-since in this test we are relying on ORB debug messages
-
-1) test output may look different from that shown below as ORB debug
- messages are modified
-2) the output may contain some debug information irrelevant to this
- test, e.g., parsed header info in the output below
-
-
-********** RTCORBA Private Connection Unit Test
-
-<IOR:010000000d00000049444c3a546573743a312e300000000001000000000000007e00000001
-102cd050000006865726100cdc3051b00000014010f0052535422181a3a88bb0600000000000100
-00001000000cd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01
-00100000000000901010000000000024f41541600000001cdcdcd01000000050000006865726100
-dc305ffff>
-
-<IOR:010000000d00000049444c3a546573743a312e300000000001000000000000007e00000001
-102cd050000006865726100cdc3051b00000014010f0052535422181a3a88bb0600010000000100
-00002000000cd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01
-00100000000000901010000000000024f41541600000001cdcdcd01000000050000006865726100
-dc305ffff>
-
-TAO (976|1072) Loaded default protocol <IIOP_Factory>
-TAO (976|1072) created new ORB <>
-
- Invocation 1 --> new connection
-(976|1072) IIOP_Connector::connect - making a new connection
-(976|1072) IIOP_Connector::connect - new connection on HANDLE 296
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Invocation 2 --> use connection from invocation 1
-(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Invocation 3 --> use connection from invocation 1
-(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Invocation 4 --> use connection from invocation 1
-(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Invocation 5 --> new connection
-(976|1072) IIOP_Connector::connect - making a new connection
-(976|1072) IIOP_Connector::connect - new connection on HANDLE 316
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Invocation 6 --> new connection
-(976|1072) IIOP_Connector::connect - making a new connection
-(976|1072) IIOP_Connector::connect - new connection on HANDLE 328
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Invocation 7 --> use connection from invocation 5
-(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 316
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Invocation 8 --> use connection from invocation 6
-(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 328
-Server: test_method invoked.
-TAO (976|1072) Parsed header = <1,2,1,1,12>
-
- Testing over - shutting down
-(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 316
-Server ORB event loop finished
-Destroying ORB <>
-TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (296, 511)
-TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (328, 511)
-TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (316, 511)
-
diff --git a/TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc b/TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc
deleted file mode 100644
index 87178218057..00000000000
--- a/TAO/tests/RTCORBA/Private_Connection/RTCORBA_Private_Connection.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Private_Connection/client.cpp b/TAO/tests/RTCORBA/Private_Connection/client.cpp
deleted file mode 100644
index a1b7369b55d..00000000000
--- a/TAO/tests/RTCORBA/Private_Connection/client.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "ace/Get_Opt.h"
-
-const char *ior1 = "file://test1.ior";
-const char *ior2 = "file://test2.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:p:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior1 = get_opts.opt_arg ();
- break;
- case 'p':
- ior2 = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <ior1> "
- "-p <ior2> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB, resolve references and parse arguments.
-
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RTORB.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return -1;
-
- // PolicyCurrent.
- object = orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (policy_current.in (), "PolicyCurrent")
- == -1)
- return -1;
-
- // Test object 1.
- object = orb->string_to_object (ior1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Test_var server1 = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server1.in (), "server1") == -1)
- return -1;
-
- // Test object 2.
- object = orb->string_to_object (ior2 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- Test_var server2 = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server2.in (), "server2") == -1)
- return -1;
-
- // Make four invocations on test objects. Expected: connection
- // established on the first invocation, and reused in the
- // following three.
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 1 --> new connection\n"));
- server1->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 2 --> use connection from invocation 1\n"));
- server2->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 3 --> use connection from invocation 1\n"));
- server1->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 4 --> use connection from invocation 1\n"));
- server2->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Set RTCORBA::PrivateConnectionPolicy on PolicyCurrent.
- CORBA::PolicyList policy_list;
- policy_list.length (1);
- policy_list[0] =
- rt_orb->create_private_connection_policy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
-
- // Make four invocations on test objects again. This time,
- // since RTCORBA::PrivateConnectionPolicy is set, we expect a
- // connection to be established for <server1> during the first
- // invocation, a connection to be established for <server2> during
- // the second invocation, <server1>'s connection reused on
- // third, and <server2>'s reused on fourth.
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 5 --> new connection\n"));
- server1->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 6 --> new connection\n"));
- server2->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 7 --> use connection from invocation 5\n"));
- server1->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n Invocation 8 --> use connection from invocation 6\n"));
- server2->test_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Testing over. Shut down Server ORB.
- ACE_DEBUG ((LM_DEBUG,
- "\n Testing over - shutting down\n"));
- server1->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in Private_Connection test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Private_Connection/run_test.pl b/TAO/tests/RTCORBA/Private_Connection/run_test.pl
deleted file mode 100755
index 537c5b0fca6..00000000000
--- a/TAO/tests/RTCORBA/Private_Connection/run_test.pl
+++ /dev/null
@@ -1,55 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile1 = PerlACE::LocalFile ("test1.ior");
-$iorfile2 = PerlACE::LocalFile ("test2.ior");
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-print STDERR "\n********** RTCORBA Private Connection Unit Test\n\n";
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test1.ior -p test2.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile1 -p $iorfile2");
-}
-$CL = new PerlACE::Process ("client", "-o file://$iorfile1 -p file://$iorfile2 -ORBdebuglevel 3 ");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1)
-{
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server \n";
- $status = 1;
-}
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Private_Connection/server.cpp b/TAO/tests/RTCORBA/Private_Connection/server.cpp
deleted file mode 100644
index 07a844b3abb..00000000000
--- a/TAO/tests/RTCORBA/Private_Connection/server.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-class Test_i : public POA_Test
-{
- // = TITLE
- // An implementation for the Test interface in test.idl
- //
-public:
- Test_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Test methods.
- void test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::test_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED/* ACE_ENV_SINGLE_ARG_PARAMETER */)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Server: test_method invoked.\n"));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-//*************************************************************************
-
-const char *ior_output_file1 = "test1.ior";
-const char *ior_output_file2 = "test2.ior";
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:p:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file1 = get_opts.opt_arg ();
- break;
-
- case 'p':
- ior_output_file2 = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile1>"
- "-p <iorfile2>"
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-int
-create_object (PortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb,
- Test_i *server_impl,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- // Register with poa.
- PortableServer::ObjectId_var id =
- poa->activate_object (server_impl ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK_RETURN (-1);
-
- CORBA::Object_var server =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Print out the IOR.
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG, "<%s>\n\n", ior.in ()));
-
- // Print ior to the file.
- if (filename != 0)
- {
- FILE *output_file= ACE_OS::fopen (filename, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (root_poa.in (), "RootPOA") == -1)
- return -1;
-
- // POAManager.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Servants.
- Test_i server_impl1 (orb.in ());
- Test_i server_impl2 (orb.in ());
-
- // Create Objects.
- int result;
- result = create_object (root_poa.in (),
- orb.in (),
- &server_impl1,
- ior_output_file1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result == -1)
- return -1;
-
- result = create_object (root_poa.in (),
- orb.in (),
- &server_impl2,
- ior_output_file2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result == -1)
- return -1;
-
- // Run ORB Event loop.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in Private_Connection test server:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Private_Connection/test.idl b/TAO/tests/RTCORBA/Private_Connection/test.idl
deleted file mode 100644
index b50f6cfef47..00000000000
--- a/TAO/tests/RTCORBA/Private_Connection/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method ();
- // Print out a message.
-
- oneway void shutdown ();
- // Shut down the ORB.
-};
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/.cvsignore b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc
deleted file mode 100644
index 4d9a96b12f0..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/PaE_Selection.mpc
+++ /dev/null
@@ -1,13 +0,0 @@
-// $Id$
-project(*Server): rt_server, strategies, portableserver, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client, strategies, portableserver, minimum_corba {
- after += *Server
- Source_Files {
- client.cpp
- }
-}
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/README b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/README
deleted file mode 100644
index ba49c18a341..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/README
+++ /dev/null
@@ -1,118 +0,0 @@
-$Id$
-
-This test exercises the profile and endpoint selection of the ORB.
-
-Server: The server creates a servant in a regular POA and another in
-an RT-POA. The RT-POA can be configured in serveral ways as detailed
-below.
-
-Client: The client does the following:
-
-- vanilla invocations
-- sets private connection
-- vanilla invocations
-- reset
-
-- sets client protocols
-- vanilla invocations
-- sets private connection
-- vanilla invocations
-- reset
-
-- set bands
-- priority invocations
-- sets private connection
-- priority invocations
-- reset
-
-- set bands
-- sets client protocols
-- priority invocations
-- sets private connection
-- priority invocations
-- reset
-
-This test can be configured in several ways (72 to be precise) as
-documented below:
- _________________________________________________________________________________
-
- Server-side Thread Client-side Multi-priority Client Server
- Bands Lanes Bands Clients Protocols Protocols
- _________________________________________________________________________________
-
- NO NO NO NO iiop->shmiop NONE
- NO NO NO NO shmiop->iiop NONE
- NO NO NO YES iiop->shmiop NONE
- NO NO NO YES shmiop->iiop NONE
- NO NO YES YES iiop->shmiop NONE
- NO NO YES YES shmiop->iiop NONE
- YES NO NO YES iiop->shmiop NONE
- YES NO NO YES shmiop->iiop NONE
- NO YES YES YES iiop->shmiop NONE
- NO YES YES YES shmiop->iiop NONE
- YES YES NO YES iiop->shmiop NONE
- YES YES NO YES shmiop->iiop NONE
-
- NO NO NO NO iiop->shmiop iiop
- NO NO NO NO shmiop->iiop iiop
- NO NO NO NO iiop iiop
- NO NO NO YES iiop->shmiop iiop
- NO NO NO YES shmiop->iiop iiop
- NO NO NO YES iiop iiop
- NO NO YES YES iiop->shmiop iiop
- NO NO YES YES shmiop->iiop iiop
- NO NO YES YES iiop iiop
- YES NO NO YES iiop->shmiop iiop
- YES NO NO YES shmiop->iiop iiop
- YES NO NO YES iiop iiop
- NO YES YES YES iiop->shmiop iiop
- NO YES YES YES shmiop->iiop iiop
- NO YES YES YES iiop iiop
- YES YES NO YES iiop->shmiop iiop
- YES YES NO YES shmiop->iiop iiop
- YES YES NO YES iiop iiop
-
- NO NO NO NO iiop->shmiop shmiop
- NO NO NO NO shmiop->iiop shmiop
- NO NO NO NO shmiop shmiop
- NO NO NO YES iiop->shmiop shmiop
- NO NO NO YES shmiop->iiop shmiop
- NO NO NO YES shmiop shmiop
- NO NO YES YES iiop->shmiop shmiop
- NO NO YES YES shmiop->iiop shmiop
- NO NO YES YES shmiop shmiop
- YES NO NO YES iiop->shmiop shmiop
- YES NO NO YES shmiop->iiop shmiop
- YES NO NO YES shmiop shmiop
- NO YES YES YES iiop->shmiop shmiop
- NO YES YES YES shmiop->iiop shmiop
- NO YES YES YES shmiop shmiop
- YES YES NO YES iiop->shmiop shmiop
- YES YES NO YES shmiop->iiop shmiop
- YES YES NO YES shmiop shmiop
-
- NO NO NO NO iiop->shmiop iiop+shmiop
- NO NO NO NO shmiop->iiop iiop+shmiop
- NO NO NO NO iiop iiop+shmiop
- NO NO NO NO shmiop iiop+shmiop
- NO NO NO YES iiop->shmiop iiop+shmiop
- NO NO NO YES shmiop->iiop iiop+shmiop
- NO NO NO YES iiop iiop+shmiop
- NO NO NO YES shmiop iiop+shmiop
- NO NO YES YES iiop->shmiop iiop+shmiop
- NO NO YES YES shmiop->iiop iiop+shmiop
- NO NO YES YES iiop iiop+shmiop
- NO NO YES YES shmiop iiop+shmiop
- YES NO NO YES iiop->shmiop iiop+shmiop
- YES NO NO YES shmiop->iiop iiop+shmiop
- YES NO NO YES iiop iiop+shmiop
- YES NO NO YES shmiop iiop+shmiop
- NO YES YES YES iiop->shmiop iiop+shmiop
- NO YES YES YES shmiop->iiop iiop+shmiop
- NO YES YES YES iiop iiop+shmiop
- NO YES YES YES shmiop iiop+shmiop
- YES YES NO YES iiop->shmiop iiop+shmiop
- YES YES NO YES shmiop->iiop iiop+shmiop
- YES YES NO YES iiop iiop+shmiop
- YES YES NO YES shmiop iiop+shmiop
-
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands
deleted file mode 100644
index a3f7158df97..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands
+++ /dev/null
@@ -1 +0,0 @@
-0 5000 5000 10000 10000 15000 15000 20000 20000 25000 25000 30000
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands_r b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands_r
deleted file mode 100644
index 2be55e3fa32..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/bands_r
+++ /dev/null
@@ -1 +0,0 @@
-0 10000 20000 30000
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp
deleted file mode 100644
index 61acf71eab9..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp
+++ /dev/null
@@ -1,631 +0,0 @@
-// $Id$
-
-// ================================================================
-//
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This is a client implementation.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ================================================================
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/Strategies/advanced_resource.h"
-#include "../check_supported_priorities.cpp"
-#include "../common_args.cpp"
-#include "testC.h"
-
-ACE_RCSID(Profile_And_Endpoint_Selection, client, "$Id$")
-
-static int iterations = 1;
-static int debug = 1;
-static int shutdown_server = 0;
-static const char *ior = "file://ior";
-static const char *invocation_priorities_file = "empty_file";
-static const char *protocols_file = "empty_file";
-static const char *bands_file = "empty_file";
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "b:d:i:k:p:t:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'b':
- bands_file = get_opts.opt_arg ();
- break;
-
- case 'd':
- debug = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'i':
- iterations = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'p':
- protocols_file = get_opts.opt_arg ();
- break;
-
- case 't':
- invocation_priorities_file = get_opts.opt_arg ();
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s usage: \n"
- "\t-b <bands file> (defaults to %s)\n"
- "\t-i <iterations> (defaults to %d)\n"
- "\t-k <ior> (defaults to %s)\n"
- "\t-p <protocol file> (defaults to %s)\n"
- "\t-t <invocation priorities file> (defaults to %s)\n"
- "\t-x <shutdown server> (defaults to %d)\n"
- "\n",
- argv[0],
- bands_file,
- iterations,
- ior,
- protocols_file,
- invocation_priorities_file,
- shutdown_server),
- -1);
- }
-
- return 0;
-}
-
-class Client
-{
-
-public:
-
- Client (test_ptr test,
- CORBA::ORB_ptr orb,
- RTCORBA::Current_ptr current,
- RTCORBA::RTORB_ptr rt_orb,
- CORBA::PolicyManager_ptr policy_manager);
-
- void vanilla_invocations (ACE_ENV_SINGLE_ARG_DECL);
-
- void priority_invocations (int debug
- ACE_ENV_ARG_DECL);
-
- void set_client_protocols_policies (int debug
- ACE_ENV_ARG_DECL);
-
- void set_priority_bands (int debug
- ACE_ENV_ARG_DECL);
-
- void set_private_connection_policies (ACE_ENV_SINGLE_ARG_DECL);
-
- void reset_policies (ACE_ENV_SINGLE_ARG_DECL);
-
-
-private:
-
- test_var test_;
- CORBA::ORB_var orb_;
- RTCORBA::Current_var current_;
- RTCORBA::RTORB_var rt_orb_;
- CORBA::PolicyManager_var policy_manager_;
-
-};
-
-class Worker_Thread : public ACE_Task_Base
-{
-public:
- Worker_Thread (ACE_Thread_Manager &thread_manager,
- Client &client,
- test_ptr test,
- RTCORBA::Current_ptr current,
- CORBA::Short priority);
-
- int svc (void);
-
- void validate_connection (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- Client client_;
- test_var test_;
- RTCORBA::Current_var current_;
- CORBA::Short priority_;
-};
-
-Worker_Thread::Worker_Thread (ACE_Thread_Manager &thread_manager,
- Client &client,
- test_ptr test,
- RTCORBA::Current_ptr current,
- CORBA::Short priority)
- : ACE_Task_Base (&thread_manager),
- client_ (client),
- test_ (test::_duplicate (test)),
- current_ (RTCORBA::Current::_duplicate (current)),
- priority_ (priority)
-{
-}
-
-void
-Worker_Thread::validate_connection (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Try to validate the connection several times, ignoring transient
- // exceptions. If the connection can still not be setup, return
- // failure.
- CORBA::PolicyList_var inconsistent_policies;
- int max_attempts = 10;
- int current_attempt = 0;
- for (;;)
- {
- ACE_TRY
- {
- ++current_attempt;
- this->test_->_validate_connection (inconsistent_policies.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If successful, we are done.
- return;
- }
- ACE_CATCH (CORBA::TRANSIENT, exception)
- {
- // If we have reach our maximum number of tries, throw exception.
- if (current_attempt == max_attempts)
- ACE_RE_THROW;
- // Otherwise, ignore...
- }
- ACE_CATCHANY
- {
- // Rethrow any other exceptions.
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
- }
-}
-
-int
-Worker_Thread::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- this->current_->the_priority (this->priority_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->client_.vanilla_invocations (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Worker Thread exception:");
- }
- ACE_ENDTRY;
- return 0;
-}
-
-Client::Client (test_ptr test,
- CORBA::ORB_ptr orb,
- RTCORBA::Current_ptr current,
- RTCORBA::RTORB_ptr rt_orb,
- CORBA::PolicyManager_ptr policy_manager)
- : test_ (test::_duplicate (test)),
- orb_ (CORBA::ORB::_duplicate (orb)),
- current_ (RTCORBA::Current::_duplicate (current)),
- rt_orb_ (RTCORBA::RTORB::_duplicate (rt_orb)),
- policy_manager_ (CORBA::PolicyManager::_duplicate (policy_manager))
-{
-}
-
-void
-Client::vanilla_invocations (ACE_ENV_SINGLE_ARG_DECL)
-{
- for (int i = 0; i < iterations; i++)
- {
- this->test_->method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-Client::priority_invocations (int debug
- ACE_ENV_ARG_DECL)
-{
- ULong_Array priorities;
- int result =
- get_values ("client",
- invocation_priorities_file,
- "invocation priorities",
- priorities,
- debug);
- if (result != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Error in parsing invocation priorities data file: %s\n",
- invocation_priorities_file));
- return;
- }
-
- u_long i = 0;
-
- Worker_Thread **workers = 0;
-
- ACE_NEW_THROW_EX (workers,
- Worker_Thread *[priorities.size ()],
- CORBA::NO_MEMORY ());
-
- ACE_Thread_Manager thread_manager;
-
- for (i = 0;
- i < priorities.size ();
- ++i)
- {
- ACE_NEW_THROW_EX (workers[i],
- Worker_Thread (thread_manager,
- *this,
- this->test_.in (),
- this->current_.in (),
- priorities[i]),
- CORBA::NO_MEMORY ());
-
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- this->orb_->orb_core ()->orb_params ()->thread_creation_flags ();
-
- result =
- workers[i]->activate (flags);
- if (result != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Cannot activate thread\n"));
- return;
- }
- }
-
- thread_manager.wait ();
-
- for (i = 0;
- i < priorities.size ();
- ++i)
- {
- delete workers[i];
- }
- delete[] workers;
-}
-
-void
-Client::set_client_protocols_policies (int debug
- ACE_ENV_ARG_DECL)
-{
- CORBA::PolicyList policies;
-
- int result =
- get_protocols ("client",
- protocols_file,
- this->rt_orb_.in (),
- policies,
- debug
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (result != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Error in parsing protocols data file: %s\n",
- protocols_file));
- return;
- }
-
- this->policy_manager_->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Client::set_priority_bands (int debug
- ACE_ENV_ARG_DECL)
-{
- CORBA::PolicyList policies;
-
- int result =
- get_priority_bands ("client",
- bands_file,
- this->rt_orb_.in (),
- policies,
- debug
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (result != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Error in parsing bands data file: %s\n",
- bands_file));
- return;
- }
-
- this->policy_manager_->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Client::set_private_connection_policies (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::PolicyList policies;
- policies.length (1);
-
- policies[0] =
- this->rt_orb_->create_private_connection_policy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->policy_manager_->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Client::reset_policies (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::PolicyList empty_policies;
-
- this->policy_manager_->set_policy_overrides (empty_policies,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- current->the_priority (0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client client (test.in (),
- this->orb_.in (),
- current.in (),
- rt_orb.in (),
- policy_manager.in ());
-
- client.vanilla_invocations (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_private_connection_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.vanilla_invocations (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.reset_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_client_protocols_policies (debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.vanilla_invocations (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_private_connection_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.vanilla_invocations (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.reset_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_priority_bands (debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.priority_invocations (debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_private_connection_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.priority_invocations (debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.reset_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_priority_bands (debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_client_protocols_policies (0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.priority_invocations (0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.set_private_connection_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.priority_invocations (debug
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.reset_policies (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (shutdown_server)
- {
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Error!");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int parse_args_result =
- parse_args (argc, argv);
- if (parse_args_result != 0)
- return parse_args_result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Error!");
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/empty_file b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/empty_file
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/empty_file
+++ /dev/null
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop
deleted file mode 100644
index c227083464f..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop
+++ /dev/null
@@ -1 +0,0 @@
-0 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop_shmiop b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop_shmiop
deleted file mode 100644
index 3508c351d1b..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/iiop_shmiop
+++ /dev/null
@@ -1 +0,0 @@
-0 1413566210 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities
deleted file mode 100644
index 2d32fee52d0..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities
+++ /dev/null
@@ -1 +0,0 @@
-2500 7500 12500 17500 22500 27500 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities_r b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities_r
deleted file mode 100644
index 795a75037bc..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/invocation_priorities_r
+++ /dev/null
@@ -1 +0,0 @@
-5000 25000 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes
deleted file mode 100644
index 02162bc453f..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes
+++ /dev/null
@@ -1 +0,0 @@
-0 5000 10000 15000 20000 25000 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes_r b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes_r
deleted file mode 100644
index 8274a68e2ae..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/lanes_r
+++ /dev/null
@@ -1 +0,0 @@
-0 5000 25000 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl
deleted file mode 100755
index a58c5f6427c..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/run_test.pl
+++ /dev/null
@@ -1,162 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-use English;
-
-$status = 0;
-$iorfile = "ior_2";
-$client_debuglevel = 0;
-$server_debuglevel = 0;
-$client_debug = 0;
-$server_debug = 0;
-$iiop = 1;
-$shmiop = 1;
-
-$extra_client_args = "-k file://$iorfile -ORBdebuglevel $client_debuglevel -d $client_debug -x";
-$extra_server_args = "-ORBdebuglevel $server_debuglevel -d $server_debug";
-
-if ($OSNAME eq "solaris") {
- $lanes = "lanes_r";
- $bands = "bands_r";
- $inv_prio = "invocation_priorities_r";
-}
-else {
- $lanes = "lanes";
- $bands = "bands";
- $inv_prio = "invocation_priorities";
-}
-
-sub setup_configurations_2
-{
- my $server_args = shift;
- my $client_args = shift;
- my $iiop = shift;
- my $shmiop = shift;
- my $server_config = shift;
-
- if ($iiop) { $server_args .= "-ORBendpoint iiop:// "; };
- if ($shmiop) { $server_args .= "-ORBendpoint shmiop:// "; };
-
- $configurations[$server_config]->{server} = "$server_args";
- $j = 0; $configurations[$server_config]->{clients}[$j] = "$client_args " ."-p iiop_shmiop";
- $j++; $configurations[$server_config]->{clients}[$j] = "$client_args " ."-p shmiop_iiop";
- if ($iiop) { $j++; $configurations[$server_config]->{clients}[$j] = "$client_args " ."-p iiop"; }
- if ($shmiop) { $j++; $configurations[$server_config]->{clients}[$j] = "$client_args " ."-p shmiop"; }
-}
-
-sub setup_configurations_1
-{
- my $iiop = shift;
- my $shmiop = shift;
-
- $server_config++; setup_configurations_2 ("", "", $iiop, $shmiop, $server_config);
- $server_config++; setup_configurations_2 ("", "-t $inv_prio ", $iiop, $shmiop, $server_config);
- $server_config++; setup_configurations_2 ("", "-b $bands -t $inv_prio ", $iiop, $shmiop, $server_config);
- $server_config++; setup_configurations_2 ("-b $bands ", "-t $inv_prio ", $iiop, $shmiop, $server_config);
- $server_config++; setup_configurations_2 ("-l $lanes ", "-b $bands -t $inv_prio ", $iiop, $shmiop, $server_config);
- $server_config++; setup_configurations_2 ("-b $bands -l $lanes ", "-t $inv_prio ", $iiop, $shmiop, $server_config);
-}
-
-$server_config = -1;
- setup_configurations_1 (0, 0);
-if ($iiop) { setup_configurations_1 (1, 0); }
-if ($shmiop) { setup_configurations_1 (0, 1); }
-if ($iiop && $shmiop) { setup_configurations_1 (1, 1); }
-
-sub run_client
-{
- my $client_args = "@_" . " $extra_client_args";
-
- print "client $client_args\n";
-
- $CL = new PerlACE::Process ("client", "$client_args");
-
- $CL->Spawn ();
-
- $client = $CL->WaitKill (120);
-
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- zap_server (1);
- }
-}
-
-sub run_server
-{
- my $server_args = "@_" . " $extra_server_args";
-
- print "server $server_args\n";
-
- $SV = new PerlACE::Process ("server", "$server_args");
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($iorfile,$PerlACE::wait_interval_for_process_creation ) == -1)
- {
- check_supported_priorities ($SV);
- print STDERR "ERROR: cannot find ior file: $iorfile\n";
- $status = 1;
- zap_server (1);
- }
-}
-
-sub zap_server
-{
- $server = $SV->WaitKill (5);
-
- if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- unlink $iorfile;
-
- if ($_[0])
- {
- exit $status;
- }
-}
-
-sub check_supported_priorities
-{
- $process = shift;
- $returnVal = $process->TimedWait (1);
- if ($returnVal == 2) {
- # Mark as no longer running to avoid errors on exit.
- $process->{RUNNING} = 0;
- exit 0;
- }
-}
-
-for $test (@configurations)
-{
- my $clients = $test->{clients};
-
- for $args (@$clients)
- {
- print STDERR "\n******************************************************\n\n";
-
- unlink $iorfile;
-
- run_server ($test->{server});
-
- run_client ($args);
-
- zap_server (0);
- }
-}
-
-unlink "ior_1";
-
-# Clean up SHMIOP files
-PerlACE::check_n_cleanup_files ("server_shmiop_*");
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp
deleted file mode 100644
index 234e6d3ef58..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp
+++ /dev/null
@@ -1,459 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/Thread_Pool.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "tao/Strategies/advanced_resource.h"
-#include "../check_supported_priorities.cpp"
-#include "../common_args.cpp"
-#include "testS.h"
-
-static CORBA::ULong stacksize = 0;
-static CORBA::ULong static_threads = 2;
-static CORBA::ULong dynamic_threads = 0;
-static CORBA::Boolean allow_request_buffering = 0;
-static CORBA::ULong max_buffered_requests = 0;
-static CORBA::ULong max_request_buffer_size = 0;
-static CORBA::Boolean allow_borrowing = 0;
-
-static int debug = 1;
-static int ior_file_count = 1;
-static const char *ior_file_base = "ior";
-static const char *bands_file = "empty_file";
-static const char *lanes_file = "empty_file";
-
-class test_i :
- public POA_test
-{
-public:
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa);
-
- void method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
-
- CORBA::ORB_var orb_;
- PortableServer::POA_var poa_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
-}
-
-void
-test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the ORB_Core's TSS resources.
- TAO_ORB_Core_TSS_Resources *tss =
- this->orb_->orb_core ()->get_tss_resources ();
-
- /// Get the lane attribute in TSS.
- TAO_Thread_Lane *lane =
- (TAO_Thread_Lane *) tss->lane_;
-
- if (debug)
- {
- if (lane)
- ACE_DEBUG ((LM_DEBUG,
- "test_i::method request in thread %t (pool id = %d; lane id = %d)\n",
- lane->pool ().id (),
- lane->id ()));
- else
- ACE_DEBUG ((LM_DEBUG,
- "test_i::method request in thread %t (default thread pool)\n"));
- }
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "test_i::shutdown\n"));
-
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "b:d:l:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'b':
- bands_file = get_opts.opt_arg ();
- break;
-
- case 'd':
- debug = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'l':
- lanes_file = get_opts.opt_arg ();
- break;
-
- case 'o':
- ior_file_base = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s usage: \n"
- "\t-b <bands file> (defaults to %s)\n"
- "\t-b <lanes file> (defaults to %s)\n"
- "\t-o <ior file base> (defaults to %s)\n"
- "\n",
- argv[0],
- bands_file,
- lanes_file,
- ior_file_base),
- -1);
- }
-
- return 0;
-}
-
-static void
-write_iors_to_file (CORBA::Object_ptr object,
- CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
-{
- char filename[BUFSIZ];
- sprintf (filename,
- "%s_%d",
- ior_file_base,
- ior_file_count);
- ior_file_count++;
-
- FILE *file =
- ACE_OS::fopen (filename, "w");
- ACE_ASSERT (file != 0);
-
- CORBA::String_var ior =
- orb->object_to_string (object
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- u_int result = 0;
- result =
- ACE_OS::fprintf (file,
- "%s",
- ior.in ());
-
- ACE_ASSERT (result == ACE_OS::strlen (ior.in ()));
- ACE_UNUSED_ARG (result);
-
- ACE_OS::fclose (file);
-}
-
-void
-vanilla_poa (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr poa_manager
- ACE_ENV_ARG_DECL)
-{
- CORBA::PolicyList policies;
-
- CORBA::Policy_var implicit_activation_policy =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- implicit_activation_policy;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("child",
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (orb,
- poa.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (test.in (),
- orb
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-rt_poa (CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb,
- PortableServer::POA_ptr root_poa,
- PortableServer::POAManager_ptr poa_manager
- ACE_ENV_ARG_DECL)
-{
- CORBA::PolicyList policies;
-
- int result =
- get_priority_bands ("server",
- bands_file,
- rt_orb,
- policies,
- debug
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (result != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Error in parsing bands data file: %s\n",
- bands_file));
- return;
- }
-
- result =
- get_priority_lanes ("server",
- lanes_file,
- rt_orb,
- stacksize,
- static_threads,
- dynamic_threads,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size,
- allow_borrowing,
- policies,
- debug
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- if (result != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Error in parsing lanes data file: %s\n",
- lanes_file));
- return;
- }
-
- CORBA::Policy_var priority_model_policy =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Implicit_activation policy.
- CORBA::Policy_var implicit_activation_policy =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- priority_model_policy;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- implicit_activation_policy;
-
- PortableServer::POA_var poa =
- root_poa->create_POA ("rt_poa",
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- test_i *servant = 0;
- ACE_NEW_THROW_EX (servant,
- test_i (orb,
- poa.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- PortableServer::ServantBase_var safe_servant (servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- write_iors_to_file (test.in (),
- orb
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- vanilla_poa (this->orb_.in (),
- root_poa.in (),
- poa_manager.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- rt_poa (this->orb_.in (),
- rt_orb.in (),
- root_poa.in (),
- poa_manager.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop
deleted file mode 100644
index f937c4e1a65..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop
+++ /dev/null
@@ -1 +0,0 @@
-1413566210 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop_iiop b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop_iiop
deleted file mode 100644
index cdc21de595b..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/shmiop_iiop
+++ /dev/null
@@ -1 +0,0 @@
-1413566210 0 \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf
deleted file mode 100644
index 6bfc6d18fd8..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# Options for SHMIOP protocol
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop"
-
-# Options required for regular testing; comment out for real-time testing
-static RT_ORB_Loader "-ORBPriorityMapping linear"
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBPriorityMapping linear -ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
-
-
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf.xml b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf.xml
deleted file mode 100644
index 87504a564ec..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/svc.conf.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- -->
- <!-- $Id$ -->
- <!-- -->
- <!-- Options for SHMIOP protocol -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop"/>
- <!-- Options required for regular testing -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping linear"/>
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBPriorityMapping linear -ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/test.idl b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/test.idl
deleted file mode 100644
index 93c7ac56f50..00000000000
--- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface test
-{
- void method ();
-
- void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/README b/TAO/tests/RTCORBA/README
deleted file mode 100644
index 18a3531b923..00000000000
--- a/TAO/tests/RTCORBA/README
+++ /dev/null
@@ -1,98 +0,0 @@
-$Id$
-
-This directory houses a collection of tests which exercise TAO support
-for features defined in the RT-CORBA specification. Tests which exercise
-TAO-specific RT features can be found in $TAO_ROOT/performance-tests/RTCorba.
-OMG Real-time CORBA specification is available at:
-http://cgi.omg.org/cgi-bin/doc?ptc/99-05-03 (or check the OMG website
-for a more recent version).
-
-More information on TAO's implementation of RT-CORBA 1.0 specification
-is available at:
-$TAO_ROOT/docs/rtcorba/index.html
-
-Each individual subdirectory contains a README file with more
-information on the corresponding test. The list of tests so far
-includes the following:
-
- . Banded_Connections
-
- Test for RTCORBA::PriorityBandedConnection policy.
-
- . Client_Propagated
-
- Test for RTCORBA::PriorityModel policy with
- RTCORBA::CLIENT_PROPAGATED value.
-
- . Client_Protocol
-
- Test for RTCORBA::ClientProtocol policy.
-
- . Collocation
-
- Test for collocation when using thread pools and lanes.
-
- . Destroy_Thread_Pool
-
- Test for creating and destroying thread pools (with and
- without lanes).
-
- . Explicit_Binding
-
- Test for <Object::_validate_connection>.
-
- . Linear_Priority
-
- Test for Linear Priority mapping. Also combines and tests
- several RT policies in different ways.
-
- . MT_Client_Protocol_Priority
-
- Test for multi-threaded clients using the
- RTCORBA::ClientProtocol policy.
-
- . ORB_init
-
- Test for creation and destruction of multiple RT ORBs.
-
- . Persistent_IOR
-
- Test for -ORBEndpoint option. Also makes sure that user
- cannot use thread pools and persistence simultaneously.
-
- . Policies
-
- This program tests the construction of RTCORBA policies,
- both through the generic ORB::create_policy interface and
- the RTCORBA specific interfaces.
-
- . Policy_Combinations
-
- Test that combines and tests several RT policies in
- different ways.
-
- . Priority_Inversion_With_Bands
-
- This test check for priority inversion when using different
- RTCORBA configurations.
-
- . Private_Connection
-
- Test for RTCORBA::PrivateConnection policy.
-
- . RTMutex
-
- Test for RTCORBA::Mutex.
-
- . Server_Declared
-
- Test for RTCORBA::PriorityModel policy with
- RTCORBA::SERVER_DECLARED value.
-
- . Server_Protocol
-
- Test for RTCORBA::ServerProtocol policy.
-
- . Thread_Pool
-
- Tests the creation and use of thread pools.
diff --git a/TAO/tests/RTCORBA/RTCORBA-test-configurations.xls b/TAO/tests/RTCORBA/RTCORBA-test-configurations.xls
deleted file mode 100644
index 7f9cd172c3a..00000000000
--- a/TAO/tests/RTCORBA/RTCORBA-test-configurations.xls
+++ /dev/null
Binary files differ
diff --git a/TAO/tests/RTCORBA/RTMutex/.cvsignore b/TAO/tests/RTCORBA/RTMutex/.cvsignore
deleted file mode 100644
index 254defddb53..00000000000
--- a/TAO/tests/RTCORBA/RTMutex/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-server
diff --git a/TAO/tests/RTCORBA/RTMutex/README b/TAO/tests/RTCORBA/RTMutex/README
deleted file mode 100644
index 26819a63886..00000000000
--- a/TAO/tests/RTCORBA/RTMutex/README
+++ /dev/null
@@ -1,23 +0,0 @@
-$Id$
-
-This is a unit test for RTCORBA::Mutex implementation
-
-Scenario:
----------
-
-RTCORBA::Mutex objects are created, locked and released. Both named and
-unnamed mutexes are tested.
-
-To run (on Unix):
--------
-$./server [-t]
-
-
-Options:
---------
- Server:
-
- -t Specifies that the unit tests for testing time outs >0 on
- RTCORBA::Mutex::try_lock() should be skipped.
-
-
diff --git a/TAO/tests/RTCORBA/RTMutex/RTCORBA_RTMutex.mpc b/TAO/tests/RTCORBA/RTMutex/RTCORBA_RTMutex.mpc
deleted file mode 100644
index 2d55bc96c4f..00000000000
--- a/TAO/tests/RTCORBA/RTMutex/RTCORBA_RTMutex.mpc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server {
-}
diff --git a/TAO/tests/RTCORBA/RTMutex/run_test.pl b/TAO/tests/RTCORBA/RTMutex/run_test.pl
deleted file mode 100755
index c8815f69464..00000000000
--- a/TAO/tests/RTCORBA/RTMutex/run_test.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-print STDERR "\n********** RTCORBA RTMutex Unit Test **********\n\n";
-
-if (PerlACE::is_vxworks_test()) {
- $T = new PerlACE::ProcessVX ("server");
-}
-else {
- $T = new PerlACE::Process ("server");
-}
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/tests/RTCORBA/RTMutex/server.cpp b/TAO/tests/RTCORBA/RTMutex/server.cpp
deleted file mode 100644
index 425db1603fb..00000000000
--- a/TAO/tests/RTCORBA/RTMutex/server.cpp
+++ /dev/null
@@ -1,571 +0,0 @@
-// $Id$
-
-#include "tao/ORB.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "ace/Thread_Manager.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-
-static int test_try_lock_flag =
-#if defined (ACE_HAS_MUTEX_TIMEOUTS) && !defined (ACE_HAS_WTHREADS)
-1;
-#else
-// Don't test try_lock timed waits unless the underlying OS supports it
-// Windows is the exception. It supports some mutex timeouts, so
-// it has ACE_HAS_MUTEX_TIMEOUTS defined, but it doesn't support
-// thread mutex timeouts which is what is needed for this to work.
-0;
-#endif /* defined (ACE_HAS_MUTEX_TIMEOUTS) && !defined (ACE_HAS_WTHREADS) */
-
-// Parse command-line arguments.
-
-static int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "t");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 't':
- test_try_lock_flag = 0;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-t"
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-static int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-static int
-test_mutex_simple (RTCORBA::RTORB_ptr rt_orb)
-{
- // Test the basic interface of the RTCORBA::Mutex This test should
- // run even on platforms without thread support.
- ACE_TRY_NEW_ENV
- {
- RTCORBA::Mutex_var my_mutex;
-
- my_mutex = rt_orb->create_mutex (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- my_mutex->lock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- my_mutex->unlock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- my_mutex->lock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- my_mutex->unlock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- rt_orb->destroy_mutex (my_mutex.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in test_mutex_simple()");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-#if (TAO_HAS_NAMED_RT_MUTEXES == 1)
-static int
-test_named_mutex_simple (RTCORBA::RTORB_ptr rt_orb)
-{
- // Test the basic interface of the named RTCORBA::Mutex(es) This
- // test should run even on platforms without thread support.
- ACE_TRY_NEW_ENV
- {
- RTCORBA::Mutex_var larry_mutex1;
- RTCORBA::Mutex_var moe_mutex1;
- CORBA::Boolean created_flag;
-
- larry_mutex1 = rt_orb->create_named_mutex ("larry",
- created_flag ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (created_flag != 1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Expected named mutex larry to be created, but it wasn't\n"),
- -1);
-
- moe_mutex1 = rt_orb->create_named_mutex ("moe",
- created_flag
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (created_flag != 1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Expected named mutex moe to be created, but it wasn't\n"),
- -1);
-
- larry_mutex1->lock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- larry_mutex1->unlock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test creating the mutex a second time
- {
- RTCORBA::Mutex_var larry_mutex2;
- larry_mutex2 = rt_orb->create_named_mutex ("larry",
- created_flag
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (created_flag != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Expected named mutex to already be created, but it wasn't\n"),
- -1);
-
- // test the pointers...
- if (reinterpret_cast<void *> (larry_mutex1.in ())
- != reinterpret_cast<void *> (larry_mutex2.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Should have gotten the same mutex, but didn't\n"),
- -1);
-
- larry_mutex2->lock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- larry_mutex2->unlock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // test opening the mutex
- {
- RTCORBA::Mutex_var larry_mutex3;
- larry_mutex3 = rt_orb->open_named_mutex ("larry"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // test the pointers...
- if (reinterpret_cast<void *> (larry_mutex1.in ())
- != reinterpret_cast<void *> (larry_mutex3.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Should have gotten the same mutex, but didn't\n"),
- -1);
-
- larry_mutex3->lock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- larry_mutex3->unlock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Make sure that nothing has been broken behind the scenes.
- larry_mutex1->lock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- larry_mutex1->unlock (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- rt_orb->destroy_mutex (larry_mutex1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- rt_orb->destroy_mutex (moe_mutex1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in test_named_mutex_simple()");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-static int
-test_named_mutex_exception (RTCORBA::RTORB_ptr rt_orb)
-{
- // Test that open_named_mutex returns an exception when the mutex
- // name isn't found.
-
- // This test should run even on platforms without thread support.
- ACE_TRY_NEW_ENV
- {
- RTCORBA::Mutex_var larry_mutex1;
-
- larry_mutex1 = rt_orb->open_named_mutex ("larry" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ERROR_RETURN ((LM_ERROR,
- "Expected a MutexNotFound exception, but didn't get one.\n"),
- -1);
- }
- ACE_CATCH (RTCORBA::RTORB::MutexNotFound, ex)
- {
- ACE_DEBUG ((LM_DEBUG, "Caught expected MutexNotFound exception.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in test_named_mutex_exception()");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-#endif /* TAO_HAS_NAMED_RT_MUTEXES == 1 */
-
-#if defined (ACE_HAS_THREADS)
-const size_t MAX_ITERATIONS=10;
-const size_t MAX_THREADS=4;
-
-struct Mutex_Test_Data
-{
- RTCORBA::Mutex_ptr mutex;
- int *shared_var;
- int *error_flag;
-};
-
-static void *
-mutex_test_thread (void *args)
-{
- Mutex_Test_Data *data = reinterpret_cast<Mutex_Test_Data *> (args);
-
- RTCORBA::Mutex_ptr mutex = data->mutex;
- int *shared_var = data->shared_var;
-
- ACE_OS::srand (ACE_OS::time (0));
-
- ACE_TRY_NEW_ENV
- {
- for (size_t i = 0; i < MAX_ITERATIONS / 2; i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) = trying to lock on iteration %d\n"),
- i));
- mutex->lock ();
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) = locked on iteration %d\n"),
- i));
-
- // Check if the shared var is a value it shouldn't be when
- // we're under the lock.
- if (*shared_var != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Expected shared_var to be 0 under the mutex\n"));
- *data->error_flag = 1;
- }
-
- *shared_var = 1;
-
- // Sleep for a random amount of time between 0 and 2
- // seconds. Note that it's ok to use rand() here because we
- // are running within the critical section defined by the
- // Thread_Mutex.
- ACE_OS::sleep (ACE_OS::rand () % 2);
-
- if (*shared_var != 1)
- {
- ACE_ERROR ((LM_ERROR,
- "Expected shared_var to still be 1 after sleeping\n"));
- *data->error_flag = 1;
- }
-
- *shared_var = 0;
-
- mutex->unlock ();
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) = unlocked on iteration %d\n"),
- i));
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in mutex_test_thread()");
- *data->error_flag = 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-static int
-test_mutex_threads (RTCORBA::RTORB_ptr rt_orb)
-{
- // test the RTCORBA::Mutex implementation be spawning many threads
- // that repeatedly content for a lock. This code is based on the
- // tests/Thread_Mutex_Test code.
-
- Mutex_Test_Data test_data;
-
- const u_int n_threads = MAX_THREADS;
- int shared_var = 0;
- int error_flag = 0;
-
- ACE_TRY_NEW_ENV
- {
- RTCORBA::Mutex_ptr mutex = rt_orb->create_mutex (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_data.mutex = mutex;
- test_data.shared_var = &shared_var;
- test_data.error_flag = &error_flag;
-
- if (ACE_Thread_Manager::instance ()->spawn_n (n_threads,
- ACE_THR_FUNC (mutex_test_thread),
- (void *) &test_data,
- THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n%a"),
- ACE_TEXT ("thread create failed")));
-
- // Wait for the threads to exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::release (mutex);
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in test_mutex_threads()");
- return -1;
- }
- ACE_ENDTRY;
-
- return error_flag;
-}
-
-static void *
-mutex_test_try_lock_thread (void *args)
-{
- // test out try_lock() failure cases
- Mutex_Test_Data *data = reinterpret_cast<Mutex_Test_Data *> (args);
-
- RTCORBA::Mutex_ptr mutex = data->mutex;
- CORBA::Boolean result;
-
- ACE_TRY_NEW_ENV
- {
- // check that try_lock (0) returns false
- ACE_DEBUG ((LM_DEBUG,"attempting try_lock (0) - expect failure (but no exceptions) \n"));
- result = mutex->try_lock (0u ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (result)
- {
- ACE_ERROR ((LM_ERROR,
- "try_lock succeeded, but expected a failure\n"));
- *data->error_flag = 1;
- }
-
- if (test_try_lock_flag)
- {
- ACE_High_Res_Timer timer;
-
- // Check that try_lock (timeout) returns false (and times
- // out)
- ACE_DEBUG ((LM_DEBUG,
- "attempting try_lock (5 sec) - expect failure after 5 secs (but no exceptions)\n"));
-
- timer.start ();
- result = mutex->try_lock (50000000u /*5sec*/ ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- timer.stop ();
-
- if (result)
- {
- ACE_ERROR ((LM_ERROR,
- "try_lock (timeout) succeeded, but expected a failure\n"));
- *data->error_flag = 1;
- }
-
- ACE_Time_Value measured;
- timer.elapsed_time (measured);
- ACE_DEBUG ((LM_DEBUG,
- "try_lock returned after %u secs, %u usecs\n",
- measured.sec(),
- measured.usec()));
-
- if ((measured.sec() == 4 && measured.usec() >= 500000)
- || (measured.sec() == 5 && measured.usec() <= 500000))
- /* success */;
- else
- {
- ACE_ERROR ((LM_ERROR,
- "try_lock timed out not as expected\n"));
- *data->error_flag = 1;
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in mutex_test_try_lock_thread()");
- *data->error_flag = 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-static int
-test_mutex_try_lock (RTCORBA::RTORB_ptr rt_orb)
-{
- Mutex_Test_Data test_data;
- CORBA::Boolean result;
-
- int shared_var = 0;
- int error_flag = 0;
-
- ACE_TRY_NEW_ENV
- {
- RTCORBA::Mutex_ptr mutex = rt_orb->create_mutex (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Test out try_lock and keep the lock so that the spawned task
- // can test out try_lock failure cases
- result = mutex->try_lock (0u ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (!result)
- ACE_ERROR_RETURN ((LM_ERROR,
- "try_lock failed\n"),
- -1);
-
- test_data.mutex = mutex;
- test_data.shared_var = &shared_var;
- test_data.error_flag = &error_flag;
-
- ACE_DEBUG ((LM_DEBUG,
- "Spawning the test thread\n"));
- if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (mutex_test_try_lock_thread),
- (void *) &test_data,
- THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n%a"),
- ACE_TEXT ("thread create failed")));
-
- // Wait for the threads to exit.
- ACE_Thread_Manager::instance ()->wait ();
-
- mutex->unlock ();
-
- CORBA::release (mutex);
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in test_mutex_try_lock()");
- return -1;
- }
- ACE_ENDTRY;
-
- return error_flag;
-}
-
-#endif /* ACE_HAS_THREADS */
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // RTORB.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return -1;
-
- ACE_DEBUG ((LM_DEBUG,
- "Running RTCORBA Mutex unit tests\n"));
-
- if (test_mutex_simple (rt_orb.in ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "test_mutex_simple failed\n"),
- -1);
-
-#if (TAO_HAS_NAMED_RT_MUTEXES == 1)
- if (test_named_mutex_simple (rt_orb.in ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "test_named_mutex_simple failed\n"),
- -1);
-
- if (test_named_mutex_exception (rt_orb. in ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "test_named_mutex_exception failed\n"),
- -1);
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Named RT_Mutex support is not enabled. "
- "Skipping Named RT_Mutex tests.\n"));
-#endif /* TAO_HAS_NAMED_RT_MUTEXES == 1 */
-
-#if defined (ACE_HAS_THREADS)
-
- if (test_mutex_threads (rt_orb.in ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "test_mutex_threads failed\n"),
- -1);
- else if (test_mutex_try_lock (rt_orb.in ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "test_mutex_try_lock failed\n"),
- -1);
-
-#endif /* ACE_HAS_THREADS */
-
- ACE_DEBUG ((LM_DEBUG, "Mutex test finished\n\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in Mutex test server:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Server_Declared/.cvsignore b/TAO/tests/RTCORBA/Server_Declared/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Server_Declared/README b/TAO/tests/RTCORBA/Server_Declared/README
deleted file mode 100644
index 43152bf757a..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/README
+++ /dev/null
@@ -1,21 +0,0 @@
-$Id$
-
-This is a unit test for RTCORBA::SERVER_DECLARED priority model.
-
-Scenario:
----------
-
-The server creates a POA with RTCORBA::SERVER_DECLARED priority model
-policy. Two objects are created using this POA, one inherits the POA
-priority and the second one overrides POA priority with its own.
-Server threadpool resources are configured appropriately.
-
-The client obtains two object references and invokes a method on each
-several times. On each invocation, the client passes object's server
-declared priority as operation argument. This allows the servant to
-check that appropriate resources are being used for servicing client
-requests. In particular, servant checks that priority of the thread
-used for servicing the request equals to the server declared priority
-of the object, known from the operation argument.
-
-See run_test.pl for instructions on how to run both this test.
diff --git a/TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc b/TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc
deleted file mode 100644
index b62ff14a3d9..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/RTCORBA_Server_Declared.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): rt_server {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): rt_client {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Server_Declared/client.cpp b/TAO/tests/RTCORBA/Server_Declared/client.cpp
deleted file mode 100644
index 9ac3ce834d6..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/client.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "tao/RTCORBA/RTCORBA.h"
-
-const char *ior1 = "file://test1.ior";
-const char *ior2 = "file://test2.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "p:o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'p':
- ior1 = get_opts.opt_arg ();
- break;
- case 'o':
- ior2 = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-p <ior> "
- "-o <ior> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-CORBA::Short
-check_policy (Test_ptr server
- ACE_ENV_ARG_DECL)
-{
- CORBA::Policy_var policy =
- server->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- RTCORBA::PriorityModelPolicy_var priority_policy =
- RTCORBA::PriorityModelPolicy::_narrow (policy.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (check_for_nil (priority_policy.in (), "PriorityModelPolicy") == -1)
- return -1;
-
- RTCORBA::PriorityModel priority_model =
- priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- if (priority_model != RTCORBA::SERVER_DECLARED)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: priority_model != "
- "RTCORBA::SERVER_DECLARED!\n"),
- -1);
-
- return priority_policy->server_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB, resolve references and parse arguments.
-
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // Test object 1.
- CORBA::Object_var object =
- orb->string_to_object (ior1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server1 = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server1.in (), "server1") == -1)
- return -1;
-
- // Test object 2.
- object = orb->string_to_object (ior2 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server2 = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (server2.in (), "server2") == -1)
- return -1;
-
- // Check that test objects are configured with SERVER_DECLARED
- // PriorityModelPolicy, and get their server priorities.
-
- // Test object 1.
- CORBA::Short server1_priority =
- check_policy (server1.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (server1_priority == -1)
- return -1;
-
- // Test object 2.
- CORBA::Short server2_priority =
- check_policy (server2.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (server2_priority == -1)
- return -1;
-
- // Testing: make several invocations on test objects.
- for (int i = 0; i < 5; ++i)
- {
- server1->test_method (server1_priority ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server2->test_method (server2_priority ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Testing over. Shut down Server ORB.
- server1->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception in Server_Declared test client:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Server_Declared/continuous.conf b/TAO/tests/RTCORBA/Server_Declared/continuous.conf
deleted file mode 100644
index 8d8795f4817..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous"
diff --git a/TAO/tests/RTCORBA/Server_Declared/continuous.conf.xml b/TAO/tests/RTCORBA/Server_Declared/continuous.conf.xml
deleted file mode 100644
index f297697bc7c..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Server_Declared/run_test.pl b/TAO/tests/RTCORBA/Server_Declared/run_test.pl
deleted file mode 100755
index 8e70a8d879c..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/run_test.pl
+++ /dev/null
@@ -1,91 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile1 = PerlACE::LocalFile ("test1.ior");
-$iorfile2 = PerlACE::LocalFile ("test2.ior");
-
-unlink $iorfile1;
-unlink $iorfile2;
-$status = 0;
-
-$server_args =
- "-a 45 -b 55";
-
-print STDERR "Value is " . $^O;
-
-if ($^O eq "MSWin32") {
- $server_args =
- "-a 1 -b 2";
-}
-elsif ($^O eq "dec_osf") {
- $server_args =
- "-a 20 -b 30";
-}
-elsif ($^O eq "hpux") {
- $continuous = 1;
- $server_args =
- "-a 17 -b 29";
-}
-
-if ($continuous) {
- $server_args .= " -ORBSvcConf continuous$PerlACE::svcconf_ext";
-}
-
-$client_args = "-p file://$iorfile1 -o file://$iorfile2";
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-p test1.ior -o test2.ior $server_args");
-}
-else {
- $SV = new PerlACE::Process ("server", "-p $iorfile1 -o $iorfile2 $server_args");
-}
-$CL = new PerlACE::Process ("client", $client_args);
-
-print STDERR "\n********** RTCORBA SERVER_DECLARED Priority Unit Test\n\n";
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1)
-{
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill ();
- exit 1;
- }
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0)
-{
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0)
-{
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Server_Declared/server.cpp b/TAO/tests/RTCORBA/Server_Declared/server.cpp
deleted file mode 100644
index 6594427f846..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/server.cpp
+++ /dev/null
@@ -1,391 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-class Test_i : public POA_Test
-{
- // = TITLE
- // An implementation for the Test interface in test.idl
- //
-public:
- Test_i (CORBA::ORB_ptr orb);
- // ctor
-
- void test_method (CORBA::Short priority
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::test_method (CORBA::Short priority
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Use RTCurrent to find out the CORBA priority of the current
- // thread.
-
- CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("RTCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (obj.in ()))
- ACE_THROW (CORBA::INTERNAL ());
-
- CORBA::Short servant_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Print out the info.
- if (servant_thread_priority != priority)
- ACE_DEBUG ((LM_DEBUG,
- "ERROR: servant thread priority is not equal"
- "to method argument.\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Server_Declared priority: %d "
- "Servant thread priority: %d\n",
- priority, servant_thread_priority));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-//*************************************************************************
-
-const char *ior_output_file1 = "test1.ior";
-const char *ior_output_file2 = "test2.ior";
-CORBA::Short poa_priority = -1;
-CORBA::Short object_priority = -1;
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "p:o:a:b:");
- int c, result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'p':
- ior_output_file1 = get_opts.opt_arg ();
- break;
-
- case 'o':
- ior_output_file2 = get_opts.opt_arg ();
- break;
-
- case 'a':
- result = ::sscanf (get_opts.opt_arg (),
- "%hd",
- &poa_priority);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-a> option"),
- -1);
- break;
-
- case 'b':
- result = ::sscanf (get_opts.opt_arg (),
- "%hd",
- &object_priority);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-b> option"),
- -1);
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-p <iorfile1> "
- "-o <iorfile2> "
- "-a <poa_priority> "
- "-b <object_priority> "
- "\n",
- argv [0]),
- -1);
- }
-
- if (poa_priority < 0
- || object_priority < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Valid poa and object priorities must be"
- " specified.\nSee README file for more info\n"),
- -1);
-
- return 0;
-}
-
-int
-check_for_nil (CORBA::Object_ptr obj, const char *msg)
-{
- if (CORBA::is_nil (obj))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- msg),
- -1);
- else
- return 0;
-}
-
-int
-create_object (RTPortableServer::POA_ptr poa,
- CORBA::ORB_ptr orb,
- Test_i *server_impl,
- CORBA::Short priority,
- const char *filename
- ACE_ENV_ARG_DECL)
-{
- // Register with poa.
- PortableServer::ObjectId_var id;
-
- if (priority > -1)
- id = poa->activate_object_with_priority (server_impl,
- priority
- ACE_ENV_ARG_PARAMETER);
- else
- id = poa->activate_object (server_impl ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK_RETURN (-1);
-
- CORBA::Object_var server =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Print out the IOR.
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG, "<%s>\n\n", ior.in ()));
-
- // Print ior to the file.
- if (filename != 0)
- {
- FILE *output_file= ACE_OS::fopen (filename, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- // RTORB.
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_orb.in (), "RTORB") == -1)
- return -1;
-
- // RootPOA.
- object =
- this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (root_poa.in (), "RootPOA") == -1)
- return -1;
-
- // POAManager.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create child POA with SERVER_DECLARED PriorityModelPolicy,
- // and MULTIPLE_ID id uniqueness policy (so we can use one
- // servant to create several objects).
- CORBA::PolicyList poa_policy_list;
- poa_policy_list.length (2);
- poa_policy_list[0] =
- rt_orb->create_priority_model_policy (RTCORBA::SERVER_DECLARED,
- poa_priority
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_policy_list[1] =
- root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var child_poa =
- root_poa->create_POA ("Child_POA",
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTPortableServer::POA_var rt_poa =
- RTPortableServer::POA::_narrow (child_poa.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (check_for_nil (rt_poa.in (), "RTPOA") == -1)
- return -1;
-
- // Servant.
- Test_i server_impl (this->orb_.in ());
-
- // Create object 1 (it will inherit POA's priority).
- int result;
- ACE_DEBUG ((LM_DEBUG, "\nActivated object one as "));
- result = create_object (rt_poa.in (), this->orb_.in (), &server_impl,
- -1, ior_output_file1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result == -1)
- return -1;
-
- // Create object 2 (override POA's priority).
- ACE_DEBUG ((LM_DEBUG, "\nActivated object two as "));
- result = create_object (rt_poa.in (), this->orb_.in (), &server_impl,
- object_priority, ior_output_file2 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result == -1)
- return -1;
-
- // Activate POA manager.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Start ORB event loop.
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Unexpected exception caught in Server_Declared test server:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse arguments.
- if (parse_args (argc, argv) != 0)
- return -1;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- int result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Server_Declared/svc.conf b/TAO/tests/RTCORBA/Server_Declared/svc.conf
deleted file mode 100644
index 2154375e265..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# No options required for regular testing
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/Server_Declared/svc.conf.xml b/TAO/tests/RTCORBA/Server_Declared/svc.conf.xml
deleted file mode 100644
index b589f90605b..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/svc.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- No options required for regular testing -->
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Server_Declared/test.idl b/TAO/tests/RTCORBA/Server_Declared/test.idl
deleted file mode 100644
index ce79aec2ee7..00000000000
--- a/TAO/tests/RTCORBA/Server_Declared/test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- void test_method (in short priority);
- // Print out the CORBA priority of the servant thread and check that
- // it is equal to the <priority> argument.
-
- oneway void shutdown ();
- // Shut down the ORB.
-};
diff --git a/TAO/tests/RTCORBA/Server_Protocol/.cvsignore b/TAO/tests/RTCORBA/Server_Protocol/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Server_Protocol/README b/TAO/tests/RTCORBA/Server_Protocol/README
deleted file mode 100644
index b8e889ab6f9..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/README
+++ /dev/null
@@ -1,93 +0,0 @@
-$Id$
-
-This is a unit test for RTCORBA::ServerProtocolPolicy.
-
-Scenario:
---------
-The server first prints out its ORB default Server Protocol policy.
-If the <-p> command line option was specified, a child POA is created
-and configured with Server Protocol Policy containing a single
-protocol specified with <-p> (see options section below).
-The object is registered with child POA if one was created (root poa
-otherwise) and the server waits for requests.
-The client obtains server IOR and makes a single invocation, causing
-server process to shut down its orb and exit.
-
-To run (on Unix):
--------
-$./server [-o <ior_file> -p <profile_id>]
-$./client [-k <ior>]
-
-
-Options:
---------
- Server:
-
--o <ior_output_file> Default: test.ior
- Filename for output of server's IOR.
-
--p <profile_id> Default: none.
- The POA with which the object will be
- registered will be configured with Server
- Protocol Policy cotaining a single protocol -
- the one identified by <profile_id>. If this
- option is not present, then the POA is not
- configured with Server Protocol Policy and ORB
- default is used.
-
- Client:
-
--k <server_ior> Default: file://test.ior
- Server's IOR
-
-Expected output:
-----------------
-Expected output varies with the configurations used to run the test.
-General guidelines:
-
-1) ORB default ServerProtocolPolicy must contain all the protocols
- that were loaded in the order they were loaded. This can be
- manipulated through the use of service config files (see run_test.pl)
-
-2) Run client with -ORBdebuglevel 1 to see which protocol is used for
- communication. Make sure it is the same protocol that was
- specified with <-p> or the first available from orb default server
- protocol policy if <-p> wasn't specified (see run_test.pl for
- sample options)
-
-3) See OMG Real-Time CORBA specification and TAO's Real-Time CORBA
- documentation for more information.
-
-
-Sample Run/Output (on Unix):
-----------------
-* Server:
-
-$./server -ORBendpoint iiop:// -ORBendpoint uiop:// -ORBendpoint \
-shmiop:// -p 1413566210
-
-ORB default for ServerProtocolPolicy contains 3 protocols:
- Protocol 0: IOP::ProfileId = 0
- Properties:
- send_buffer_size = 65536
- receive_buffer_size = 65536
- no_delay = 1
- Protocol 1: IOP::ProfileId = 1413566208
- Properties:
- send_buffer_size = 65536
- receive_buffer_size = 65536
- Protocol 2: IOP::ProfileId = 1413566210
-
-Activated as <IOR:000000000000000d49444c3a546573743a312e30000000000000000154414f020000008000010200000000116163652e63732e777573746c2e6564750000cbef0000002314010f004e535439b59013000388560000000100000001000000000000000100000001000000000300000000000000080000000054414f000000000100000014000000000001000100000000000101090000000054414f000000000400000000>
-
-Received request to shut down the ORB
-Server ORB event loop finished
-
-
-* Client (in a separate window):
-
-$./client -ORBdebuglevel 1
-TAO (20145|1) Loaded default protocol <IIOP_Factory>
-TAO (20145|1) Loaded default protocol <UIOP_Factory>
-TAO (20145|1) Loaded default protocol <SHMIOP_Factory>
-TAO (20145|1) SHMIOP connection to server <127.0.0.1:52207> on 8
diff --git a/TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc b/TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc
deleted file mode 100644
index a77351b5090..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/RTCORBA_Server_Protocol.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server, minimum_corba {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Server_Protocol/client.cpp b/TAO/tests/RTCORBA/Server_Protocol/client.cpp
deleted file mode 100644
index 7dd24cdb9b5..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/client.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/Strategies/advanced_resource.h"
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize and obtain reference to the Test object.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var server =
- Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Object reference <%s> is nil\n",
- ior),
- -1);
- }
-
- // Make an invocation on the obtained Test object.
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl b/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
deleted file mode 100755
index 8921a85c6ec..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
+++ /dev/null
@@ -1,112 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-$status = 0;
-
-$server_reverse_conf = PerlACE::LocalFile ("server_reverse$PerlACE::svcconf_ext");
-$server_iiop_conf = PerlACE::LocalFile ("server_iiop$PerlACE::svcconf_ext");
-$server_uiop_conf = PerlACE::LocalFile ("server_uiop$PerlACE::svcconf_ext");
-$server_shmiop_conf = PerlACE::LocalFile ("server_shmiop$PerlACE::svcconf_ext");
-$server_iiop_uiop_conf = PerlACE::LocalFile ("server_iiop_uiop$PerlACE::svcconf_ext");
-$server_iiop_shmiop_conf = PerlACE::LocalFile ("server_iiop_shmiop$PerlACE::svcconf_ext");
-$server_reverse_nt_conf = PerlACE::LocalFile ("server_reverse_nt$PerlACE::svcconf_ext");
-
-# Configurations for all tests to be run.
-@server_opts =
- ("-ORBSndSock 54321 -ORBendpoint iiop://",
-
- "-ORBsvcconf $server_reverse_conf "
- ."-ORBEndpoint shmiop:// -ORBEndpoint uiop:// -ORBendpoint iiop://",
-
- "-ORBRcvSock 12345 -ORBsvcconf $server_iiop_uiop_conf "
- ."-ORBEndpoint iiop:// -ORBEndpoint uiop:// "
- ."-p 1413566208");
-
-@comments = ("* ORB Default Server Protocol Policy Test\n "
- ."(TAO's default behavior without config files): \n",
-
- "* ORB Default Server Protocol Policy Test\n "
- ."(All TAO protocols are loaded, but in reverse order): \n",
-
- "* 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") {
- @server_opts =
- ("-ORBSndSock 54321 -ORBendpoint iiop://",
-
- "-ORBsvcconf $server_reverse_nt_conf "
- ."-ORBEndpoint shmiop:// -ORBendpoint iiop://",
-
- "-ORBRcvSock 12345 -ORBsvcconf $server_iiop_shmiop_conf "
- ."-ORBEndpoint iiop:// -ORBEndpoint shmiop:// "
- ."-p 1413566210");
-
- $comments[2] =
- "* Overriding ORB Default Server Protocol Policy in the POA\n"
- ." (POA Server Protocol set to SMHIOP only): \n";
-
-}
-
-print STDERR "********** RTCORBA Server Protocol Policy Unit Test\n";
-
-$test_number = 0;
-
-$SV = new PerlACE::Process ("server");
-$CL = new PerlACE::Process ("client");
-
-
-foreach $o (@server_opts) {
- print STDERR "\n\n----------------------------------\n";
- print STDERR " ".$comments[$test_number];
-
- my $args = "$o -o $iorfile";
-
- unlink $iorfile;
-
- $SV->Arguments ($args);
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- $CL->Arguments ("-k file://$iorfile -ORBdebuglevel 1");
-
- $client = $CL->SpawnWaitKill (60);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-
- $server = $SV->WaitKill (60);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- $test_number++;
-}
-
-unlink $iorfile;
-
-# Clean up SHMIOP files
-PerlACE::check_n_cleanup_files ("server_shmiop_*");
-
-exit $status;
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server.cpp b/TAO/tests/RTCORBA/Server_Protocol/server.cpp
deleted file mode 100644
index 5ca5342d11e..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-// $Id$
-
-#include "testS.h"
-#include "tao/RTCORBA/RT_Policy_i.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "tao/Strategies/advanced_resource.h"
-#include "tao/ORB_Core.h"
-#include "tao/Policy_Set.h"
-#include "ace/Get_Opt.h"
-#include "tao/PortableServer/Root_POA.h"
-
-class Test_i : public POA_Test
-{
- // = TITLE
- // An implementation for the Test interface in test.idl
- //
-public:
- Test_i (CORBA::ORB_ptr orb);
- // ctor
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Received request to shut down the ORB\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-//*************************************************************************
-
-const char *ior_output_file = "test.ior";
-int protocol_chosen = 0;
-CORBA::ULong protocol_type = 0;
-
-// Parse command-line arguments.
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:p:");
- int c, result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'p':
- result = ::sscanf (get_opts.opt_arg (),
- "%u",
- &protocol_type);
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to process <-p> option"),
- -1);
-
- protocol_chosen = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- return 0;
-}
-
-int
-check_server_protocol_at_root_poa (CORBA::ORB_ptr /*orb*/,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- // Users should never write code like below.
- // It is for testing purposes only! (Unfortunately, there
- // is no standard way to access POA policies).
- TAO_Root_POA &tao_poa =
- dynamic_cast<TAO_Root_POA &> (*poa);
-
- TAO_POA_Policy_Set &policies =
- tao_poa.policies ();
-
- CORBA::Policy_var server_protocol =
- policies.get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- RTCORBA::ServerProtocolPolicy_var policy =
- RTCORBA::ServerProtocolPolicy::_narrow (server_protocol.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (CORBA::is_nil (policy.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "\nERROR: ORB default for ServerProtocolPolicy "
- "is missing\n"),
- -1);
-
- RTCORBA::ProtocolList_var protocols = policy->protocols (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG,
- "\nRoot POA ServerProtocolPolicy "
- "contains %u protocols:\n", protocols->length ()));
-
- for (CORBA::ULong i = 0; i < protocols->length (); ++i)
- {
- CORBA::ULong protocol_type = protocols[i].protocol_type;
- ACE_DEBUG ((LM_DEBUG,
- " Protocol %u: IOP::ProfileId = %u\n",
- i, protocol_type));
- RTCORBA::ProtocolProperties_var properties =
- protocols[i].transport_protocol_properties;
-
- // Print properties.
- if (protocol_type == IOP::TAG_INTERNET_IOP)
- {
- RTCORBA::TCPProtocolProperties_var tcp_properties =
- RTCORBA::TCPProtocolProperties::_narrow (properties.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (!CORBA::is_nil (tcp_properties.in ()))
- ACE_DEBUG ((LM_DEBUG,
- " Properties: \n"
- " send_buffer_size = %d\n"
- " receive_buffer_size = %d\n"
- " keep_alive = %d\n"
- " dont_route = %d\n"
- " no_delay = %d\n"
- " enable_network_priority = %d\n",
- tcp_properties->send_buffer_size (),
- tcp_properties->recv_buffer_size (),
- tcp_properties->keep_alive (),
- tcp_properties->dont_route (),
- tcp_properties->no_delay (),
- tcp_properties->enable_network_priority ()));
- }
- else if (protocol_type == TAO_TAG_UIOP_PROFILE)
- {
- RTCORBA::UnixDomainProtocolProperties_var uiop_properties =
- RTCORBA::UnixDomainProtocolProperties::_narrow (properties.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (!CORBA::is_nil (uiop_properties.in ()))
- ACE_DEBUG ((LM_DEBUG,
- " Properties: \n"
- " send_buffer_size = %d\n"
- " receive_buffer_size = %d\n",
- uiop_properties->send_buffer_size (),
- uiop_properties->recv_buffer_size ()));
- }
- else if (protocol_type == TAO_TAG_SHMEM_PROFILE)
- {
- RTCORBA::SharedMemoryProtocolProperties_var shmem_properties =
- RTCORBA::SharedMemoryProtocolProperties::_narrow (properties.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (!CORBA::is_nil (shmem_properties.in ()))
- ACE_DEBUG ((LM_DEBUG,
- " Properties: \n"
- " send_buffer_size = %d\n"
- " receive_buffer_size = %d\n"
- " keep_alive = %d\n"
- " dont_route = %d\n"
- " no_delay = %d\n"
- " preallocate_buffer_size = %d\n"
- " mmap_filename = %s\n"
- " mmap_lockname = %s\n",
- shmem_properties->send_buffer_size (),
- shmem_properties->recv_buffer_size (),
- shmem_properties->keep_alive (),
- shmem_properties->dont_route (),
- shmem_properties->no_delay (),
- shmem_properties->preallocate_buffer_size (),
- shmem_properties->mmap_filename (),
- shmem_properties->mmap_lockname ()));
- }
- else if (protocol_type == TAO_TAG_DIOP_PROFILE)
- {
- RTCORBA::UserDatagramProtocolProperties_var diop_properties =
- RTCORBA::UserDatagramProtocolProperties::_narrow (properties.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (!CORBA::is_nil (diop_properties.in ()))
- ACE_DEBUG ((LM_DEBUG,
- " Properties: \n"
- " enable_network_priority = %d\n",
- diop_properties->enable_network_priority ()));
- }
- else if (protocol_type == TAO_TAG_SCIOP_PROFILE)
- {
- RTCORBA::StreamControlProtocolProperties_var sciop_properties =
- RTCORBA::StreamControlProtocolProperties::_narrow (properties.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (!CORBA::is_nil (sciop_properties.in ()))
- ACE_DEBUG ((LM_DEBUG,
- " Properties: \n"
- " send_buffer_size = %d\n"
- " receive_buffer_size = %d\n"
- " keep_alive = %d\n"
- " dont_route = %d\n"
- " no_delay = %d\n"
- " enable_network_priority = %d\n",
- sciop_properties->send_buffer_size (),
- sciop_properties->recv_buffer_size (),
- sciop_properties->keep_alive (),
- sciop_properties->dont_route (),
- sciop_properties->no_delay (),
- sciop_properties->enable_network_priority ()));
- }
- }
-
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- CORBA::Object_var object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Panic <RootPOA> is nil\n"),
- -1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object = orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Check ServerProtocol configurations.
- int result = check_server_protocol_at_root_poa (orb.in (),
- root_poa.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return -1;
-
- // If a protocol type was indicated using command line option,
- // create a child POA with ServerProtocolPolicy containing
- // that protocol and register Test object with child POA.
- // Otherwise, register Test object with the root POA (ORB
- // default ServerProtocolPolicy will get used).
- RTCORBA::ProtocolList protocols;
- protocols.length (1);
- protocols[0].protocol_type = protocol_type;
- protocols[0].transport_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
- protocols[0].orb_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
-
- CORBA::PolicyList poa_policy_list;
- poa_policy_list.length (1);
- poa_policy_list[0] =
- rt_orb->create_server_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var poa;
-
- if (protocol_chosen)
- {
- poa =
- root_poa->create_POA ("Child_POA",
- poa_manager.in (),
- poa_policy_list
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- else
- {
- poa = PortableServer::POA::_duplicate (root_poa.in ());
- ACE_TRY_CHECK;
- }
-
- Test_i server_impl (orb.in ());
-
- PortableServer::ObjectId_var id =
- poa->activate_object (&server_impl ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server =
- poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Print Object IOR.
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "\nActivated as <%s>\n\n", ior.in ()));
-
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- // Run ORB Event loop.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf
deleted file mode 100644
index 6970cc7974c..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Protocol options
-static Advanced_Resource_Factory "-ORBProtocolFactory IIOP_Factory"
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf.xml b/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf.xml
deleted file mode 100644
index a4aed9ed5d7..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from server_iiop.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Protocol options -->
- <static id="Advanced_Resource_Factory" params="-ORBProtocolFactory IIOP_Factory"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_iiop_shmiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_iiop_shmiop.conf
deleted file mode 100644
index e93d62ad565..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_iiop_shmiop.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Protocol options
-static Advanced_Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory SHMIOP_Factory "
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_iiop_uiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_iiop_uiop.conf
deleted file mode 100644
index 8278e468550..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_iiop_uiop.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Protocol options
-static Advanced_Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIOP_Factory "
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf b/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf
deleted file mode 100644
index 8f1988df985..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Options for SHMIOP protocol
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop"
-
-# Protocol options
-static Advanced_Resource_Factory "-ORBProtocolFactory SHMIOP_Factory -ORBProtocolFactory UIOP_Factory -ORBProtocolFactory IIOP_Factory"
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf.xml b/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf.xml
deleted file mode 100644
index 9154765d4dd..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from server_reverse.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options for SHMIOP protocol -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop"/>
- <!-- Protocol options -->
- <static id="Advanced_Resource_Factory" params="-ORBProtocolFactory SHMIOP_Factory -ORBProtocolFactory UIOP_Factory -ORBProtocolFactory IIOP_Factory"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf b/TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf
deleted file mode 100644
index 9e1b5d05bab..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Options for SHMIOP protocol
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop"
-
-# Protocol options
-static Advanced_Resource_Factory "-ORBProtocolFactory SHMIOP_Factory -ORBProtocolFactory IIOP_Factory"
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf.xml b/TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf.xml
deleted file mode 100644
index dc1e7f12579..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_reverse_nt.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from server_reverse_nt.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options for SHMIOP protocol -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop"/>
- <!-- Protocol options -->
- <static id="Advanced_Resource_Factory" params="-ORBProtocolFactory SHMIOP_Factory -ORBProtocolFactory IIOP_Factory"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf
deleted file mode 100644
index c75f08cdd40..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# Options for SHMIOP protocol
-static SHMIOP_Factory "-MMAPFilePrefix server_shmiop"
-
-# Protocol options
-static Advanced_Resource_Factory "-ORBProtocolFactory SHMIOP_Factory "
-
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf.xml b/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf.xml
deleted file mode 100644
index 9ffdb8c899f..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from server_shmiop.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Options for SHMIOP protocol -->
- <static id="SHMIOP_Factory" params="-MMAPFilePrefix server_shmiop"/>
- <!-- Protocol options -->
- <static id="Advanced_Resource_Factory" params="-ORBProtocolFactory SHMIOP_Factory "/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf
deleted file mode 100644
index eb6162bccf2..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Protocol options
-static Advanced_Resource_Factory "-ORBProtocolFactory UIOP_Factory "
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf.xml b/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf.xml
deleted file mode 100644
index 911f616d4fa..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from server_uiop.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Protocol options -->
- <static id="Advanced_Resource_Factory" params="-ORBProtocolFactory UIOP_Factory "/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Server_Protocol/test.idl b/TAO/tests/RTCORBA/Server_Protocol/test.idl
deleted file mode 100644
index 7fd0cd6f651..00000000000
--- a/TAO/tests/RTCORBA/Server_Protocol/test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// $Id$
-//
-
-interface Test
-{
- oneway void shutdown ();
- // Shut down the ORB.
-};
diff --git a/TAO/tests/RTCORBA/Thread_Pool/.cvsignore b/TAO/tests/RTCORBA/Thread_Pool/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/RTCORBA/Thread_Pool/README b/TAO/tests/RTCORBA/Thread_Pool/README
deleted file mode 100644
index 95b07c46c2c..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/README
+++ /dev/null
@@ -1,10 +0,0 @@
-$Id$
-
-Description:
-This is a simple test for a RT thread-pool server. It creates a
-server process with multiple thread pools, POAs, and servants. The
-test also spawns multiple clients for each servant. The servants with
-multiple threads in their thread-pool respond faster than the servants
-with a single thread thread-pool.
-
-See run_test.pl to see how to run this test. \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc b/TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc
deleted file mode 100644
index ebf79370785..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/RTCORBA_Thread_Pool.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, rt_server, minimum_corba {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, rt_client, minimum_corba {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/RTCORBA/Thread_Pool/client.cpp b/TAO/tests/RTCORBA/Thread_Pool/client.cpp
deleted file mode 100644
index 727015a2353..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/client.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "ace/OS_NS_unistd.h"
- #include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Thread_Pool, client, "$Id$")
-
-const char *ior = "file://ior_1";
-int iterations = 6;
-int shutdown_server = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "xk:i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'x':
- shutdown_server = 1;
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-i <iterations> "
- "-x [shutdown server] "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_var test =
- test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- pid_t pid =
- ACE_OS::getpid ();
-
- for (int i = 0; i != iterations; ++i)
- {
- CORBA::Long r =
- test->method (pid,
- i
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_ASSERT (r == i);
- // Assert disappears on with optimizations on.
- ACE_UNUSED_ARG (r);
- }
-
- if (shutdown_server)
- {
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Thread_Pool/continuous.conf b/TAO/tests/RTCORBA/Thread_Pool/continuous.conf
deleted file mode 100644
index 8d8795f4817..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/continuous.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Option for platforms where direct mapping doesn't work
-static RT_ORB_Loader "-ORBPriorityMapping continuous"
diff --git a/TAO/tests/RTCORBA/Thread_Pool/continuous.conf.xml b/TAO/tests/RTCORBA/Thread_Pool/continuous.conf.xml
deleted file mode 100644
index f297697bc7c..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/continuous.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from continuous.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- Option for platforms where direct mapping doesn't work -->
- <static id="RT_ORB_Loader" params="-ORBPriorityMapping continuous"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Thread_Pool/run_test.pl b/TAO/tests/RTCORBA/Thread_Pool/run_test.pl
deleted file mode 100755
index 2dcbc7246bf..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/run_test.pl
+++ /dev/null
@@ -1,124 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$number_of_clients = 4;
-$status = 0;
-$continuous = ($^O eq 'hpux');
-
-@configurations =
- (
- {
- file => "ior_1",
- description => "Invoking methods on servant in default thread pool",
- },
- {
- file => "ior_2",
- description => "Invoking methods on servant in first RT thread pool (without lanes)",
- },
- {
- file => "ior_3",
- description => "Invoking methods on servant in second RT thread pool (with lanes)",
- },
- );
-
-for $test (@configurations)
-{
- unlink $test->{file};
-}
-
-sub run_clients
-{
- my @parms = @_;
- $arg = $parms[0];
- $clients = $parms[1];
-
- for ($i = 0; $i < $clients; $i++)
- {
- $CL[$i] = new PerlACE::Process ("client", $arg);
- $CL[$i]->Spawn ();
- }
-
- for ($i = 0; $i < $clients; $i++)
- {
- $client = $CL[$i]->WaitKill (120);
- if ($client != 0)
- {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- goto kill_server;
- }
- }
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
-}
-else {
- $SV = new PerlACE::Process ("server");
-}
-
-if ($continuous) {
- $SV->Arguments ("-ORBSvcConf continuous$PerlACE::svcconf_ext");
-}
-
-$SV->Spawn ();
-
-for $test (@configurations)
-{
- if (PerlACE::waitforfile_timed ($test->{file}, $PerlACE::wait_interval_for_process_creation) == -1)
- {
- $server = $SV->TimedWait (1);
- if ($server == 2)
- {
- # Mark as no longer running to avoid errors on exit.
- $SV->{RUNNING} = 0;
- exit $status;
- }
- else
- {
- print STDERR "ERROR: cannot find ior file: $test->{file}\n";
- $status = 1;
- goto kill_server;
- }
- }
- }
-
-for $test (@configurations)
- {
- print STDERR "\n*************************************************************\n";
- print STDERR "$test->{description}\n";
- print STDERR "*************************************************************\n\n";
-
- run_clients ("-k file://".PerlACE::LocalFile($test->{file}), $number_of_clients);
- }
-
-print STDERR "\n************************\n";
-print STDERR "Shutting down the server\n";
-print STDERR "************************\n\n";
-
-run_clients ("-k file://".PerlACE::LocalFile($configurations[0]->{file})." -i 0 -x", 1);
-
-kill_server:
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0)
- {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
-for $test (@configurations)
- {
- unlink $test->{file};
- }
-
-exit $status
-
diff --git a/TAO/tests/RTCORBA/Thread_Pool/server.cpp b/TAO/tests/RTCORBA/Thread_Pool/server.cpp
deleted file mode 100644
index 5dd811de9bd..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/server.cpp
+++ /dev/null
@@ -1,398 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/ORB_Core.h"
-#include "ace/Task.h"
-#include "tao/RTPortableServer/RTPortableServer.h"
-#include "../check_supported_priorities.cpp"
-
-ACE_RCSID(Thread_Pool, server, "$Id$")
-
-const char *ior_output_file = "ior";
-int ior_count = 1;
-CORBA::ULong static_threads = 2;
-CORBA::ULong dynamic_threads = 2;
-long nap_time = 1000;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:s:d:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 's':
- static_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'd':
- dynamic_threads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 't':
- nap_time = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-s <static_threads> "
- "-d <dynamic_threads> "
- "-t <nap_time> "
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-write_ior_to_file (CORBA::ORB_ptr orb,
- test_ptr test
- ACE_ENV_ARG_DECL)
-{
- CORBA::String_var ior =
- orb->object_to_string (test
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- char filename[BUFSIZ];
- ACE_OS::sprintf (filename,
- "%s_%d",
- ior_output_file,
- ior_count++);
-
- FILE *output_file =
- ACE_OS::fopen (filename,
- "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
-
- ACE_OS::fclose (output_file);
-
- return 0;
-}
-
-int
-create_POA_and_register_servant (CORBA::Policy_ptr threadpool_policy,
- const char *poa_name,
- PortableServer::POAManager_ptr poa_manager,
- PortableServer::POA_ptr root_poa,
- CORBA::ORB_ptr orb,
- RTCORBA::RTORB_ptr rt_orb
- ACE_ENV_ARG_DECL)
-{
- // Policies for the firstPOA to be created.
- CORBA::PolicyList policies (3); policies.length (3);
-
- // Implicit_activation policy.
- policies[0] =
- root_poa->create_implicit_activation_policy
- (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Thread pool policy.
- policies[1] =
- CORBA::Policy::_duplicate (threadpool_policy);
-
- // Priority Model policy.
- policies[2] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Create the POA under the RootPOA.
- PortableServer::POA_var poa =
- root_poa->create_POA (poa_name,
- poa_manager,
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Creation of POAs is over. Destroy the Policy objects.
- for (CORBA::ULong i = 0;
- i < policies.length ();
- ++i)
- {
- policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- test_i *servant =
- new test_i (orb,
- poa.in (),
- nap_time);
-
- PortableServer::ServantBase_var safe_servant (servant);
- ACE_UNUSED_ARG (safe_servant);
-
- test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int result =
- write_ior_to_file (orb,
- test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return result;
-}
-
-class Task : public ACE_Task_Base
-{
-public:
-
- Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb);
-
- int svc (void);
-
- CORBA::ORB_var orb_;
-
-};
-
-Task::Task (ACE_Thread_Manager &thread_manager,
- CORBA::ORB_ptr orb)
- : ACE_Task_Base (&thread_manager),
- orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::Object_var object =
- this->orb_->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTORB"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::RTORB_var rt_orb =
- RTCORBA::RTORB::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- this->orb_->resolve_initial_references ("RTCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Current_var current =
- RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTCORBA::Priority default_thread_priority =
- current->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_i servant (this->orb_.in (),
- root_poa.in (),
- nap_time);
- test_var test =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- write_ior_to_file (this->orb_.in (),
- test.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (result != 0)
- return result;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong stacksize = 0;
- CORBA::Boolean allow_request_buffering = 0;
- CORBA::ULong max_buffered_requests = 0;
- CORBA::ULong max_request_buffer_size = 0;
-
- RTCORBA::ThreadpoolId threadpool_id_1 =
- rt_orb->create_threadpool (stacksize,
- static_threads,
- dynamic_threads,
- default_thread_priority,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_1 =
- rt_orb->create_threadpool_policy (threadpool_id_1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Boolean allow_borrowing = 0;
- RTCORBA::ThreadpoolLanes lanes (1);
- lanes.length (1);
-
- lanes[0].lane_priority = default_thread_priority;
- lanes[0].static_threads = static_threads;
- lanes[0].dynamic_threads = dynamic_threads;
-
- RTCORBA::ThreadpoolId threadpool_id_2 =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Policy_var threadpool_policy_2 =
- rt_orb->create_threadpool_policy (threadpool_id_2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- result =
- create_POA_and_register_servant (threadpool_policy_1.in (),
- "first_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- result =
- create_POA_and_register_servant (threadpool_policy_2.in (),
- "second_poa",
- poa_manager.in (),
- root_poa.in (),
- this->orb_.in (),
- rt_orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (result != 0)
- return result;
-
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Make sure we can support multiple priorities that are required
- // for this test.
- if (!check_supported_priorities (orb.in ()))
- return 2;
-
- // Thread Manager for managing task.
- ACE_Thread_Manager thread_manager;
-
- // Create task.
- Task task (thread_manager,
- orb.in ());
-
- // Task activation flags.
- long flags =
- THR_NEW_LWP |
- THR_JOINABLE |
- orb->orb_core ()->orb_params ()->thread_creation_flags ();
-
- // Activate task.
- result =
- task.activate (flags);
- if (result == -1)
- {
- if (errno == EPERM)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot create thread with scheduling policy %s\n"
- "because the user does not have the appropriate privileges, terminating program....\n"
- "Check svc.conf options and/or run as root\n",
- sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
- 2);
- }
- else
- // Unexpected error.
- ACE_ASSERT (0);
- }
-
- // Wait for task to exit.
- result =
- thread_manager.wait ();
- ACE_ASSERT (result != -1);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTCORBA/Thread_Pool/svc.conf b/TAO/tests/RTCORBA/Thread_Pool/svc.conf
deleted file mode 100644
index 2154375e265..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# No options required for regular testing
-
-# For real-time testing, uncomment the following line:
-# static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM"
diff --git a/TAO/tests/RTCORBA/Thread_Pool/svc.conf.xml b/TAO/tests/RTCORBA/Thread_Pool/svc.conf.xml
deleted file mode 100644
index b589f90605b..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/svc.conf.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- No options required for regular testing -->
- <!-- For real-time testing, uncomment the following line: -->
- <!-- static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/RTCORBA/Thread_Pool/test.idl b/TAO/tests/RTCORBA/Thread_Pool/test.idl
deleted file mode 100644
index 3d264c4f51a..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/test.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- long method (in long client_id,
- in long iteration);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/RTCORBA/Thread_Pool/test_i.cpp b/TAO/tests/RTCORBA/Thread_Pool/test_i.cpp
deleted file mode 100644
index aab3f451e2b..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/test_i.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-#include "tao/ORB_Core.h"
-#include "tao/RTCORBA/Thread_Pool.h"
-
-ACE_RCSID(Thread_Pools, test_i, "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- long msec_sleep)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- poa_ (PortableServer::POA::_duplicate (poa)),
- nap_time_ ()
-{
- this->nap_time_.msec (msec_sleep);
-}
-
-CORBA::Long
-test_i::method (CORBA::Long client_id,
- CORBA::Long iteration
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the ORB_Core's TSS resources.
- TAO_ORB_Core_TSS_Resources *tss =
- this->orb_->orb_core ()->get_tss_resources ();
-
- /// Get the lane attribute in TSS.
- TAO_Thread_Lane *lane =
- static_cast <TAO_Thread_Lane *> (tss->lane_);
-
- if (lane)
- ACE_DEBUG ((LM_DEBUG,
- "Request in thread %t (pool id = %d; lane id = %d) for client %d iteration %d\n",
- lane->pool ().id (),
- lane->id (),
- client_id,
- iteration));
- else
- ACE_DEBUG ((LM_DEBUG,
- "Request in thread %t (default thread pool) for client %d iteration %d\n",
- client_id,
- iteration));
-
- ACE_OS::sleep (this->nap_time_);
-
- return iteration;
-}
-
-PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return PortableServer::POA::_duplicate (this->poa_.in ());
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
diff --git a/TAO/tests/RTCORBA/Thread_Pool/test_i.h b/TAO/tests/RTCORBA/Thread_Pool/test_i.h
deleted file mode 100644
index 14234e78d65..00000000000
--- a/TAO/tests/RTCORBA/Thread_Pool/test_i.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//=============================================================================
-/**
- * @file test_i.h
- *
- * $Id$
- *
- * @author Irfan Pyarali
- */
-// ===================================================================
-
-#include "testS.h"
-
-class test_i :
- public POA_test
-{
-public:
- /// Constructor.
- test_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- long msec_sleep);
-
- /// Test method.
- CORBA::Long method (CORBA::Long client_id,
- CORBA::Long iteration
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Shutdown the server.
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Our POA.
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// ORB.
- CORBA::ORB_var orb_;
-
- /// Our POA.
- PortableServer::POA_var poa_;
-
- /// Time spent in executing the upcall.
- ACE_Time_Value nap_time_;
-};
diff --git a/TAO/tests/RTCORBA/check_supported_priorities.cpp b/TAO/tests/RTCORBA/check_supported_priorities.cpp
deleted file mode 100644
index bfbff8af5ac..00000000000
--- a/TAO/tests/RTCORBA/check_supported_priorities.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-#include "ace/Sched_Params.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB.h"
-
-const char *
-sched_policy_name (int sched_policy)
-{
- const char *name = 0;
-
- switch (sched_policy)
- {
- case ACE_SCHED_OTHER:
- name = "SCHED_OTHER";
- break;
- case ACE_SCHED_RR:
- name = "SCHED_RR";
- break;
- case ACE_SCHED_FIFO:
- name = "SCHED_FIFO";
- break;
- }
-
- return name;
-}
-
-bool
-check_supported_priorities (CORBA::ORB_ptr orb)
-{
- int sched_policy =
- orb->orb_core ()->orb_params ()->ace_sched_policy ();
-
- // Check that we have sufficient priority range to run this test,
- // i.e., more than 1 priority level.
- int max_priority =
- ACE_Sched_Params::priority_max (sched_policy);
- int min_priority =
- ACE_Sched_Params::priority_min (sched_policy);
-
- if (max_priority == min_priority)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Not enough priority levels with the %s scheduling policy\n"
- "on this platform to run the test, terminating program....\n"
- "Check svc.conf options\n",
- sched_policy_name (sched_policy)));
-
- return false;
- }
-
- return true;
-}
diff --git a/TAO/tests/RTCORBA/common_args.cpp b/TAO/tests/RTCORBA/common_args.cpp
deleted file mode 100644
index 3085aa72bcb..00000000000
--- a/TAO/tests/RTCORBA/common_args.cpp
+++ /dev/null
@@ -1,388 +0,0 @@
-// $Id$
-
-#include "ace/Read_Buffer.h"
-#include "ace/Array_Base.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_math.h"
-#include "ace/OS_NS_stdlib.h"
-
-typedef ACE_Array_Base<CORBA::ULong> ULong_Array;
-
-int
-get_priority_bands (const char *test_type,
- const char *bands_file,
- RTCORBA::RTORB_ptr rt_orb,
- CORBA::PolicyList &policies,
- int debug
- ACE_ENV_ARG_DECL)
-{
- //
- // Read bands from a file.
- //
- FILE* file =
- ACE_OS::fopen (bands_file, "r");
-
- if (file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open file %s\n",
- bands_file),
- -1);
-
- ACE_Read_Buffer reader (file, 1);
-
- char *string =
- reader.read (EOF, ' ', '\0');
-
- // Check for empty bands file.
- if (string == 0)
- {
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\n%s: No bands set!\n\n",
- test_type));
- return 0;
- }
-
- CORBA::ULong bands_length =
- (reader.replaced () + 1) / 2;
-
- RTCORBA::PriorityBands bands;
- bands.length (bands_length);
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\n%s: There are %d bands: ",
- test_type,
- bands_length));
-
- int result = 1;
- char* working_string = string;
- for (CORBA::ULong i = 0; i < bands_length; ++i)
- {
- result = ::sscanf (working_string,
- "%hd",
- &bands[i].low);
- if (result == 0 || result == EOF)
- break;
-
- working_string += ACE_OS::strlen (working_string);
- working_string += 1;
-
- result = ::sscanf (working_string,
- "%hd",
- &bands[i].high);
- if (result == 0 || result == EOF)
- break;
-
- working_string += ACE_OS::strlen (working_string);
- working_string += 1;
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "[%d %d] ",
- bands[i].low,
- bands[i].high));
- }
-
- reader.alloc ()->free (string);
-
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Parsing error in file %s\n",
- bands_file),
- -1);
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\n\n"));
-
- CORBA::Policy_var banded_connection_policy =
- rt_orb->create_priority_banded_connection_policy (bands
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- banded_connection_policy;
-
- return 0;
-}
-
-int
-get_values (const char *test_type,
- const char *file_name,
- const char *name,
- ULong_Array &values,
- int debug)
-{
- //
- // Read lanes from a file.
- //
- FILE* file =
- ACE_OS::fopen (file_name, "r");
-
- if (file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open file %s\n",
- file_name),
- -1);
-
- ACE_Read_Buffer reader (file, 1);
-
- char *string =
- reader.read (EOF, ' ', '\0');
-
- // Check for empty lanes file.
- if (string == 0)
- {
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\n%s: No %s set!\n\n",
- test_type,
- name));
- return 0;
- }
-
- size_t length =
- reader.replaced () + 1;
-
- values.size (length);
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\n%s: There are %d %s: ",
- test_type,
- length,
- name));
-
- int result = 1;
- char* working_string = string;
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- // sscanf with "%ul" doesn't seem to work properly on HP-UX. So,
- // we will use strtoul instead.
- char* endptr = 0;
- values[i] = ACE_OS::strtoul (working_string, &endptr, 10);
-
- if (endptr != working_string && endptr != 0 && *endptr != '\0')
- {
- result = 0;
- break;
- }
-
- working_string += ACE_OS::strlen (working_string);
- working_string += 1;
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "[%u] ",
- values[i]));
- }
-
- reader.alloc ()->free (string);
-
- if (result == 0 || result == EOF)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Parsing error in file %s\n",
- file_name),
- -1);
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\n\n"));
-
- return 0;
-}
-
-int
-get_priority_lanes (const char *test_type,
- const char *lanes_file,
- RTCORBA::RTORB_ptr rt_orb,
- CORBA::ULong stacksize,
- CORBA::ULong static_threads,
- CORBA::ULong dynamic_threads,
- CORBA::Boolean allow_request_buffering,
- CORBA::ULong max_buffered_requests,
- CORBA::ULong max_request_buffer_size,
- CORBA::Boolean allow_borrowing,
- CORBA::PolicyList &policies,
- int debug
- ACE_ENV_ARG_DECL)
-{
- ULong_Array priorities;
- int result =
- get_values (test_type,
- lanes_file,
- "lanes",
- priorities,
- debug);
- if (result != 0 ||
- priorities.size () == 0)
- return result;
-
- RTCORBA::ThreadpoolLanes lanes;
- lanes.length (priorities.size ());
-
- for (CORBA::ULong i = 0;
- i < priorities.size ();
- ++i)
- {
- lanes[i].lane_priority = priorities[i];
- lanes[i].static_threads = static_threads;
- lanes[i].dynamic_threads = dynamic_threads;
- }
-
- RTCORBA::ThreadpoolId threadpool_id =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::Policy_var threadpool_policy =
- rt_orb->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- threadpool_policy;
-
- return 0;
-}
-
-int
-get_protocols (const char *test_type,
- const char *lanes_file,
- RTCORBA::RTORB_ptr rt_orb,
- CORBA::PolicyList &policies,
- int debug
- ACE_ENV_ARG_DECL)
-{
- ULong_Array protocol_values;
- int result =
- get_values (test_type,
- lanes_file,
- "protocols",
- protocol_values,
- debug);
- if (result != 0 ||
- protocol_values.size () == 0)
- return result;
-
- RTCORBA::ProtocolList protocols;
- protocols.length (protocol_values.size ());
-
- for (CORBA::ULong i = 0;
- i < protocol_values.size ();
- ++i)
- {
- protocols[i].protocol_type =
- protocol_values[i];
- protocols[i].transport_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
- protocols[i].orb_protocol_properties =
- RTCORBA::ProtocolProperties::_nil ();
- }
-
- CORBA::Policy_var protocol_policy =
- rt_orb->create_client_protocol_policy (protocols
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- protocol_policy;
-
- return 0;
-}
-
-void
-get_auto_priority_lanes_and_bands (CORBA::ULong number_of_lanes,
- RTCORBA::RTORB_ptr rt_orb,
- CORBA::ULong stacksize,
- CORBA::ULong static_threads,
- CORBA::ULong dynamic_threads,
- CORBA::Boolean allow_request_buffering,
- CORBA::ULong max_buffered_requests,
- CORBA::ULong max_request_buffer_size,
- CORBA::Boolean allow_borrowing,
- CORBA::PolicyList &policies,
- int debug
- ACE_ENV_ARG_DECL)
-{
- RTCORBA::ThreadpoolLanes lanes;
- lanes.length (number_of_lanes);
-
- RTCORBA::PriorityBands bands;
- bands.length (number_of_lanes);
-
- CORBA::Short priority_range =
- RTCORBA::maxPriority - RTCORBA::minPriority;
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\nUsing %d lanes\n",
- number_of_lanes));
-
- for (CORBA::ULong i = 0;
- i < number_of_lanes;
- ++i)
- {
- CORBA::Short high_priority =
- CORBA::Short (
- ACE_OS::floor ((priority_range /
- double (number_of_lanes)) *
- (i + 1)));
-
- CORBA::Short low_priority =
- CORBA::Short (
- ACE_OS::ceil ((priority_range /
- double (number_of_lanes)) *
- i));
-
- lanes[i].lane_priority = high_priority;
- lanes[i].static_threads = static_threads;
- lanes[i].dynamic_threads = dynamic_threads;
-
- bands[i].high = high_priority;
- bands[i].low = low_priority;
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "%d: [%d %d] ",
- i + 1,
- low_priority,
- high_priority));
- }
-
- if (debug)
- ACE_DEBUG ((LM_DEBUG,
- "\n\n"));
-
- RTCORBA::ThreadpoolId threadpool_id =
- rt_orb->create_threadpool_with_lanes (stacksize,
- lanes,
- allow_borrowing,
- allow_request_buffering,
- max_buffered_requests,
- max_request_buffer_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- rt_orb->create_priority_banded_connection_policy (bands
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- rt_orb->create_threadpool_policy (threadpool_id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/RTScheduling/Current/.cvsignore b/TAO/tests/RTScheduling/Current/.cvsignore
deleted file mode 100644
index d8a2b853f2c..00000000000
--- a/TAO/tests/RTScheduling/Current/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Current
diff --git a/TAO/tests/RTScheduling/Current/Current.mpc b/TAO/tests/RTScheduling/Current/Current.mpc
deleted file mode 100644
index 6e425b993a1..00000000000
--- a/TAO/tests/RTScheduling/Current/Current.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Current) : rtscheduling_client {
- Source_Files {
- ../Scheduler.cpp
- Thread_Task.cpp
- test.cpp
- }
-
- exename = Current
-}
diff --git a/TAO/tests/RTScheduling/Current/README b/TAO/tests/RTScheduling/Current/README
deleted file mode 100644
index 83f2fdd84be..00000000000
--- a/TAO/tests/RTScheduling/Current/README
+++ /dev/null
@@ -1,63 +0,0 @@
-//$Id$
-
-Case
-----
-
-This is a test of the various operations in the RTScheduling::Current
-Interface used to create and manage DTs. Four DTs are created. The
-following are the operations and cases tested:
-
-1. Out of context end_scheduling_segment () invocation.
-2. Out of context update_scheduling_segment () invocation.
-3. Creation of DT's consisting of nested scheduling segments using
- begin_scheduling_segment () and end_scheduling_segment () operations.
-4. Retreiving DT Guid with Current::id () method.
-5. Listing the names of the scheduling segments using
- current_scheduling_segment_names ().
-
-To Run
-------
-
-./test
-
-
-Typical Output
---------------
-
-Making an end_scheduling_segment call without first calling begin_scheduling_segment
-Missing scheduling context OR DT cancelled
-(10205|1024) EXCEPTION, End Scheduling Segment is out of context
-system exception, ID 'IDL:omg.org/CORBA/BAD_INV_ORDER:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-
-Making an update_scheduling_segment call without first calling begin_scheduling_segment
-(10205|1024) EXCEPTION, Update Scheduling Segment is out of context:
-system exception, ID 'IDL:omg.org/CORBA/BAD_INV_ORDER:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-
-Starting Distributable Thread 1 with 3 nested scheduling segments....
-Starting Distributable Thread 2 with 3 nested scheduling segments....
-Segment Names for DT 1 :
-The Return of the King
-Two Towers
-Fellowship of the Rings
-Segment Names for DT 2 :
-DT 1 terminated ...
-The Return of the King
-Two Towers
-Fellowship of the Rings
-DT 2 terminated ...
-Starting Distributable Thread 3 with 3 nested scheduling segments....
-Segment Names for DT 3 :
-The Return of the King
-Two Towers
-Fellowship of the Rings
-DT 3 terminated ...
-Starting Distributable Thread 4 with 3 nested scheduling segments....
-Segment Names for DT 4 :
-The Return of the King
-Two Towers
-Fellowship of the Rings
-DT 4 terminated ...
-
-
diff --git a/TAO/tests/RTScheduling/Current/Thread_Task.cpp b/TAO/tests/RTScheduling/Current/Thread_Task.cpp
deleted file mode 100644
index a12629ada7b..00000000000
--- a/TAO/tests/RTScheduling/Current/Thread_Task.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-// $Id$
-
-#include "Thread_Task.h"
-#include "ace/OS_NS_errno.h"
-#include "ace/OS_NS_unistd.h"
-
-Thread_Task::Thread_Task (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-int
-Thread_Task::activate_task (int thr_count)
-{
-
- ACE_TRY_NEW_ENV
- {
- ACE_NEW_RETURN (shutdown_lock_,
- TAO_SYNCH_MUTEX,
- -1);
-
- ACE_NEW_RETURN (lock_,
- TAO_SYNCH_MUTEX,
- -1);
-
- active_thread_count_ = thr_count;
-
- CORBA::Object_var current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->current_ = RTScheduling::Current::_narrow (current_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char * name = 0;
- CORBA::Policy_ptr sched_param = 0;
- CORBA::Policy_ptr implicit_sched_param = 0;
-
- ACE_TRY_EX (ESS_out_of_cxt)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Making an end_scheduling_segment call without first calling begin_scheduling_segment\n"));
- this->current_->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX(ESS_out_of_cxt);
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, thr_ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "End Scheduling Segment is out of context - Expected Exception\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "\n");
- }
- ACE_ENDTRY;
-
- ACE_TRY_EX(USS_out_of_cxt)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Making an update_scheduling_segment call without first calling begin_scheduling_segment\n"));
-
- this->current_->update_scheduling_segment (name,
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX(USS_out_of_cxt);
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, thr_ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Update Scheduling Segment is out of context - Expected Exception\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Update Scheduling Segment is out of context:");
- }
- ACE_ENDTRY;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception:");
- }
- ACE_ENDTRY;
-
- long flags = THR_NEW_LWP | THR_JOINABLE;
- if (this->activate (flags,
- thr_count) == -1)
- {
- if (ACE_OS::last_error () == EPERM)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Insufficient privilege to run this test.\n")),
- -1);
- }
- return 0;
-}
-
-int
-Thread_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- const char * name = 0;
- CORBA::Policy_ptr sched_param = 0;
- CORBA::Policy_ptr implicit_sched_param = 0;
-
- this->current_->begin_scheduling_segment ("Fellowship of the Rings",
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- size_t count = 0;
- ACE_OS::memcpy (&count,
- this->current_->id ()->get_buffer (),
- this->current_->id ()->length ());
-
- ACE_DEBUG ((LM_DEBUG,
- "Starting Distributable Thread %d with 3 nested scheduling segments....\n",
- count));
-
- //Start - Nested Scheduling Segment
- this->current_->begin_scheduling_segment ("Two Towers",
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- //Start - Nested Scheduling Segment
- this->current_->begin_scheduling_segment ("The Return of the King",
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- RTScheduling::Current::NameList_var segment_name_list =
- this->current_->current_scheduling_segment_names (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- {
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, *lock_, -1);
- ACE_DEBUG ((LM_DEBUG,
- "Segment Names for DT %d :\n",
- count));
-
- for (unsigned int i = 0; i < segment_name_list->length (); i ++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- (*segment_name_list)[i].in ()));
- }
- }
-
- this->current_->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- //End - Nested Scheduling Segment
-
- this->current_->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->current_->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- //End - Nested Scheduling Segment
-
- ACE_DEBUG ((LM_DEBUG,
- "DT %d terminated ...\n",
- count));
-
- {
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, *shutdown_lock_,-1);
- --active_thread_count_;
- if (active_thread_count_ == 0)
- {
- // Without this sleep, we will occasionally get BAD_INV_ORDER
- // exceptions on fast dual processor machines.
- ACE_OS::sleep (1);
-
- orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-Thread_Task::~Thread_Task (void)
-{
- delete shutdown_lock_;
- delete lock_;
-}
diff --git a/TAO/tests/RTScheduling/Current/Thread_Task.h b/TAO/tests/RTScheduling/Current/Thread_Task.h
deleted file mode 100644
index a6ae16092a1..00000000000
--- a/TAO/tests/RTScheduling/Current/Thread_Task.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//$Id$
-#ifndef THREAD_TASK_H
-#define THREAD_TASK_H
-
-#include "tao/RTScheduling/RTScheduler.h"
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-
-class Thread_Task : public ACE_Task <ACE_SYNCH>
-{
- public:
- Thread_Task (CORBA::ORB_ptr orb);
-
- int activate_task (int thr_count);
-
- ~Thread_Task (void);
-
- protected:
- /// task svc
- virtual int svc (void);
- private:
- CORBA::ORB_var orb_;
- RTScheduling::Current_var current_;
- int active_thread_count_;
- TAO_SYNCH_MUTEX* shutdown_lock_;
- TAO_SYNCH_MUTEX* lock_;
-};
-
-#endif /* THREAD_TASK_H */
diff --git a/TAO/tests/RTScheduling/Current/run_test.pl b/TAO/tests/RTScheduling/Current/run_test.pl
deleted file mode 100755
index 0b4a6b57f9d..00000000000
--- a/TAO/tests/RTScheduling/Current/run_test.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("Current");
-}
-else {
- $CL = new PerlACE::Process ("Current");
-}
-
-print STDERR "Starting Current Test\n";
-
-$test = $CL->SpawnWaitKill ($PerlACE::wait_interval_for_process_creation);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/RTScheduling/Current/test.cpp b/TAO/tests/RTScheduling/Current/test.cpp
deleted file mode 100644
index ffcf6dbf8a3..00000000000
--- a/TAO/tests/RTScheduling/Current/test.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-#include "Thread_Task.h"
-#include "../Scheduler.h"
-#include "tao/RTScheduling/RTScheduler_Manager.h"
-
-int
-main (int argc, char* argv [])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Scheduler scheduler (orb.in ());
-
- manager->rtscheduler (&scheduler);
-
- Thread_Task task (orb.in ());
-
- task.activate_task (4);
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Wait until all threads are ready.
- ACE_Thread_Manager::instance ()->wait ();
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/RTScheduling/DT_Spawn/.cvsignore b/TAO/tests/RTScheduling/DT_Spawn/.cvsignore
deleted file mode 100644
index 6d033fa4b68..00000000000
--- a/TAO/tests/RTScheduling/DT_Spawn/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-DT_Spawn
diff --git a/TAO/tests/RTScheduling/DT_Spawn/DT_Spawn.mpc b/TAO/tests/RTScheduling/DT_Spawn/DT_Spawn.mpc
deleted file mode 100644
index 9349bca041e..00000000000
--- a/TAO/tests/RTScheduling/DT_Spawn/DT_Spawn.mpc
+++ /dev/null
@@ -1,11 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(DT_Spawn) : rtscheduling_client {
- Source_Files {
- ../Scheduler.cpp
- test.cpp
- }
-
- exename = DT_Spawn
-}
diff --git a/TAO/tests/RTScheduling/DT_Spawn/README b/TAO/tests/RTScheduling/DT_Spawn/README
deleted file mode 100644
index dfb0a850b48..00000000000
--- a/TAO/tests/RTScheduling/DT_Spawn/README
+++ /dev/null
@@ -1,39 +0,0 @@
-//$Id$
-
-Case
-----
-
-This is a test for forking new DTs from existing DTs using
-Current::spawn (). A local DT is created with
-Current::begin_scheduling_segment() and
-Current::end_scheduling_segment (). A new DT is spawned within the
-context of the DT created. The Thread_Action::do () method is called
-when the spawned DT is activated. This method provides a point of
-entry for the spawned DT.
-
-This test also shows that the DT spawn should be made only within the
-context of another DT.
-
-
-To Run
--------
-
-./test
-
-Typical Output
---------------
-
-Invoking DT spawn without calling begin_scheduling_segment...
-
-(7141|1024) EXCEPTION, Spawn should be in the context of a Scheduling Segment
-system exception, ID 'IDL:omg.org/CORBA/BAD_INV_ORDER:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-
-Start - Scheduling Segment...
-The Current DT Guid is 1
-Spawning a new DT...
-End - Scheduling Segment 1
-Test_Thread_Action::do Harry Potter
-The spawned DT Guid is 2
-Segment Names for DT 2:
-Chamber of Secrets
diff --git a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h b/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
deleted file mode 100644
index 37da9a5de01..00000000000
--- a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//$Id$
-#ifndef Thread_Action_H
-#define Thread_Action_H
-
-#include "tao/RTScheduling/RTScheduler.h"
-#include "ace/Log_Msg.h"
-#include "ace/OS_NS_string.h"
-#include "ace/SString.h"
-
-class Data
-{
- public:
- ACE_CString data;
- RTScheduling::Current_var current;
-};
-
-class Test_Thread_Action:
-public RTScheduling::ThreadAction
-{
- public:
- Test_Thread_Action (void);
-
- virtual void _cxx_do (CORBA::VoidData data
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-#endif /*Thread_Action_H*/
-
-
-Test_Thread_Action::Test_Thread_Action (void)
-{
-}
-
-void
-Test_Thread_Action::_cxx_do (CORBA::VoidData data
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- Data* tmp = (Data*) data;
- ACE_DEBUG ((LM_DEBUG,
- "Test_Thread_Action::do %s\n",
- tmp->data.c_str ()));
-
- size_t count = 0;
- ACE_OS::memcpy (&count,
- tmp->current->id ()->get_buffer (),
- tmp->current->id ()->length ());
-
- ACE_DEBUG ((LM_DEBUG,
- "The spawned DT Guid is %d\n",
- count));
-
- RTScheduling::Current::NameList_var segment_name_list =
- tmp->current->current_scheduling_segment_names (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Segment Names for DT %d:\n",
- count));
-
- for (unsigned int i = 0; i < segment_name_list->length (); i ++)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- static_cast<char const*>((*segment_name_list) [i])));
- }
-}
diff --git a/TAO/tests/RTScheduling/DT_Spawn/run_test.pl b/TAO/tests/RTScheduling/DT_Spawn/run_test.pl
deleted file mode 100755
index bd859750add..00000000000
--- a/TAO/tests/RTScheduling/DT_Spawn/run_test.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("DT_Spawn");
-}
-else {
- $CL = new PerlACE::Process ("DT_Spawn");
-}
-
-print STDERR "Starting Current Test\n";
-
-$test = $CL->SpawnWaitKill ($PerlACE::wait_interval_for_process_creation);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/RTScheduling/DT_Spawn/test.cpp b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
deleted file mode 100644
index fab57bcd8ce..00000000000
--- a/TAO/tests/RTScheduling/DT_Spawn/test.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-//$Id$
-#include "../Scheduler.h"
-#include "tao/RTScheduling/RTScheduler_Manager.h"
-#include "tao/ORB.h"
-#include "Thread_Action.h"
-#include "ace/Thread_Manager.h"
-#include "ace/SString.h"
-
-int
-main (int argc, char* argv [])
-{
- CORBA::ORB_var orb;
- RTScheduling::Current_var current;
-
- const char * name = 0;
- CORBA::Policy_ptr sched_param = 0;
- CORBA::Policy_ptr implicit_sched_param = 0;
-
- Test_Thread_Action thread_action;
-
- ACE_TRY_NEW_ENV
- {
- orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Scheduler* scheduler;
- ACE_NEW_RETURN (scheduler,
- TAO_Scheduler (orb.in ()),
- -1);
- RTScheduling::Scheduler_var safe_scheduler = scheduler;
-
- manager->rtscheduler (scheduler);
-
- CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- current = RTScheduling::Current::_narrow (current_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_TRY_EX (block1)
- {
-
- ACE_DEBUG ((LM_DEBUG,
- "Invoking DT spawn without calling begin_scheduling_segment...\n"));
-
- ACE_CString data ("Harry Potter");
- current->spawn (&thread_action,
- const_cast<char *> (data.c_str ()),
- name,
- sched_param,
- implicit_sched_param,
- 0,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (block1);
- }
- ACE_CATCH (CORBA::BAD_INV_ORDER, thr_ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Spawn should be in the context of a Scheduling Segment - Expected Exception\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "\n");
- }
- ACE_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "Start - Scheduling Segment...\n"));
-
- current->begin_scheduling_segment ("Potter",
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- size_t count = 0;
- ACE_OS::memcpy (&count,
- current->id ()->get_buffer (),
- current->id ()->length ());
-
- ACE_DEBUG ((LM_DEBUG,
- "The Current DT Guid is %d\n",
- count));
-
- //Initialize data to be passed to the Thread_Action::do method
- Data spawn_data;
- spawn_data.data = "Harry Potter";
- spawn_data.current = RTScheduling::Current::_duplicate (current.in ());
-
- ACE_DEBUG ((LM_DEBUG,
- "Spawning a new DT...\n"));
- RTScheduling::DistributableThread_var dt =
- current->spawn (&thread_action,
- &spawn_data,
- "Chamber of Secrets",
- sched_param,
- implicit_sched_param,
- 0,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- current->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG,
- "End - Scheduling Segment %d\n",
- count));
-
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught Exception\n");
- }
- ACE_ENDTRY;
-
- ACE_Thread_Manager::instance ()->wait ();
-
- return 0;
-}
-
diff --git a/TAO/tests/RTScheduling/Scheduler.cpp b/TAO/tests/RTScheduling/Scheduler.cpp
deleted file mode 100644
index 885e7ba2fd7..00000000000
--- a/TAO/tests/RTScheduling/Scheduler.cpp
+++ /dev/null
@@ -1,243 +0,0 @@
-//$Id$
-
-#include "Scheduler.h"
-#include "tao/ORB.h"
-#include "ace/Atomic_Op.h"
-#include "tao/RTScheduling/Request_Interceptor.h"
-
-TAO_Scheduler::TAO_Scheduler (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
-{
- CORBA::Object_var current_obj =
- orb->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- current_ = RTScheduling::Current::_narrow (current_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-TAO_Scheduler::~TAO_Scheduler (void)
-{
-}
-
-CORBA::PolicyList*
-TAO_Scheduler::scheduling_policies (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 0;
-}
-
-void
-TAO_Scheduler::scheduling_policies (const CORBA::PolicyList &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-CORBA::PolicyList*
-TAO_Scheduler::poa_policies (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 0;
-}
-
-char *
-TAO_Scheduler::scheduling_discipline_name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 0;
-}
-
-RTScheduling::ResourceManager_ptr
-TAO_Scheduler::create_resource_manager (const char *,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 0;
-}
-
-void
-TAO_Scheduler::set_scheduling_parameter (PortableServer::Servant &,
- const char *,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-TAO_Scheduler::begin_new_scheduling_segment (const RTScheduling::Current::IdType &,
- const char *,
- CORBA::Policy_ptr,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
-{
-}
-
-void
-TAO_Scheduler::begin_nested_scheduling_segment (const RTScheduling::Current::IdType &,
- const char *,
- CORBA::Policy_ptr,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
-{
-}
-
-void
-TAO_Scheduler::update_scheduling_segment (const RTScheduling::Current::IdType &,
- const char *,
- CORBA::Policy_ptr,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
-{
-}
-
-void
-TAO_Scheduler::end_scheduling_segment (const RTScheduling::Current::IdType &,
- const char *
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-TAO_Scheduler::end_nested_scheduling_segment (const RTScheduling::Current::IdType &,
- const char *,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-
-void
-TAO_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- IOP::ServiceContext* srv_con = new IOP::ServiceContext;
- srv_con->context_id = Client_Interceptor::SchedulingInfo;
- srv_con->context_data.length (sizeof (size_t));
- ACE_OS::memcpy (srv_con->context_data.get_buffer (),
- current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->get_buffer (),
- sizeof (size_t));
- ACE_CHECK;
- request_info->add_request_service_context (*srv_con,
- 0);
-}
-
-void
-TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr request_info,
- RTScheduling::Current::IdType_out guid_out,
- CORBA::String_out /*name*/,
- CORBA::Policy_out /*sched_param*/,
- CORBA::Policy_out /*implicit_sched_param*/
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
- IOP::ServiceContext_var serv_cxt;
-
- ACE_TRY
- {
- serv_cxt = request_info->get_request_service_context (Server_Interceptor::SchedulingInfo
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- size_t gu_id;
- ACE_OS::memcpy (&gu_id,
- serv_cxt->context_data.get_buffer (),
- serv_cxt->context_data.length ());
-
- ACE_DEBUG ((LM_DEBUG,
- "The Guid is %d\n",
- gu_id));
-
- RTScheduling::Current::IdType* guid;
- ACE_NEW (guid,
- RTScheduling::Current::IdType);
-
- guid->length (sizeof (size_t));
- ACE_OS::memcpy (guid->get_buffer (),
- serv_cxt->context_data.get_buffer (),
- sizeof (size_t));
-
- guid_out.ptr () = guid;
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG,
- "Invalid Service Context\n"));
- }
- ACE_ENDTRY;
-}
-
-void
-TAO_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-TAO_Scheduler::send_exception (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-TAO_Scheduler::send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-TAO_Scheduler::send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-TAO_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-TAO_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-TAO_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest))
-{
-}
-
-void
-TAO_Scheduler::cancel (const RTScheduling::Current::IdType &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/tests/RTScheduling/Scheduler.h b/TAO/tests/RTScheduling/Scheduler.h
deleted file mode 100644
index c54895ac089..00000000000
--- a/TAO/tests/RTScheduling/Scheduler.h
+++ /dev/null
@@ -1,131 +0,0 @@
-//$Id$
-#ifndef SCHEDULER_H
-#define SCHEDULER_H
-
-#include "tao/RTScheduling/RTScheduler.h"
-#include "tao/LocalObject.h"
-
-class TAO_Scheduler:
-public RTScheduling::Scheduler,
- public TAO_Local_RefCounted_Object
-{
- public:
-
- TAO_Scheduler (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- ~TAO_Scheduler (void);
-
- virtual CORBA::PolicyList * scheduling_policies (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void scheduling_policies (const CORBA::PolicyList & scheduling_policies
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::PolicyList * poa_policies (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual char * scheduling_discipline_name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual RTScheduling::ResourceManager_ptr create_resource_manager (const char * name,
- CORBA::Policy_ptr scheduling_parameter
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void set_scheduling_parameter (PortableServer::Servant & resource,
- const char * name,
- CORBA::Policy_ptr scheduling_parameter
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void begin_new_scheduling_segment (const RTScheduling::Current::IdType & guid,
- const char * name,
- CORBA::Policy_ptr sched_param,
- CORBA::Policy_ptr implicit_sched_param
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE));
-
- virtual void begin_nested_scheduling_segment (const RTScheduling::Current::IdType & guid,
- const char * name,
- CORBA::Policy_ptr sched_param,
- CORBA::Policy_ptr implicit_sched_param
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE));
-
- virtual void update_scheduling_segment (const RTScheduling::Current::IdType & guid,
- const char * name,
- CORBA::Policy_ptr sched_param,
- CORBA::Policy_ptr implicit_sched_param
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE));
-
- virtual void end_scheduling_segment (const RTScheduling::Current::IdType & guid,
- const char * name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void end_nested_scheduling_segment (const RTScheduling::Current::IdType & guid,
- const char * name,
- CORBA::Policy_ptr outer_sched_param
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri,
- RTScheduling::Current::IdType_out guid,
- CORBA::String_out name,
- CORBA::Policy_out sched_param,
- CORBA::Policy_out implicit_sched_param
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::ForwardRequest));
-
- virtual void cancel (const RTScheduling::Current::IdType & guid
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- private:
- RTScheduling::Current_var current_;
-};
-
-#endif //SCHEDULER_H
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/.cvsignore b/TAO/tests/RTScheduling/Scheduling_Interceptor/.cvsignore
deleted file mode 100644
index 641465098f5..00000000000
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Scheduler_Interceptor_Client
-Scheduler_Interceptor_Server
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/README b/TAO/tests/RTScheduling/Scheduling_Interceptor/README
deleted file mode 100644
index 4f3d8e50831..00000000000
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/README
+++ /dev/null
@@ -1,86 +0,0 @@
-//$Id$
-
-Case
-----
-
-This test creates a distributed DT ie. a DT that spans multiple
-hosts/processes. In this test they span two hosts/processes. The DT on
-one host/process makes a remote invocation on another host/process and
-hence executes in the context of the second host/process before
-returning to the first host/process. The DT makes a one-way and a
-two-way invocations. In a one-way invocation a new DT is created to
-continue servicing the request. In the case of a two-way invocation
-the same DT executes on the second host/process.
-
-The DT information is propagated across hosts/processes via the
-service contexts. The service context is populated with the DT info
-using the Client Interceptor when sending a request. The DT info is
-retreived from the service context on the server using the Server
-Interceptor when receiving the request.
-
-This test also illustrates the propagation of the
-CORBA::THREAD_CANCELLED exception to the point of origin of the DT
-when it is cancelled on a remote host/process it is currently
-executing in.
-
-To Run
-------
-
-Start the following processes in that order.
-
-./test_server -f <ior_filename>
-
--f <ior_filename> --> Name of the file in which the server IOR will be written
-
-
-./test_client -f <ior_filename>
-
--f <ior_filename> --> Name of the file in which the server IOR was written
-
-Typical Output
---------------
-
-Server
-.......
-
-Server_Interceptor::receive_request_service_contexts
-Server_Interceptor::receive_request
-Request from Distributable Thread
-The Guid is 2
-One-Way Message = file:///project/ace/yamuna/ior_file
-Server_Interceptor::send_reply
-Server_Interceptor::receive_request_service_contexts
-Server_Interceptor::receive_request
-Request from Distributable Thread
-The Guid is 1
-Two-Way Message = file:///project/ace/yamuna/ior_file
-Server_Interceptor::send_reply
-Distributable Thread - 1 is cancelled
-Server_Interceptor::receive_request_service_contexts
-Server_Interceptor::receive_request
-Invalid Service Request
-Server_Interceptor::send_reply
-
-Client
-.......
-
-Making a one-way request
-Client_Interceptor::send_request
-The Guid is 2
-Client_Interceptor::receive_other
-Making a two-way request
-Client_Interceptor::send_request
-Client_Interceptor::receive_exception
-Received Exception IDL:omg.org/CORBA/THREAD_CANCELLED:1.0
-Distributable Thread - 1 is cancelled
-(8752|1024) EXCEPTION, Caught exception:
-system exception, ID 'IDL:omg.org/CORBA/THREAD_CANCELLED:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-Client_Interceptor::send_request
-Client_Interceptor::receive_other
-
-
-
-
-
-
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc b/TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc
deleted file mode 100644
index a9fce2cd532..00000000000
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/Scheduler_Interceptor.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-project(*Server): rtscheduling_server {
- Source_Files {
- ../Scheduler.cpp
- test_server.cpp
- }
-
- exename = Scheduler_Interceptor_Server
-}
-
-project(*Client) : rtscheduling_client {
- after += *Server
- Source_Files {
- ../Scheduler.cpp
- testC.cpp
- test_client.cpp
- }
-
- exename = Scheduler_Interceptor_Client
-}
-
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl b/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl
deleted file mode 100755
index 2e3bec9cb61..00000000000
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl
+++ /dev/null
@@ -1,53 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-# amount of delay between running the servers
-
-$sleeptime = 2;
-$status = 0;
-$iorfile = PerlACE::LocalFile("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("Scheduler_Interceptor_Server", "-f test.ior");
-}
-else {
- $SV = new PerlACE::Process ("Scheduler_Interceptor_Server", "-f test.ior");
-}
-$CL = new PerlACE::Process ("Scheduler_Interceptor_Client", "-f $iorfile");
-
-print STDERR "Starting Server\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-print STDERR "Starting Client\n";
-
-$sender = $CL->SpawnWaitKill (200);
-
-if ($sender != 0) {
- print STDERR "ERROR: sender returned $sender\n";
- $status = 1;
-}
-
-$receiver = $SV->TerminateWaitKill (5);
-
-if ($receiver != 0) {
- print STDERR "ERROR: receiver returned $receiver\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test.idl b/TAO/tests/RTScheduling/Scheduling_Interceptor/test.idl
deleted file mode 100644
index c0c3d7e9da1..00000000000
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-//$Id$
-interface test
-{
- oneway void one_way (in string message);
-
- string two_way (in string message);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
deleted file mode 100644
index 14c947939fb..00000000000
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//$Id$
-#include "../Scheduler.h"
-#include "tao/RTScheduling/RTScheduler_Manager.h"
-#include "testC.h"
-#include "ace/Get_Opt.h"
-#include "ace/SString.h"
-
-ACE_CString ior = "file://test.ior";
-
-int
-parse_args (int argc,
- ACE_TCHAR* argv [])
-{
- // Parse command line arguments
- ACE_Get_Opt opts (argc, argv, "f:");
-
- int c;
- while ((c= opts ()) != -1)
- {
- switch (c)
- {
- case 'f':
- ior = "file://";
- ior += opts.opt_arg ();
- break;
- default:
- ACE_DEBUG ((LM_DEBUG, "Unknown Option\n"));
- return -1;
- }
- }
- return 0;
-}
-
-#if defined (THREAD_CANCELLED)
-#undef THREAD_CANCELLED
-#endif /* THREAD_CANCELLED */
-
-int
-main (int argc, char* argv [])
-{
- CORBA::ORB_var orb;
- test_var server;
- RTScheduling::Scheduler_var safe_scheduler;
-
- ACE_TRY_NEW_ENV
- {
-
- orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) == -1)
- return (-1);
-
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Scheduler* scheduler;
- ACE_NEW_RETURN (scheduler,
- TAO_Scheduler (orb.in ()),
- -1);
- safe_scheduler = scheduler;
-
- manager->rtscheduler (scheduler);
-
-
- CORBA::Object_var object =
- orb->string_to_object (ior.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server = test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Making a one-way request\n"));
- server->one_way (ior.c_str ());
-
- ACE_DEBUG ((LM_DEBUG,
- "Making a two-way request\n"));
- server->two_way (ior.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- current->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCH (CORBA::THREAD_CANCELLED, thr_ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Distributable Thread Cancelled - Expected Exception\n"));
- server->shutdown ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
-
- return 0;
- }
- ACE_ENDTRY;
-
- orb->destroy ();
-
- return 0;
-}
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
deleted file mode 100644
index 73e333552ca..00000000000
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-//$Id$
-
-#include "../Scheduler.h"
-#include "tao/RTScheduling/RTScheduler_Manager.h"
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-const char* filename = "test.ior";
-
-class test_impl : public POA_test
-{
-public:
-
- test_impl (CORBA::ORB_ptr orb,
- RTScheduling::Current_ptr current)
- : orb_ (orb),
- current_ (RTScheduling::Current::_duplicate (current))
- {
- }
-
- virtual void one_way (const char * message
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "One-Way Message = %s\n",
- message));
- }
-
- virtual char * two_way (const char * message
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_DEBUG ((LM_DEBUG,
- "Two-Way Message = %s\n",
- message));
-
- RTScheduling::DistributableThread_var DT =
- this->current_->lookup (*(this->current_->id ())
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- DT->cancel (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return CORBA::string_dup (message);
- }
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- orb_->shutdown ();
- }
-
-private:
- CORBA::ORB_ptr orb_;
- RTScheduling::Current_var current_;
-};
-
-int
-parse_args (int argc,
- ACE_TCHAR* argv [])
-{
- // Parse command line arguments
- ACE_Get_Opt opts (argc, argv, "f:");
-
- int c;
- while ((c= opts ()) != -1)
- {
- switch (c)
- {
- case 'f':
- filename = opts.opt_arg ();
- break;
- default:
- ACE_DEBUG ((LM_DEBUG, "Unknown Option\n"));
- return -1;
- }
- }
- return 0;
-}
-
-int
-main (int argc, char* argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- parse_args (argc, argv);
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_impl* test_i;
- ACE_NEW_RETURN (test_i,
- test_impl (orb.in (),
- current.in ()),
- -1);
-
- PortableServer::ObjectId_var id;
-
- id = root_poa->activate_object (test_i
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server =
- root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior;
- if (!CORBA::is_nil (server.in ()))
- {
- ior = orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Failed to activate test object\n"),
- -1);
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "IOR = %s\n",
- ior.in ()));
-
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_Scheduler scheduler (orb.in ());
- manager->rtscheduler (&scheduler);
-
- // Print ior to the file.
- if (filename != 0)
- {
- FILE* output_file = ACE_OS::fopen (filename, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- orb->run ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/.cvsignore b/TAO/tests/RTScheduling/Thread_Cancel/.cvsignore
deleted file mode 100644
index 08071dd183b..00000000000
--- a/TAO/tests/RTScheduling/Thread_Cancel/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Thread_Cancel
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/README b/TAO/tests/RTScheduling/Thread_Cancel/README
deleted file mode 100644
index c0f693bff7a..00000000000
--- a/TAO/tests/RTScheduling/Thread_Cancel/README
+++ /dev/null
@@ -1,59 +0,0 @@
-//$Id$
-
-Case
-----
-
-This test illustrates the DT cancel mechanism when the DT's are local
-(ie. DT's do not span multiple nodes). Four DT's are created. Each DT
-has 3 nested scheduling segments. A reference to each DT is
-stored. These references are then used to cancel teh corresponding
-DT. When the DT is cancelled it throws the CORBA::THREAD_CANCELLED
-exception.
-
-To Run
-------
-
-./test
-
-Typical Output
---------------
-
-Scheduling Segments for DT 1 :
-Scheduling Segment Name - Harry
-Scheduling Segment Name - Potter
-Scheduling Segment Name - Chamber of Secrets
-Scheduling Segments for DT 2 :
-Waiting for Threads to Activate...
-Scheduling Segment Name - Harry
-Scheduling Segment Name - Potter
-Scheduling Segment Name - Chamber of Secrets
-Scheduling Segments for DT 3 :
-Scheduling Segment Name - Harry
-Scheduling Segment Name - Potter
-Scheduling Segment Name - Chamber of Secrets
-Scheduling Segments for DT 4 :
-Scheduling Segment Name - Harry
-Scheduling Segment Name - Potter
-Scheduling Segment Name - Chamber of Secrets
-Threads Activated
-Cancelling Threads.....
-Distributable Thread - 2 is cancelled
-Distributable Thread - 1 is cancelled
-Distributable Thread - 3 is cancelled
-Distributable Thread - 4 is cancelled
-(7245|1026) EXCEPTION, Caught exception:
-system exception, ID 'IDL:omg.org/CORBA/THREAD_CANCELLED:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-
-(7245|3076) EXCEPTION, Caught exception:
-system exception, ID 'IDL:omg.org/CORBA/THREAD_CANCELLED:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-
-(7245|4101) EXCEPTION, Caught exception:
-system exception, ID 'IDL:omg.org/CORBA/THREAD_CANCELLED:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-
-(7245|2051) EXCEPTION, Caught exception:
-system exception, ID 'IDL:omg.org/CORBA/THREAD_CANCELLED:1.0'
-TAO exception, minor code = 0 (unknown location; unspecified errno), completed = NO
-
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Cancel.mpc b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Cancel.mpc
deleted file mode 100644
index a87b61b1875..00000000000
--- a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Cancel.mpc
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Thread_Cancel) : rtscheduling_client {
- Source_Files {
- ../Scheduler.cpp
- Thread_Task.cpp
- test.cpp
- }
-
- exename = Thread_Cancel
-}
-
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
deleted file mode 100644
index 9ad3f1430d0..00000000000
--- a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-// $Id$
-
-#include "Thread_Task.h"
-#include "ace/Atomic_Op.h"
-#include "ace/Lock_Adapter_T.h"
-#include "ace/OS_NS_errno.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> guid_index;
-
-RTScheduling::Current::IdType*
-Thread_Task::guids (void)
-{
- return this->guid_;
-}
-
-int
-Thread_Task::activate_task (CORBA::ORB_ptr orb)
-{
- ACE_TRY_NEW_ENV
- {
- ACE_NEW_RETURN (shutdown_lock_,
- ACE_Lock_Adapter <TAO_SYNCH_MUTEX>,
- -1);
-
- ACE_NEW_RETURN (lock_,
- ACE_Lock_Adapter <TAO_SYNCH_MUTEX>,
- -1);
-
- this->orb_ = CORBA::ORB::_duplicate (orb);
-
- CORBA::Object_var current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->current_ = RTScheduling::Current::_narrow (current_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception:");
- }
- ACE_ENDTRY;
-
- long flags = THR_NEW_LWP | THR_JOINABLE;
- if (this->ACE_Task <ACE_SYNCH>::activate (flags,
- 4) == -1)
- {
- if (ACE_OS::last_error () == EPERM)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Insufficient privilege to run this test.\n")),
- -1);
- }
- active_thread_count_ = 4;
-
- return 0;
-}
-
-#if defined (THREAD_CANCELLED)
-#undef THREAD_CANCELLED
-#endif /* THREAD_CANCELLED */
-
-int
-Thread_Task::svc (void)
-{
- ACE_TRY_NEW_ENV
- {
- const char * name = 0;
- CORBA::Policy_ptr sched_param = 0;
- CORBA::Policy_ptr implicit_sched_param = 0;
-
- //Start - Nested Scheduling Segment
- this->current_->begin_scheduling_segment ("Chamber of Secrets",
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- size_t count = 0;
- ACE_OS::memcpy (&count,
- current_->id ()->get_buffer (),
- current_->id ()->length ());
-
-
- this->current_->begin_scheduling_segment ("Potter",
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->guid_[guid_index++] = *(this->current_->id ());
-
- //Start - Nested Scheduling Segment
- this->current_->begin_scheduling_segment ("Harry",
- sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- {
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *shutdown_lock_,-1);
- RTScheduling::Current::NameList_var name_list = this->current_->current_scheduling_segment_names (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "Scheduling Segments for DT %d :\n",
- count));
-
- for (unsigned int i = 0; i < name_list->length ();++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Scheduling Segment Name - %s\n",
- (*name_list) [i].in ()));
- }
- }
-
- ACE_OS::sleep (50);
-
- this->current_->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- // End - Nested Scheduling Segment
-
-
-
- this->current_->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- // End - Nested Scheduling Segment
-
- this->current_->end_scheduling_segment (name
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- }
- ACE_CATCH (CORBA::THREAD_CANCELLED, thr_ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Distributable Thread Cancelled - Expected Exception\n"));
- {
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *shutdown_lock_,-1);
- --active_thread_count_;
- if (active_thread_count_ == 0)
- orb_->shutdown ();
- }
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.h b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.h
deleted file mode 100644
index 3f9d2b1bba7..00000000000
--- a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//$Id$
-#ifndef THREAD_TASK_H
-#define THREAD_TASK_H
-
-#include "tao/RTScheduling/RTScheduler.h"
-#include "ace/Task.h"
-#include "tao/ORB.h"
-
-
-class Thread_Task : public ACE_Task <ACE_SYNCH>
-{
- public:
- int activate_task (CORBA::ORB_ptr orb);
-
- RTScheduling::Current::IdType* guids (void);
-
- protected:
- /// task svc
- virtual int svc (void);
- private:
- CORBA::ORB_var orb_;
- RTScheduling::Current_var current_;
- RTScheduling::Current::IdType guid_ [4];
- ACE_Lock* shutdown_lock_;
- ACE_Lock* lock_;
- int active_thread_count_;
-};
-
-#endif /* THREAD_TASK_H */
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/run_test.pl b/TAO/tests/RTScheduling/Thread_Cancel/run_test.pl
deleted file mode 100755
index 7cef3fc4eef..00000000000
--- a/TAO/tests/RTScheduling/Thread_Cancel/run_test.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("Thread_Cancel");
-}
-else {
- $CL = new PerlACE::Process ("Thread_Cancel");
-}
-
-print STDERR "Starting Current Test\n";
-
-$test = $CL->SpawnWaitKill (200);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
deleted file mode 100644
index 42a390c4b01..00000000000
--- a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-#include "Thread_Task.h"
-#include "ace/OS_NS_unistd.h"
-#include "../Scheduler.h"
-#include "tao/RTScheduling/RTScheduler_Manager.h"
-#include "tao/ORB_Core.h"
-
-int
-main (int argc, char* argv [])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO_Scheduler scheduler (orb.in ());
-
- manager->rtscheduler (&scheduler);
-
- Thread_Task task;
-
- task.activate_task (orb.in ());
-
- ACE_DEBUG ((LM_DEBUG,
- "Waiting for Threads to Activate...\n"));
- ACE_OS::sleep (10);
- ACE_DEBUG ((LM_DEBUG,
- "Threads Activated\n"));
-
-
- ACE_DEBUG ((LM_DEBUG,
- "Cancelling Threads.....\n"));
-
- CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i < 4; i++)
- {
- RTScheduling::DistributableThread_var DT = current->lookup ((task.guids ())[i]
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DT->cancel (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->run ();
-
- ACE_Thread_Manager::instance ()->wait ();
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
diff --git a/TAO/tests/RTScheduling/VoidData/.cvsignore b/TAO/tests/RTScheduling/VoidData/.cvsignore
deleted file mode 100644
index 64bcca2ae7e..00000000000
--- a/TAO/tests/RTScheduling/VoidData/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-VoidData
diff --git a/TAO/tests/RTScheduling/VoidData/README b/TAO/tests/RTScheduling/VoidData/README
deleted file mode 100644
index 27e919b034c..00000000000
--- a/TAO/tests/RTScheduling/VoidData/README
+++ /dev/null
@@ -1,17 +0,0 @@
-//$Id$
-
-Case
-----
-
-A simple test to test the passing of CORBA::VoidData to a method.
-
-To Run
-------
-
-./test
-
-Typical Output
---------------
-
-Void Data Passed to method 28
-
diff --git a/TAO/tests/RTScheduling/VoidData/VoidData.mpc b/TAO/tests/RTScheduling/VoidData/VoidData.mpc
deleted file mode 100644
index 8e02b6b7770..00000000000
--- a/TAO/tests/RTScheduling/VoidData/VoidData.mpc
+++ /dev/null
@@ -1,11 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(VoidData) : rtscheduling_client {
- exename = VoidData
- Source_Files {
- test_client.cpp
- testC.cpp
- }
-}
-
diff --git a/TAO/tests/RTScheduling/VoidData/run_test.pl b/TAO/tests/RTScheduling/VoidData/run_test.pl
deleted file mode 100755
index ad6f3662a0e..00000000000
--- a/TAO/tests/RTScheduling/VoidData/run_test.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("VoidData");
-}
-else {
- $CL = new PerlACE::Process ("VoidData");
-}
-
-print STDERR "Starting Current Test\n";
-
-$test = $CL->SpawnWaitKill (10);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/RTScheduling/VoidData/test.h b/TAO/tests/RTScheduling/VoidData/test.h
deleted file mode 100644
index ae4181971a9..00000000000
--- a/TAO/tests/RTScheduling/VoidData/test.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//$Id$
-
-#include "ace/Log_Msg.h"
-
-class test_impl :public test
-{
- public:
- virtual void bar (CORBA::VoidData something ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-
- {
- ACE_DEBUG ((LM_DEBUG,
- "Void Data Passed to method %d\n",
- *(int*)something));
- }
-};
-
diff --git a/TAO/tests/RTScheduling/VoidData/test.idl b/TAO/tests/RTScheduling/VoidData/test.idl
deleted file mode 100644
index a806fa8a09a..00000000000
--- a/TAO/tests/RTScheduling/VoidData/test.idl
+++ /dev/null
@@ -1,6 +0,0 @@
-//$Id$
-#include "tao/RTScheduling/RTScheduler_include.pidl"
-local interface test
-{
- void bar (in CORBA::VoidData data );
-};
diff --git a/TAO/tests/RTScheduling/VoidData/test_client.cpp b/TAO/tests/RTScheduling/VoidData/test_client.cpp
deleted file mode 100644
index 087080ddbba..00000000000
--- a/TAO/tests/RTScheduling/VoidData/test_client.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-//$Id$
-#include "tao/RTScheduling/RTScheduler.h"
-#include "testC.h"
-#include "test.h"
-
-int
-main (int argc, char* argv [])
-{
- CORBA::ORB_var orb;
- ACE_TRY_NEW_ENV
- {
- orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test_impl foo_i;
- int something = 28;
- foo_i.bar ((CORBA::VoidData) &something);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
-
- orb->shutdown ();
- orb->destroy ();
- return 0;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Reliable_Oneways/.cvsignore b/TAO/tests/Reliable_Oneways/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Reliable_Oneways/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Reliable_Oneways/Oneway_Receiver.cpp b/TAO/tests/Reliable_Oneways/Oneway_Receiver.cpp
deleted file mode 100644
index 106c14a0ec0..00000000000
--- a/TAO/tests/Reliable_Oneways/Oneway_Receiver.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// $Id$
-//
-#include "Oneway_Receiver.h"
-#include "Shutdown_Helper.h"
-
-ACE_RCSID(Reliable_Oneways, Oneway_Receiver, "$Id$")
-
-Oneway_Receiver::Oneway_Receiver (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Oneway_Receiver::raise_no_permission (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_THROW (CORBA::NO_PERMISSION ());
-}
-
-void
-Oneway_Receiver::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableServer::POA_var poa = this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-Test::Shutdown_Helper_ptr
-Oneway_Receiver::get_shutdown_helper (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Shutdown_Helper *shutdown_helper;
- ACE_NEW_THROW_EX (shutdown_helper,
- Shutdown_Helper (this->orb_.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (Test::Shutdown_Helper::_nil ());
-
- PortableServer::ServantBase_var transfer_ownership(shutdown_helper);
-
- return shutdown_helper->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Reliable_Oneways/Oneway_Receiver.h b/TAO/tests/Reliable_Oneways/Oneway_Receiver.h
deleted file mode 100644
index fdf0a36b9c5..00000000000
--- a/TAO/tests/Reliable_Oneways/Oneway_Receiver.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAY_RECEIVER_H
-#define ONEWAY_RECEIVER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Oneway_Receiver interface
-class Oneway_Receiver
- : public virtual POA_Test::Oneway_Receiver
-{
-public:
- /// Constructor
- Oneway_Receiver (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void raise_no_permission (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual Test::Shutdown_Helper_ptr get_shutdown_helper (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAY_RECEIVER_H */
diff --git a/TAO/tests/Reliable_Oneways/README b/TAO/tests/Reliable_Oneways/README
deleted file mode 100644
index 97330c1ecbf..00000000000
--- a/TAO/tests/Reliable_Oneways/README
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
-
-@page Reliable_Oneways Test README File
-
- A regression test for reliable oneways. The test verifies
-that each SyncScope policy can detect the problems that it should
-detect, but only those.
-
-- SYNC_WITH_TARGET: the server raises exceptions on a oneway request,
- those should be detectable with this policy, as well as
- OBJECT_NOT_EXIST when the server object is destroyed and TRANSIENT
- exceptions when the server process is terminated.
-
-- SYNC_WITH_SERVER: the exceptions raised by the servant should not
- be detectable, while OBJECT_NOT_EXIST and TRANSIENT exceptions
- should be.
-
-- SYNC_WITH_TRANSPORT: only TRANSIENT exceptions are detectable, no
- COMM_FAILURE, OBJECT_NOT_EXIST or the exception raised by the
- servant could be visible.
-
-- SYNC_NONE: only TRANSIENT exceptions are detectable. It is expected
- that some requests may go through without any exceptions, even after
- the servant is terminated.
-
- To run the test use the run_test.pl script:
-
-$ ./run_sync_none.pl
-$ ./run_sync_with_transport.pl
-$ ./run_sync_with_server.pl
-$ ./run_sync_with_target.pl
-
- each script returns 0 if the test was successful. In addition
-you can use:
-
-$ ./run_test.pl
-
- to run all the tests in a single shot. Notice that this last
-script takes too long for nightly builds.
-
-*/
diff --git a/TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc b/TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc
deleted file mode 100644
index 2141f3040f5..00000000000
--- a/TAO/tests/Reliable_Oneways/Reliable_Oneways.mpc
+++ /dev/null
@@ -1,19 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, messaging {
- Source_Files {
- Oneway_Receiver.cpp
- Shutdown_Helper.cpp
- server.cpp
- }
-}
-
-project(*Client): messaging, taoexe, portableserver {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Reliable_Oneways/Shutdown_Helper.cpp b/TAO/tests/Reliable_Oneways/Shutdown_Helper.cpp
deleted file mode 100644
index 38ffc90ed4b..00000000000
--- a/TAO/tests/Reliable_Oneways/Shutdown_Helper.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// $Id$
-//
-#include "Shutdown_Helper.h"
-
-ACE_RCSID(Reliable_Oneways, Shutdown_Helper, "$Id$")
-
-Shutdown_Helper::Shutdown_Helper (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Shutdown_Helper::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Reliable_Oneways/Shutdown_Helper.h b/TAO/tests/Reliable_Oneways/Shutdown_Helper.h
deleted file mode 100644
index e4b764f3497..00000000000
--- a/TAO/tests/Reliable_Oneways/Shutdown_Helper.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef SHUTDOWN_HELPER_H
-#define SHUTDOWN_HELPER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Shutdown_Helper interface
-class Shutdown_Helper
- : public virtual POA_Test::Shutdown_Helper
-{
-public:
- /// Constructor
- Shutdown_Helper (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* SHUTDOWN_HELPER_H */
diff --git a/TAO/tests/Reliable_Oneways/Test.idl b/TAO/tests/Reliable_Oneways/Test.idl
deleted file mode 100644
index a083bd6412c..00000000000
--- a/TAO/tests/Reliable_Oneways/Test.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- interface Shutdown_Helper;
-
- /// An interface to send oneway messages
- interface Oneway_Receiver
- {
- /// The server raises a system exception, only the
- /// SYNC_WITH_TARGET can detect that.
- oneway void raise_no_permission ();
-
- /// Destroy the object
- oneway void destroy ();
-
- /// Return a helper interface
- Shutdown_Helper get_shutdown_helper ();
- };
-
- /// A simple interface to shutdown the server
- interface Shutdown_Helper
- {
- /// Shutdown the server
- void shutdown ();
- };
-};
diff --git a/TAO/tests/Reliable_Oneways/client.cpp b/TAO/tests/Reliable_Oneways/client.cpp
deleted file mode 100644
index 259e1be4ea6..00000000000
--- a/TAO/tests/Reliable_Oneways/client.cpp
+++ /dev/null
@@ -1,453 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_sys_time.h"
-
-ACE_RCSID(Reliable_Oneways, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int test_sync_with_target = 0;
-int test_sync_with_server = 0;
-int test_sync_with_transport = 0;
-int test_sync_none = 0;
-int iterations = 500;
-
-const int ALIVE = 0;
-const int DESTROYED = 1;
-const int SHUTDOWN = 2;
-int server_status = ALIVE;
-
-int successful_calls = 0;
-int failed_calls = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:ntsr");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'n':
- test_sync_none = 1;
- break;
-
- case 't':
- test_sync_with_transport = 1;
- break;
-
- case 's':
- test_sync_with_server = 1;
- break;
-
- case 'r':
- test_sync_with_target = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-n -t -s -r "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates successful parsing of the command line
- return 0;
-}
-
-void run_test_sync_with_target (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL);
-void run_test_sync_with_server (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL);
-void run_test_sync_with_transport (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL);
-void run_test_sync_none (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL);
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Receiver_var oneway_receiver =
- Test::Oneway_Receiver::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (oneway_receiver.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil oneway receiver reference <%s>\n",
- ior),
- 1);
- }
-
- if (test_sync_with_target)
- {
- ACE_DEBUG ((LM_DEBUG, "Running SYNC_WITH_TARGET\n"));
- run_test_sync_with_target (oneway_receiver.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (test_sync_with_server)
- {
- ACE_DEBUG ((LM_DEBUG, "Running SYNC_WITH_SERVER\n"));
- run_test_sync_with_server (oneway_receiver.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (test_sync_with_transport)
- {
- ACE_DEBUG ((LM_DEBUG, "Running SYNC_WITH_TRANSPORT\n"));
- run_test_sync_with_transport (oneway_receiver.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "Running SYNC_NONE\n"));
- run_test_sync_none (oneway_receiver.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Run the orb for 3 seconds, this way we make sure things are flushed
- // to the transport.
- ACE_Time_Value time (3, 0);
- orb->run (time ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (successful_calls == 0)
- ACE_ERROR ((LM_ERROR, "ERROR: No requests were successful\n"));
-
- if (failed_calls != 0)
- ACE_ERROR ((LM_ERROR, "ERROR: At least %d requests failed\n",
- failed_calls));
-
- if (failed_calls + successful_calls != iterations)
- ACE_ERROR ((LM_ERROR,
- "ERROR: Mismatched number of calls (%d + %d != %d)\n",
- successful_calls, failed_calls, iterations));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-set_sync_scope_policy (Messaging::SyncScope sync_scope
- ACE_ENV_ARG_DECL)
-{
- int argc = 0;
- CORBA::ORB_var orb = CORBA::ORB_init (argc, 0, "" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= sync_scope;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-run_one_iteration (int i,
- Test::Oneway_Receiver_ptr oneway_receiver,
- Test::Shutdown_Helper_ptr shutdown_helper
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- if (i == iterations / 3)
- {
- ACE_DEBUG ((LM_DEBUG, "Destroying object\n"));
- server_status = DESTROYED;
- oneway_receiver->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- if (i == 2 * iterations / 3)
- {
- ACE_DEBUG ((LM_DEBUG, "Shutting down server process\n"));
- server_status = SHUTDOWN;
- shutdown_helper->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- oneway_receiver->raise_no_permission (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-/// Helper routine to set breakpoints during failures
-void
-call_failed (const CORBA::SystemException &ex)
-{
- failed_calls++;
-
- ACE_PRINT_EXCEPTION (ex, "Exception raised");
-}
-
-void
-run_test_sync_with_target (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL)
-{
- set_sync_scope_policy (Messaging::SYNC_WITH_TARGET ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::Shutdown_Helper_var shutdown_helper =
- oneway_receiver->get_shutdown_helper (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- int had_comm_failure = 0;
- for (int i = 0; i != iterations; ++i)
- {
- ACE_TRY
- {
- run_one_iteration (i, oneway_receiver, shutdown_helper.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (CORBA::NO_PERMISSION, ex)
- {
- if (server_status == ALIVE)
- successful_calls++;
- else
- call_failed (ex);
- }
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
- {
- if (server_status == DESTROYED)
- successful_calls++;
- else
- call_failed (ex);
- }
- ACE_CATCH (CORBA::COMM_FAILURE, ex)
- {
- if (server_status == SHUTDOWN && had_comm_failure == 0)
- successful_calls++;
- else
- call_failed (ex);
- had_comm_failure = 1;
- }
- ACE_CATCH (CORBA::TRANSIENT, ex)
- {
- if (server_status == SHUTDOWN)
- successful_calls++;
- else
- call_failed (ex);
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- call_failed (ex);
- }
- ACE_ENDTRY;
- }
-}
-
-void
-run_test_sync_with_server (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL)
-{
- set_sync_scope_policy (Messaging::SYNC_WITH_SERVER ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- Test::Shutdown_Helper_var shutdown_helper =
- oneway_receiver->get_shutdown_helper (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- int had_comm_failure = 0;
- for (int i = 0; i != iterations; ++i)
- {
- ACE_TRY
- {
- run_one_iteration (i, oneway_receiver, shutdown_helper.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (server_status == DESTROYED
- || server_status == SHUTDOWN)
- failed_calls++;
- else
- successful_calls++;
- }
- ACE_CATCH (CORBA::NO_PERMISSION, ex)
- {
- call_failed (ex);
- }
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
- {
- if (server_status == DESTROYED)
- successful_calls++;
- else
- call_failed (ex);
- }
- ACE_CATCH (CORBA::COMM_FAILURE, ex)
- {
- if (server_status == SHUTDOWN && had_comm_failure == 0)
- successful_calls++;
- else
- call_failed (ex);
- had_comm_failure = 1;
- }
- ACE_CATCH (CORBA::TRANSIENT, ex)
- {
- if (server_status == SHUTDOWN)
- successful_calls++;
- else
- call_failed (ex);
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- call_failed (ex);
- }
- ACE_ENDTRY;
- }
-}
-
-/// Helper routine to run the sync_with_transport and sync_none tests.
-void
-run_test_unreliable (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL);
-
-void
-run_test_sync_with_transport (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL)
-{
- set_sync_scope_policy (Messaging::SYNC_WITH_TRANSPORT ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- run_test_unreliable (oneway_receiver ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-run_test_sync_none (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL)
-{
- set_sync_scope_policy (Messaging::SYNC_NONE ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- run_test_unreliable (oneway_receiver ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-
-void
-run_test_unreliable (Test::Oneway_Receiver_ptr oneway_receiver
- ACE_ENV_ARG_DECL)
-{
- Test::Shutdown_Helper_var shutdown_helper =
- oneway_receiver->get_shutdown_helper (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- int undetected = 0;
- int had_transient = 0;
- for (int i = 0; i != iterations; ++i)
- {
- ACE_TRY
- {
- run_one_iteration (i, oneway_receiver, shutdown_helper.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // A few failures can go undetected...
- if (server_status == SHUTDOWN)
- undetected++;
-
- // Once a TRANSIENT is raised all future calls should fail.
- if (had_transient)
- failed_calls++;
- else
- successful_calls++;
- }
- ACE_CATCH (CORBA::NO_PERMISSION, ex)
- {
- call_failed (ex);
- }
- ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
- {
- call_failed (ex);
- }
- ACE_CATCH (CORBA::COMM_FAILURE, ex)
- {
- call_failed (ex);
- }
- ACE_CATCH (CORBA::TRANSIENT, ex)
- {
- if (server_status == SHUTDOWN)
- successful_calls++;
- else
- call_failed (ex);
- had_transient = 1;
- }
- ACE_CATCH (CORBA::SystemException, ex)
- {
- call_failed (ex);
- }
- ACE_ENDTRY;
- }
- ACE_DEBUG ((LM_DEBUG, "Undetected TRANSIENT count = %d\n",
- undetected));
-}
diff --git a/TAO/tests/Reliable_Oneways/run_sync_none.pl b/TAO/tests/Reliable_Oneways/run_sync_none.pl
deleted file mode 100755
index 6e36b4f6b12..00000000000
--- a/TAO/tests/Reliable_Oneways/run_sync_none.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -n");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Reliable_Oneways/run_sync_with_server.pl b/TAO/tests/Reliable_Oneways/run_sync_with_server.pl
deleted file mode 100755
index 8b1e7d2dff4..00000000000
--- a/TAO/tests/Reliable_Oneways/run_sync_with_server.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -s");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (200);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Reliable_Oneways/run_sync_with_target.pl b/TAO/tests/Reliable_Oneways/run_sync_with_target.pl
deleted file mode 100755
index 121718d76d0..00000000000
--- a/TAO/tests/Reliable_Oneways/run_sync_with_target.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -r");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (200);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Reliable_Oneways/run_sync_with_transport.pl b/TAO/tests/Reliable_Oneways/run_sync_with_transport.pl
deleted file mode 100755
index 35f4604a4c8..00000000000
--- a/TAO/tests/Reliable_Oneways/run_sync_with_transport.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -t");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (200);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Reliable_Oneways/run_test.pl b/TAO/tests/Reliable_Oneways/run_test.pl
deleted file mode 100755
index c762b9f4a58..00000000000
--- a/TAO/tests/Reliable_Oneways/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-foreach $i ("-n", "-t", "-s", "-r") {
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
- }
- else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
- }
- $CL = new PerlACE::Process ("client", " -k file://$iorfile $i");
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- $client = $CL->SpawnWaitKill (200);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-
- $server = $SV->WaitKill (10);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- unlink $iorfile;
-}
-
-exit $status;
diff --git a/TAO/tests/Reliable_Oneways/server.cpp b/TAO/tests/Reliable_Oneways/server.cpp
deleted file mode 100644
index 05aa3251a36..00000000000
--- a/TAO/tests/Reliable_Oneways/server.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "Oneway_Receiver.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Reliable_Oneways, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Oneway_Receiver *oneway_receiver_impl = 0;
- ACE_NEW_RETURN (oneway_receiver_impl,
- Oneway_Receiver (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(oneway_receiver_impl);
-
- Test::Oneway_Receiver_var oneway_receiver =
- oneway_receiver_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (oneway_receiver.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/.cvsignore b/TAO/tests/Sequence_Unit_Tests/.cvsignore
deleted file mode 100644
index 906e9b13aff..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Bounded_Simple_Types
-Bounded_String
-Unbounded_Simple_Types
-Unbounded_String
diff --git a/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp b/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
deleted file mode 100644
index 2532701858e..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @file
- *
- * @brief Smoke test (basically just compile) the unbounded sequences
- * for primitive and other self-managed types.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "tao/Bounded_Value_Sequence_T.h"
-
-struct Foo
-{
- int x;
-};
-
-CORBA::ULong const TEST_INT_MAX = 32;
-CORBA::ULong const TEST_FOO_MAX = 64;
-
-int main(int,char*[])
-{
- typedef TAO::bounded_value_sequence<int,TEST_INT_MAX> int_sequence;
-
- int_sequence a;
- int_sequence b(a);
-
- int_sequence c(0, int_sequence::allocbuf(), true);
-
- a = b;
-
- a.length(c.maximum());
- if (a.release())
- {
- b.length(a.length());
- }
-
- a[0] = 0;
- b[0] = a[0];
-
- int_sequence const & d = a;
- c[0] = d[0];
-
- b.replace(0, int_sequence::allocbuf(), true);
-
- int const * x = d.get_buffer();
- if (x != 0)
- {
- int_sequence::freebuf(a.get_buffer(true));
- }
- x = b.get_buffer();
-
- int_sequence e(c);
-
- typedef TAO::bounded_value_sequence<Foo,TEST_FOO_MAX> Foo_sequence;
-
- Foo_sequence u;
- Foo_sequence v(u);
- u = v;
-
- return 0;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp b/TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp
deleted file mode 100644
index 8f0bc9e45ef..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/Bounded_String.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @file
- *
- * @brief Smoke test (basically just compile) the bounded sequences
- * for strings.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "tao/Bounded_String_Sequence_T.h"
-#include "tao/CORBA_String.h"
-
-CORBA::ULong const MAXIMUM = 42;
-typedef TAO::bounded_string_sequence<MAXIMUM> s_sequence;
-
-int main(int,char*[])
-{
- s_sequence a;
- s_sequence b(a);
-
- s_sequence c(0, s_sequence::allocbuf(), true);
- a = b;
-
- a.length(c.maximum());
- if (a.release())
- {
- b.length(a.length());
- }
- a[0] = const_cast<char const*>("Hello");
- b[0] = a[0];
-
- s_sequence const & d = a;
- c[0] = d[0];
-
- b.replace(0, s_sequence::allocbuf(), true);
-
- char const * const * x = d.get_buffer();
- if (x != 0)
- {
- s_sequence::freebuf(a.get_buffer(true));
- }
- x = b.get_buffer();
-
- if (d.length())
- {
- s_sequence::freebuf(s_sequence::allocbuf());
- }
-
- s_sequence e(c);
-
- CORBA::String_var w(const_cast<char const*>("World"));
- e[0] = w;
-
- return 0;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/README b/TAO/tests/Sequence_Unit_Tests/README
deleted file mode 100644
index 0c533dfa228..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/README
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-
-@page Sequence Unit Tests
-
-Implement unit tests for the TAO CORBA sequence implementation.
-
-The correctness of CORBA sequences is a fundamental building block for
-many TAO applications, however, these classes are very complex
-specially when their underlying type is not self-managed, such as
-strings and object references. This directory contains unit tests for
-all these classes, i.e. tests that do not require external components
-(or processes!)
-
-Some of the tests depend on the boost::unit_test_framework
-(www.boost.org) Any other "tests" simply verify that the code
-compiles. Therefore you should install boost and configure this
-feature in your build if any reasonable coverage is desired.
-
-To run the tests use the run_test.pl script:
-
-$ ./run_test.pl
-
-*/
diff --git a/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc b/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc
deleted file mode 100644
index 4c71d40e683..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/Sequence_Unit_Tests.mpc
+++ /dev/null
@@ -1,148 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*UB_Simple_Types) : taoexe {
- Source_Files {
- Unbounded_Simple_Types.cpp
- }
-}
-
-project(*Unbounded_Octet) : taoexe {
- Source_Files {
- Unbounded_Octet.cpp
- }
-}
-
-project(*B_Simple_Types) : taoexe {
- Source_Files {
- Bounded_Simple_Types.cpp
- }
-}
-
-project(*Unbounded_String) : taoexe {
- Source_Files {
- Unbounded_String.cpp
- }
-}
-
-project(*Bounded_String) : taoexe {
- Source_Files {
- Bounded_String.cpp
- }
-}
-
-project(*UB_Arr_Seq): taoexe, boost_unit_test_framework {
- // Temporarily disabled this test, need to change the mock_array a lot
- requires += dummy_label
- exename = unbounded_array_sequence_ut
- Source_Files {
- mock_array.cpp
- unbounded_array_sequence_ut.cpp
- }
-}
-
-project(*Obj_Ref_Seq_Elem): taoexe, boost_unit_test_framework {
- exename = object_reference_sequence_element_ut
- Source_Files {
- mock_reference.cpp
- object_reference_sequence_element_ut.cpp
- }
-}
-
-project(*UB_Obj_Ref_Seq): taoexe, boost_unit_test_framework {
- exename = unbounded_object_reference_sequence_ut
- Source_Files {
- mock_reference.cpp
- unbounded_object_reference_sequence_ut.cpp
- }
-}
-
-project(*UB_Sequence_CDR): taoexe, boost_unit_test_framework {
- exename = unbounded_sequence_cdr_ut
- Source_Files {
- mock_reference.cpp
- unbounded_sequence_cdr_ut.cpp
- }
-}
-
-project(*B_Sequence_CDR): taoexe, boost_unit_test_framework {
- exename = bounded_sequence_cdr_ut
- Source_Files {
- mock_reference.cpp
- bounded_sequence_cdr_ut.cpp
- }
-}
-
-project(*UB_Fwd_Ob_Ref_Seq): taoexe, boost_unit_test_framework {
- exename = unbounded_fwd_object_reference_sequence_ut
- Source_Files {
- fwd_mock_reference.cpp
- unbounded_fwd_object_reference_sequence_ut.cpp
- }
-}
-
-project(*UB_Octet_Sequence): taoexe, boost_unit_test_framework {
- exename = unbounded_octet_sequence_ut
- Source_Files {
- mock_reference.cpp
- unbounded_octet_sequence_ut.cpp
- }
-}
-
-project(*UB_Oct_Seq_No_Cpy): taoexe, boost_unit_test_framework {
- exename = unbounded_octet_sequence_no_copy_ut
- Source_Files {
- mock_reference.cpp
- unbounded_octet_sequence_nocopy_ut.cpp
- }
-}
-
-project(*B_Obj_Ref_Seq): taoexe, boost_unit_test_framework {
- exename = bounded_object_reference_sequence_ut
- Source_Files {
- mock_reference.cpp
- bounded_object_reference_sequence_ut.cpp
- }
-}
-
-project(*String_Seq_Elem): taoexe, boost_unit_test_framework {
- exename = string_sequence_element_ut
- Source_Files {
- string_sequence_element_ut.cpp
- }
-}
-
-project(*UB_String_Seq): taoexe, boost_unit_test_framework {
- exename = unbounded_string_sequence_ut
- Source_Files {
- unbounded_string_sequence_ut.cpp
- }
-}
-
-project(*B_String_Seq): taoexe, boost_unit_test_framework {
- exename = bounded_string_sequence_ut
- Source_Files {
- bounded_string_sequence_ut.cpp
- }
-}
-
-project(*Test_Alloc_Traits): taoexe, boost_unit_test_framework {
- exename = testing_allocation_traits_ut
- Source_Files {
- testing_allocation_traits_ut.cpp
- }
-}
-
-project(*UB_Value_Sequence): taoexe, boost_unit_test_framework {
- exename = unbounded_value_sequence_ut
- Source_Files {
- unbounded_value_sequence_ut.cpp
- }
-}
-
-project(*B_Value_Sequence): taoexe, boost_unit_test_framework {
- exename = bounded_value_sequence_ut
- Source_Files {
- bounded_value_sequence_ut.cpp
- }
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp b/TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp
deleted file mode 100644
index 2ec62a8fe35..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/Unbounded_Octet.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * @file
- *
- * @brief Smoke test (basically just compile) the unbounded sequences
- * for octets.
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-#include "tao/Basic_Types.h"
-#include "tao/Unbounded_Octet_Sequence_T.h"
-
-typedef TAO::unbounded_value_sequence <CORBA::Octet> s_sequence;
-
-int main(int,char*[])
-{
- s_sequence a;
- s_sequence b(23);
-
- s_sequence c(32, 0, s_sequence::allocbuf(32), true);
- a = b;
-
- a.length(c.maximum());
- if (a.release())
- {
- b.length(a.length());
- }
- a[0] = 'a';
- b[0] = a[0];
-
- s_sequence const & d = a;
- c[0] = d[0];
-
- b.replace(64, 0, s_sequence::allocbuf(64), true);
-
- CORBA::Octet const * x = d.get_buffer();
- if (x != 0)
- {
- s_sequence::freebuf(a.get_buffer(true));
- }
- x = b.get_buffer();
-
- if (d.length())
- {
- s_sequence::freebuf(s_sequence::allocbuf(64));
- }
-
- s_sequence e(c);
-
- return 0;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp b/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
deleted file mode 100644
index 30082a9d4c9..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @file
- *
- * @brief Smoke test (basically just compile) the unbounded sequences
- * for primitive and other self-managed types.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "tao/Unbounded_Value_Sequence_T.h"
-
-struct Foo
-{
- int x;
-};
-
-int main(int,char*[])
-{
- typedef TAO::unbounded_value_sequence<int> int_sequence;
-
- int_sequence a;
- int_sequence b(23);
-
- int_sequence c(32, 0, int_sequence::allocbuf(32), true);
-
- a = b;
-
- a.length(c.maximum());
- if (a.release())
- {
- b.length(a.length());
- }
- a[0] = 0;
- b[0] = a[0];
-
- int_sequence const & d = a;
- c[0] = d[0];
-
- b.replace(64, 0, int_sequence::allocbuf(64), true);
-
- int const * x = d.get_buffer();
- if (x != 0)
- {
- int_sequence::freebuf(a.get_buffer(true));
- }
- x = b.get_buffer();
-
- int_sequence e(c);
-
- typedef TAO::unbounded_value_sequence<Foo> Foo_sequence;
-
- Foo_sequence u;
- Foo_sequence v(32);
- u = v;
-
- return 0;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/Unbounded_String.cpp b/TAO/tests/Sequence_Unit_Tests/Unbounded_String.cpp
deleted file mode 100644
index 246c46f7e85..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/Unbounded_String.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * @file
- *
- * @brief Smoke test (basically just compile) the unbounded sequences
- * for strings.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "tao/Unbounded_String_Sequence_T.h"
-#include "tao/CORBA_String.h"
-
-typedef TAO::unbounded_string_sequence s_sequence;
-
-int main(int,char*[])
-{
- s_sequence a;
- s_sequence b(23);
-
- s_sequence c(32, 0, s_sequence::allocbuf(32), true);
- a = b;
-
- a.length(c.maximum());
- if (a.release())
- {
- b.length(a.length());
- }
- a[0] = const_cast<char const*>("Hello");
- b[0] = a[0];
-
- s_sequence const & d = a;
- c[0] = d[0];
-
- b.replace(64, 0, s_sequence::allocbuf(64), true);
-
- char const * const * x = d.get_buffer();
- if (x != 0)
- {
- s_sequence::freebuf(a.get_buffer(true));
- }
- x = b.get_buffer();
-
- if (d.length())
- {
- s_sequence::freebuf(s_sequence::allocbuf(64));
- }
-
- s_sequence e(c);
-
- CORBA::String_var w(const_cast<char const*>("World"));
- e[0] = w;
-
- return 0;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp
deleted file mode 100644
index 21a8fb14451..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp
+++ /dev/null
@@ -1,410 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of object references.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_object_reference_traits.hpp"
-#include "tao/Object_Reference_Traits_T.h"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "mock_reference.hpp"
-
-#include "tao/Bounded_Object_Reference_Sequence_T.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-CORBA::ULong const TMAX = 64;
-
-struct Tester
-{
- typedef bounded_object_reference_sequence<mock_reference,mock_reference_var,TMAX> tested_sequence;
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- void test_default_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- BOOST_CHECK_EQUAL(TMAX, x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_buffer_constructor_release_true()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- CORBA::ULong maximum = 32;
- tested_sequence::value_type * data = tested_sequence::allocbuf(maximum);
- a.reset();
- tested_sequence x(maximum / 2, data, true);
-
- BOOST_CHECK_EQUAL(TMAX, x.maximum());
- BOOST_CHECK_EQUAL(x.length(), maximum / 2);
- BOOST_CHECK_EQUAL(x.get_buffer(), data);
- BOOST_CHECK_EQUAL(x.release(), true);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_buffer_constructor_release_false()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- CORBA::ULong maximum = 64;
- tested_sequence::value_type * data = tested_sequence::allocbuf(maximum);
- a.reset();
- {
- tested_sequence x(maximum / 2, data, false);
-
- BOOST_CHECK_EQUAL(TMAX, x.maximum());
- BOOST_CHECK_EQUAL(x.length(), maximum / 2);
- BOOST_CHECK_EQUAL(x.get_buffer(), data);
- BOOST_CHECK_EQUAL(x.release(), false);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
-
- tested_sequence::freebuf(data);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_copy_constructor_from_default()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- tested_sequence y(x);
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_copy_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls da(tested_allocation_traits::default_buffer_allocation_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- expected_calls d(mock_reference::duplicate_calls);
- expected_calls r(mock_reference::release_calls);
- CORBA::ULong const l = 16;
- {
- tested_sequence x;
- BOOST_CHECK_MESSAGE(da.expect(1), da);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- x.length(l);
- BOOST_CHECK_MESSAGE(i.expect(l), i);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_EQUAL(l, x.length());
- for(CORBA::ULong i = 0; i != l; ++i)
- {
- x[i] = mock_reference::allocate(i);
- }
-
- d.reset(); r.reset();
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_EQUAL(l, x.length());
- BOOST_CHECK_MESSAGE(d.expect(l), d);
- for(CORBA::ULong i = 0; i != l; ++i)
- {
- BOOST_CHECK_EQUAL(int(i), y[i]->id());
- }
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(2*TMAX), r);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_copy_constructor_throw_duplicate()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls da(tested_allocation_traits::default_buffer_allocation_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- expected_calls d(mock_reference::duplicate_calls);
- expected_calls r(mock_reference::release_calls);
- CORBA::ULong const l = 16;
- {
- tested_sequence x;
- BOOST_CHECK_MESSAGE(da.expect(1), da);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- x.length(l);
- BOOST_CHECK_MESSAGE(i.expect(l), i);
-
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_EQUAL(l, x.length());
- for(CORBA::ULong i = 0; i != l; ++i)
- {
- x[i] = mock_reference::allocate(i);
- }
-
- d.reset(); r.reset();
-
- mock_reference::duplicate_calls.failure_countdown(8);
- BOOST_CHECK_THROW(tested_sequence y(x), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(da.expect(0), da);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(d.expect(8), d);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls da(tested_allocation_traits::default_buffer_allocation_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- x.length(8);
- BOOST_CHECK_EQUAL(TMAX, x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- BOOST_CHECK_MESSAGE(i.expect(8), i);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(da.expect(1), da);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls da(tested_allocation_traits::default_buffer_allocation_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
- BOOST_CHECK_MESSAGE(da.expect(1), da);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- x.length(16);
- BOOST_CHECK_MESSAGE(i.expect(16), i);
-
- BOOST_CHECK_THROW(x.length(2 * TMAX), std::runtime_error);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
-
- BOOST_CHECK_EQUAL(TMAX, x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(TMAX);
- buf[0] = mock_reference::allocate(1);
- buf[1] = mock_reference::allocate(4);
- buf[2] = mock_reference::allocate(9);
- buf[3] = mock_reference::allocate(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK_EQUAL( 1, a[0]->id());
- BOOST_CHECK_EQUAL( 4, a[1]->id());
- BOOST_CHECK_EQUAL( 9, a[2]->id());
- BOOST_CHECK_EQUAL(16, a[3]->id());
- }
-
- void test_replace_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
-
- BOOST_CHECK_EQUAL(TMAX, a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
- }
-
- void test_replace_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
-
- BOOST_CHECK_EQUAL(TMAX, a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
- }
-
- void test_replace_release_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
-
- BOOST_CHECK_EQUAL(TMAX, a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(TMAX), r);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_throw_duplicate,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_release_default,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp b/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp
deleted file mode 100644
index fba15efe71f..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef guard_bounded_sequence_cdr
-#define guard_bounded_sequence_cdr
-/**
- * @file
- *
- * @brief Extract the sequence
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- * @author Johnny Willemsen
- */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-namespace TAO {
- namespace details {
- template <typename stream, typename sequence>
- bool extract_bounded_sequence(stream & strm, sequence & target) {
- ::CORBA::ULong new_length;
- if (!(strm >> new_length)) {
- return false;
- }
- if (new_length > strm.length()) {
- return false;
- }
- if (new_length > target.maximum ()) {
- return false;
- }
- sequence tmp;
- tmp.length(new_length);
- typename sequence::value_type * buffer = tmp.get_buffer();
- for(CORBA::ULong i = 0; i < new_length; ++i) {
- if (!(strm >> buffer[i])) {
- return false;
- }
- }
- tmp.swap(target);
- return true;
- }
-
- template <typename stream, typename sequence>
- bool insert_bounded_sequence(stream & strm, const sequence & source) {
- const ::CORBA::ULong length = source.length ();
- if (!(strm << length)) {
- return false;
- }
- for(CORBA::ULong i = 0; i < length; ++i) {
- if (!(strm << source[i])) {
- return false;
- }
- }
- return true;
- }
- }
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif /* guard_bounded_sequence_cdr */
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp
deleted file mode 100644
index 3ac1584a6e4..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for bounded sequences of object references.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_object_reference_traits.hpp"
-#include "tao/Object_Reference_Traits_T.h"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "mock_reference.hpp"
-
-#include "tao/Bounded_Object_Reference_Sequence_T.h"
-#include "tao/Bounded_Value_Sequence_T.h"
-#include "tao/Bounded_String_Sequence_T.h"
-#include "tao/Bounded_Array_Sequence_T.h"
-#include "tao/Bounded_Sequence_CDR_T.h"
-#include "tao/CDR.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-CORBA::ULong const TMAX = 64;
-
-typedef bounded_object_reference_sequence<mock_reference, mock_reference_var,TMAX> tested_sequence;
-
-CORBA::Boolean operator<< (TAO_OutputCDR &strm, const tested_sequence &sequence)
-{
- return TAO::marshal_sequence(strm, sequence);
-}
-
-CORBA::Boolean operator>> (TAO_InputCDR &strm, tested_sequence &sequence)
-{
- return TAO::demarshal_sequence(strm, sequence);
-}
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = mock_reference::allocate(1);
- buf[1] = mock_reference::allocate(4);
- buf[2] = mock_reference::allocate(9);
- buf[3] = mock_reference::allocate(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK_EQUAL( 1, a[0]->id());
- BOOST_CHECK_EQUAL( 4, a[1]->id());
- BOOST_CHECK_EQUAL( 9, a[2]->id());
- BOOST_CHECK_EQUAL(16, a[3]->id());
- }
-
- void test_stream()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls s(mock_reference::marshal_calls);
- {
- tested_sequence a;
- a.replace(4, buffer, false);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(64), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
-
- TAO_OutputCDR stream;
- stream << a;
- BOOST_CHECK_MESSAGE(s.expect(4), s);
- }
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_stream,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp
deleted file mode 100644
index e493adadce1..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp
+++ /dev/null
@@ -1,392 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for bounded string sequences.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#define TAO_USER_DEFINED_SEQUENCE_RANGE_CHECKING_INCLUDE \
- "tests/Sequence_Unit_Tests/testing_range_checking.hpp"
-
-#include "testing_string_traits.hpp"
-#include "tao/String_Traits_T.h"
-#include "testing_allocation_traits.hpp"
-
-#include "tao/Bounded_String_Sequence_T.h"
-#include "tao/Bounded_Wstring_Sequence_T.h"
-#include "tao/CORBA_String.h"
-
-#include "string_sequence_tester.hpp"
-
-#include "ace/OS_NS_string.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-#include <sstream>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-CORBA::ULong const MAXIMUM = 32;
-
-template<class tested_sequence>
-struct Tester
-{
- typedef typename tested_sequence::character_type char_type;
- typedef string_sequence_test_helpers<char_type> helper;
- typedef typename tested_sequence::value_type value_type;
- typedef typename tested_sequence::const_value_type const_value_type;
-
- typedef typename tested_sequence::element_traits tested_element_traits;
- typedef typename tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- x.length(8);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- BOOST_CHECK_MESSAGE(i.expect(8), i);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- tested_sequence x;
-
- BOOST_CHECK_THROW(x.length(64), std::runtime_error);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf();
- buf[0] = helper::to_string(1);
- buf[1] = helper::to_string(4);
- buf[2] = helper::to_string(9);
- buf[3] = helper::to_string(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK(helper::compare(1, a[0]));
- BOOST_CHECK(helper::compare(4, a[1]));
- BOOST_CHECK(helper::compare(9, a[2]));
- BOOST_CHECK(helper::compare(16, a[3]));
- }
-
- void test_regression_2201()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK(helper::compare_empty(a[3]));
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(true, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), b.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(0), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
-
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(MAXIMUM), r);
- }
-
- void add_all(test_suite * ts)
- {
- typedef string_sequence_tester<tested_sequence> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
-
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("bounded string sequence unit test");
-
- {
- typedef TAO::bounded_string_sequence<MAXIMUM> s_sequence;
- typedef Tester<s_sequence> nTester;
- boost::shared_ptr<nTester> tester(nTester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef TAO::bounded_wstring_sequence<MAXIMUM> w_sequence;
- typedef Tester<w_sequence> wTester;
- boost::shared_ptr<wTester> tester(wTester::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp
deleted file mode 100644
index c2aea535717..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for bounded sequences of value types (integers,
- * structures, etc.)
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "tao/Bounded_Value_Sequence_T.h"
-
-#include "value_sequence_tester.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-CORBA::ULong const MAXIMUM = 32;
-
-typedef bounded_value_sequence<int,MAXIMUM> tested_sequence;
-typedef tested_sequence::element_traits tested_element_traits;
-typedef tested_sequence::allocation_traits tested_allocation_traits;
-typedef details::range_checking<int,true> range;
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(MAXIMUM), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- tested_sequence x;
-
- BOOST_CHECK_THROW(x.length(64), std::runtime_error);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf();
- buf[0] = 1; buf[1] = 4; buf[2] = 9; buf[3] = 16;
-
- return buf;
- }
-
- void test_regression_2201 ()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(32, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(int( 0), a[3]);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a;
- a.replace(4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(4, buffer, true);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::default_buffer_allocation_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(MAXIMUM, b.maximum());
- BOOST_CHECK_EQUAL(0UL, b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(1), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), c);
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
-
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded value sequence unit test");
-
- {
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp b/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp
deleted file mode 100644
index 0dfe597f7a1..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @file
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "fwd_mock_reference.hpp"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-fwd_mock_reference *
-TAO::Objref_Traits<fwd_mock_reference>::duplicate (
- fwd_mock_reference_ptr
- )
-{
- return 0;
-}
-
-void
-TAO::Objref_Traits<fwd_mock_reference>::release (
- fwd_mock_reference_ptr
- )
-{
-}
-
-fwd_mock_reference_ptr
-TAO::Objref_Traits<fwd_mock_reference>::nil (void)
-{
- return 0;
-}
-
-CORBA::Boolean
-TAO::Objref_Traits<fwd_mock_reference>::marshal (
- fwd_mock_reference_ptr,
- TAO_OutputCDR &
- )
-{
- return true;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp b/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp
deleted file mode 100644
index a808d674fc4..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/fwd_mock_reference.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef guard_fwd_mock_reference_hpp
-#define guard_fwd_mock_reference_hpp
-/**
- * @file
- *
- * @brief Mock an forward declared object reference so we can test the sequences
- * in isolation.
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-#include "ace/config-all.h"
-
-#include "testing_counters.hpp"
-
-#include "tao/Objref_VarOut_T.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class fwd_mock_reference;
-typedef fwd_mock_reference * fwd_mock_reference_ptr;
-typedef TAO_Objref_Var_T<fwd_mock_reference> fwd_mock_reference_var;
-typedef TAO_Objref_Out_T<fwd_mock_reference> fwd_mock_reference_out;
-
-namespace TAO
-{
-template<>
-struct Objref_Traits< fwd_mock_reference>
-{
- static fwd_mock_reference_ptr duplicate (fwd_mock_reference_ptr);
- static void release (fwd_mock_reference_ptr);
- static fwd_mock_reference_ptr nil (void);
- static CORBA::Boolean marshal (const fwd_mock_reference_ptr p, TAO_OutputCDR & cdr);
-};
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif // guard_fwd_mock_reference_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_array.cpp b/TAO/tests/Sequence_Unit_Tests/mock_array.cpp
deleted file mode 100644
index ae4017ff3e9..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/mock_array.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "mock_array.hpp"
-
-my_array_slice *
-TAO::Array_Traits<my_array,my_array_slice,my_array_tag>::
-alloc()
-{
- return new my_array;
-}
-
-void
-TAO::Array_Traits<my_array,my_array_slice,my_array_tag>::
-free(my_array_slice * _tao_slice)
-{
- delete[] _tao_slice;
-}
-
-my_array_slice *
-TAO::Array_Traits<my_array,my_array_slice,my_array_tag>::
-dup(my_array_slice const * _tao_source)
-{
- // TODO exception safety
- my_array_slice * _tao_destination = alloc();
- copy(_tao_destination, _tao_source);
- return _tao_destination;
-}
-
-void
-TAO::Array_Traits<my_array,my_array_slice,my_array_tag>::
-copy(
- my_array_slice * _tao_destination,
- my_array_slice const * _tao_source)
-{
- std::copy(
- _tao_source, _tao_source + sizeof(my_array)/sizeof(my_array_slice),
- _tao_destination);
-}
-
-void
-TAO::Array_Traits<my_array,my_array_slice,my_array_tag>::
-zero(
- my_array_slice * _tao_slice)
-{
- std::fill(
- _tao_slice, _tao_slice + sizeof(my_array)/sizeof(my_array_slice),
- 0);
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_array.hpp b/TAO/tests/Sequence_Unit_Tests/mock_array.hpp
deleted file mode 100644
index c864d59dbf2..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/mock_array.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef guard_mock_array_hpp
-#define guard_mock_array_hpp
-#include /**/ "ace/pre.h"
-/**
- * @file
- *
- * @brief Mock an IDL-generated array
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_counters.hpp"
-
-#include <algorithm>
-
-typedef unsigned long my_array[5];
-typedef unsigned long my_array_slice;
-struct my_array_tag {};
-
-namespace TAO
-{
-
-template<typename T, typename T_slice, typename TAG>
-struct Array_Traits;
-
-template<>
-struct Array_Traits<my_array,my_array_slice,my_array_tag>
-{
- static my_array_slice * alloc();
- static void free(my_array_slice * _tao_slice);
- static my_array_slice * dup(my_array_slice const * _tao_source);
- static void copy(
- my_array_slice * _tao_destination,
- my_array_slice const * _tao_source);
-
- // TODO This is a new function
- static void zero(
- my_array_slice * _tao_slice);
-
-};
-
-}
-
-#include /**/ "ace/post.h"
-#endif // guard_mock_array_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_reference.cpp b/TAO/tests/Sequence_Unit_Tests/mock_reference.cpp
deleted file mode 100644
index 5d697c71205..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/mock_reference.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * @file
- *
- * $Id$
- *
- * @author Carlos O'Ryan <coryan@atdesk.com>
- */
-#include "mock_reference.hpp"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-call_counter mock_reference::duplicate_calls;
-call_counter mock_reference::release_calls;
-call_counter mock_reference::serialize_calls;
-call_counter mock_reference::deserialize_calls;
-call_counter mock_reference::marshal_calls;
-
-mock_reference::
-~mock_reference()
-{
-}
-
-mock_reference * mock_reference::
-allocate(int id)
-{
- return new mock_reference(id);
-}
-
-mock_reference * mock_reference::
-_nil()
-{
- return 0;
-}
-
-mock_reference * mock_reference::
-_duplicate(mock_reference * rhs)
-{
- duplicate_calls();
- if (rhs == 0)
- {
- return 0;
- }
- return new mock_reference(*rhs);
-}
-
-void mock_reference::
-_tao_release(mock_reference * rhs)
-{
- release_calls();
- delete rhs;
-}
-
-void CORBA::release(mock_reference * r)
-{
- mock_reference::_tao_release(r);
-}
-
-mock_reference *
-TAO::Objref_Traits<mock_reference>::duplicate (
- mock_reference_ptr p
- )
-{
- return mock_reference::_duplicate (p);
-}
-
-void
-TAO::Objref_Traits<mock_reference>::release (
- mock_reference_ptr p
- )
-{
- CORBA::release (p);
-}
-
-mock_reference_ptr
-TAO::Objref_Traits<mock_reference>::nil (void)
-{
- return mock_reference::_nil ();
-}
-
-CORBA::Boolean
-TAO::Objref_Traits<mock_reference>::marshal (
- const mock_reference_ptr,
- TAO_OutputCDR &
- )
-{
- mock_reference::marshal_calls ();
- return true;
-}
-
-CORBA::Boolean operator<< (TAO_OutputCDR &, const mock_reference *)
-{
- mock_reference::serialize_calls ();
- return true;
-}
-CORBA::Boolean operator>> (TAO_InputCDR &, mock_reference *&)
-{
- mock_reference::deserialize_calls ();
- return true;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tests/Sequence_Unit_Tests/mock_reference.hpp b/TAO/tests/Sequence_Unit_Tests/mock_reference.hpp
deleted file mode 100644
index 0c2a4c21ecf..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/mock_reference.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef guard_mock_reference_hpp
-#define guard_mock_reference_hpp
-/**
- * @file
- *
- * @brief Mock an object reference so we can test the sequences in
- * isolation.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "ace/config-all.h"
-
-#include "testing_counters.hpp"
-
-#include "tao/Basic_Types.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-// Forward declare the class a CORBA::release function for it. That
-// avoids having to introduce CORBA::Object into the tests.
-// Ideally the T_var and T_out types should accept mock objects
-// too, but that is too much to bite in the current iteration.
-class mock_reference;
-namespace CORBA
-{
-void release(mock_reference*);
-}
-
-class mock_stream;
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include "tao/Objref_VarOut_T.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-typedef mock_reference *mock_reference_ptr;
-typedef TAO_Objref_Var_T<mock_reference> mock_reference_var;
-typedef TAO_Objref_Out_T<mock_reference> mock_reference_out;
-
-/**
- * @class mock_reference
- *
- * @brief Implement a concrete class with the right interface for an
- * object reference.
- */
-class mock_reference
-{
-public:
- virtual ~mock_reference();
-
- typedef mock_reference_var _var_type;
- typedef mock_reference_out _out_type;
-
- static mock_reference * allocate(int id);
- static mock_reference * _nil();
-
- static call_counter duplicate_calls;
- static mock_reference * _duplicate(mock_reference * rhs);
- static call_counter release_calls;
- static void _tao_release(mock_reference * rhs);
- static call_counter serialize_calls;
- static call_counter deserialize_calls;
- static call_counter marshal_calls;
-
- inline bool operator==(mock_reference const & rhs) const
- {
- return id_ == rhs.id_;
- }
-
- inline bool operator!=(mock_reference const & rhs) const
- {
- return !(*this == rhs);
- }
-
- inline int id() const
- {
- return id_;
- }
-
-private:
- mock_reference ();
-
- inline mock_reference(int id)
- : id_(id)
- {}
-
-private:
- int id_;
-};
-
-CORBA::Boolean operator<< (TAO_OutputCDR &, const mock_reference *);
-CORBA::Boolean operator>> (TAO_InputCDR &, mock_reference *&);
-
-namespace TAO
-{
- template<>
- struct Objref_Traits< mock_reference>
- {
- static mock_reference_ptr duplicate (mock_reference_ptr);
- static void release (mock_reference_ptr);
- static mock_reference_ptr nil (void);
- static CORBA::Boolean marshal (const mock_reference_ptr p, TAO_OutputCDR & cdr);
- };
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif // guard_mock_reference_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp b/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp
deleted file mode 100644
index 20cfafac6ea..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp
+++ /dev/null
@@ -1,342 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for object_reference_sequence_element, this is the
- * type returned by operator[] from a string sequence.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_object_reference_traits.hpp"
-#include "mock_reference.hpp"
-#include "tao/Object_Reference_Sequence_Element_T.h"
-
-#include <sstream>
-#include <stdexcept>
-#include <iostream>
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details;
-
-using namespace boost::unit_test_framework;
-
-struct Tester
-{
- typedef object_reference_traits<mock_reference,mock_reference_var,true> tested_element_traits;
- typedef object_reference_sequence_element<tested_element_traits> tested_element;
- typedef mock_reference * reference_type;
- typedef tested_element_traits::object_type_var reference_var;
-
- void test_assignment_from_var_release_true()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- expected_calls md(mock_reference::duplicate_calls);
- expected_calls mr(mock_reference::release_calls);
- {
- reference_type xe = mock_reference::allocate(1);
- tested_element x(xe, true);
- reference_var y(mock_reference::allocate(2));
-
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- BOOST_CHECK_MESSAGE(md.expect(1), md);
- BOOST_CHECK_MESSAGE(mr.expect(2), mr);
-
- BOOST_CHECK_EQUAL(2, x->id());
-
- tested_element_traits::release(x);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
- }
-
- void test_assignment_from_var_release_false()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- expected_calls md(mock_reference::duplicate_calls);
- expected_calls mr(mock_reference::release_calls);
- {
- reference_type xe = mock_reference::allocate(1);
- reference_type oldxe = xe;
- tested_element x(xe, false);
- reference_var y(mock_reference::allocate(2));
-
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(1), md);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
-
- BOOST_CHECK_EQUAL(2, x->id());
-
- tested_element_traits::release(x);
- tested_element_traits::release(oldxe);
- BOOST_CHECK_MESSAGE(r.expect(2), r);
- BOOST_CHECK_MESSAGE(mr.expect(2), mr);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
- }
-
- void test_assignment_from_var_throw()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- expected_calls md(mock_reference::duplicate_calls);
- expected_calls mr(mock_reference::release_calls);
- {
- reference_type xe = mock_reference::allocate(1);
- tested_element x(xe, true);
- reference_var y(mock_reference::allocate(2));
-
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
-
- mock_reference::duplicate_calls.failure_countdown(1);
-
- BOOST_CHECK_THROW(x = y, testing_exception);
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(1), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
-
- BOOST_CHECK_EQUAL(1, x->id());
- BOOST_CHECK_EQUAL(2, y->id());
-
- tested_element_traits::release(x);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
- }
-
- void test_assignment_from_element_release_true()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- expected_calls md(mock_reference::duplicate_calls);
- expected_calls mr(mock_reference::release_calls);
- {
- reference_type xe = mock_reference::allocate(1);
- tested_element x(xe, true);
-
- reference_type ye = mock_reference::allocate(2);
- tested_element y(ye, true);
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(1), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- BOOST_CHECK_MESSAGE(md.expect(1), md);
- BOOST_CHECK_MESSAGE(mr.expect(2), mr);
-
- BOOST_CHECK_EQUAL(2, x->id());
-
- tested_element_traits::release(xe);
- tested_element_traits::release(ye);
- BOOST_CHECK_MESSAGE(r.expect(2), r);
- BOOST_CHECK_MESSAGE(mr.expect(2), mr);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
- }
-
- void test_assignment_from_element_release_false()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- expected_calls md(mock_reference::duplicate_calls);
- expected_calls mr(mock_reference::release_calls);
- {
- reference_type xe = mock_reference::allocate(1);
- reference_type oldxe = xe;
- tested_element x(xe, false);
-
- reference_type ye = mock_reference::allocate(2);
- tested_element y(ye, true);
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(1), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(1), md);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
-
- BOOST_CHECK_EQUAL(2, x->id());
-
- tested_element_traits::release(xe);
- tested_element_traits::release(oldxe);
- tested_element_traits::release(ye);
- BOOST_CHECK_MESSAGE(r.expect(3), r);
- BOOST_CHECK_MESSAGE(mr.expect(3), mr);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
- }
-
- void test_assignment_from_reference_release_true()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- expected_calls md(mock_reference::duplicate_calls);
- expected_calls mr(mock_reference::release_calls);
- {
- reference_type xe = mock_reference::allocate(1);
- tested_element x(xe, true);
-
- reference_type y = mock_reference::allocate(2);
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(2), mr);
-
- BOOST_CHECK_EQUAL(2, x->id());
-
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
- }
-
- void test_assignment_from_reference_release_false()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- expected_calls md(mock_reference::duplicate_calls);
- expected_calls mr(mock_reference::release_calls);
- {
- reference_type xe = mock_reference::allocate(1);
- reference_type oldxe = xe;
- tested_element x(xe, false);
-
- reference_type y = mock_reference::allocate(2);
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(1), mr);
-
- BOOST_CHECK_EQUAL(2, x->id());
-
- tested_element_traits::release(xe);
- tested_element_traits::release(oldxe);
- BOOST_CHECK_MESSAGE(r.expect(2), r);
- BOOST_CHECK_MESSAGE(mr.expect(2), mr);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- BOOST_CHECK_MESSAGE(md.expect(0), md);
- BOOST_CHECK_MESSAGE(mr.expect(0), mr);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_var_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_var_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_var_throw,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_element_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_element_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_reference_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_reference_release_false,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("object reference sequence element unit test");
-
- boost::shared_ptr<Tester > mock_reference_tester(
- Tester::allocate());
- mock_reference_tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/run_test.pl b/TAO/tests/Sequence_Unit_Tests/run_test.pl
deleted file mode 100755
index d83f2c3e4af..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/run_test.pl
+++ /dev/null
@@ -1,76 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-use strict;
-
-my $final_result = 0;
-
-my @tests = qw(unbounded_value_sequence_ut
- unbounded_array_sequence_ut
- bounded_value_sequence_ut
- string_sequence_element_ut
- unbounded_string_sequence_ut
- bounded_string_sequence_ut
- testing_allocation_traits_ut
- unbounded_octet_sequence_ut
- unbounded_octet_sequence_no_copy_ut
- object_reference_sequence_element_ut
- unbounded_object_reference_sequence_ut
- unbounded_fwd_object_reference_sequence_ut
- bounded_object_reference_sequence_ut
- bounded_sequence_cdr_ut
- unbounded_sequence_cdr_ut
- Unbounded_Octet
- Unbounded_Simple_Types
- Bounded_Simple_Types
- Unbounded_String
- Bounded_String
- );
-
-foreach my $process (@tests) {
-
-
- my $P = 0;
- if (PerlACE::is_vxworks_test()) {
- $P = new PerlACE::ProcessVX ($process,
- '--log_level=nothing '
- .'--report_level=no');
- }
- else {
- $P = new PerlACE::Process ($process,
- '--log_level=nothing '
- .'--report_level=no');
- }
- my $executable = $P->Executable;
-
- # Not all the binaries are generated in all configurations.
- if (PerlACE::is_vxworks_test()) {
- next unless -e $executable;
- }
- else {
- next unless -x $executable;
- }
-
- print "Running $process ...";
- my $result = $P->Spawn;
- if ($result != 0) {
- print "FAILED\n";
- $final_result = 1;
- next;
- }
- $result = $P->WaitKill(10);
- if ($result != 0) {
- print "FAILED\n";
- $final_result = 1;
- next;
- }
- print "SUCCESS\n";
-}
-
-exit $final_result;
diff --git a/TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp b/TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp
deleted file mode 100644
index 3bf93b550e4..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp
+++ /dev/null
@@ -1,402 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for string_sequence_element, this is the type
- * returned by operator[] from a string sequence.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_string_traits.hpp"
-#include "tao/String_Sequence_Element_T.h"
-#include "tao/String_Manager_T.h"
-#include "tao/CORBA_String.h"
-
-#include "ace/OS_NS_string.h"
-
-#include <sstream>
-#include <stdexcept>
-#include <iostream>
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details;
-
-using namespace boost::unit_test_framework;
-
-template<typename charT>
-struct helper {};
-
-template<>
-struct helper<char>
-{
- static char const * empty() {
- return "";
- }
- static char const * sample0() {
- return "Hello";
- }
- static char const * sample1() {
- return "World";
- }
- static char * dup_sample0() {
- return string_traits<char,true>::duplicate(sample0());
- }
- static char * dup_sample1() {
- return string_traits<char,true>::duplicate(sample1());
- }
- static bool equal(char const * lhs, char const * rhs) {
- return ACE_OS::strcmp(lhs, rhs) == 0;
- }
-};
-
-template<>
-struct helper<CORBA::WChar>
-{
- static CORBA::WChar const * empty() {
- return L"";
- }
- static CORBA::WChar const * sample0() {
- return L"Hello";
- }
- static CORBA::WChar const * sample1() {
- return L"World";
- }
- static CORBA::WChar * dup_sample0() {
- return string_traits<CORBA::WChar,true>::duplicate(sample0());
- }
- static CORBA::WChar * dup_sample1() {
- return string_traits<CORBA::WChar,true>::duplicate(sample1());
- }
- static bool equal(CORBA::WChar const * lhs, CORBA::WChar const * rhs) {
- return ACE_OS::strcmp(lhs, rhs) == 0;
- }
-};
-
-template<class charT>
-struct Tester
-{
- typedef string_traits<charT,true> tested_element_traits;
- typedef string_sequence_element<tested_element_traits> tested_element;
- typedef charT * string_type;
- typedef charT const * const_string_type;
- typedef typename tested_element_traits::string_var string_var;
- typedef typename tested_element_traits::string_mgr string_mgr;
-
- void test_assignment_from_const_string()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
- {
- string_type xe = helper<charT>::dup_sample0();
- const_string_type y = helper<charT>::sample1();
- d.reset(); r.reset();
-
- tested_element x(xe, true);
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample1(), xe),
- "Mismatch after assignment from const. expected="
- << helper<charT>::sample0()
- << ", got=" << x);
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void test_assignment_from_element()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- string_type xe = helper<charT>::dup_sample0();
- tested_element x(xe, true);
-
- string_type ye = helper<charT>::dup_sample1();
- tested_element y(ye, true);
-
- d.reset(); r.reset();
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample1(), xe),
- "Mismatch after assignment from element. expected="
- << helper<charT>::sample1()
- << ", got=" << xe);
-
- tested_element_traits::release(xe);
- tested_element_traits::release(ye);
- BOOST_CHECK_MESSAGE(r.expect(2), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void test_self_assignment()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- string_type xe = helper<charT>::dup_sample0();
-
- tested_element x(xe, true);
-
- d.reset(); r.reset();
-
- x = x;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample0(), xe),
- "Mismatch after self assignment. expected="
- << helper<charT>::sample0()
- << ", got=" << xe);
-
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void test_assignment_from_non_const_string()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
- {
- string_type xe = 0;
- tested_element x(xe, true);
-
- string_type y =
- tested_element_traits::duplicate(helper<charT>::sample0());
- BOOST_CHECK_MESSAGE(d.expect(1), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample0(), xe),
- "Mismatch after assignment from non-const. expected="
- << helper<charT>::sample0()
- << ", got=" << x);
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void test_copy_constructor()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
- {
- string_type xe =
- tested_element_traits::duplicate(helper<charT>::sample0());
- tested_element x(xe, true);
-
- d.reset(); r.reset();
-
- tested_element y(x);
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample0(), y),
- "Mismatch after copy constructor. expected="
- << helper<charT>::sample0()
- << ", got=" << y);
-
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void test_assignment_from_copy()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- string_type xe = helper<charT>::dup_sample0();
- tested_element x(xe, true);
-
- d.reset(); r.reset();
-
- tested_element y(x);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(r.expect(1), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample0(), xe),
- "Mismatch after assignment. expected="
- << helper<charT>::sample0()
- << ", got=" << xe);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample0(), y),
- "Mismatch after assignment. expected="
- << helper<charT>::sample0()
- << ", got=" << y);
-
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void test_assignment_from_var()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
- {
- string_type xe = helper<charT>::dup_sample1();
- tested_element x(xe, true);
- BOOST_CHECK_MESSAGE(d.expect(1), d);
-
- string_var y(helper<charT>::sample0());
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(r.expect(1), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample0(), xe),
- "Mismatch after assignment from var. expected="
- << helper<charT>::sample0()
- << ", got=" << x);
-
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void test_assignment_from_mgr()
- {
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
- {
- string_type xe = helper<charT>::dup_sample1();
- tested_element x(xe, true);
- BOOST_CHECK_MESSAGE(d.expect(1), d);
-
- string_mgr y;
- y = helper<charT>::sample0();
-
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- x = y;
-
- BOOST_CHECK_MESSAGE(r.expect(1), r);
-
- BOOST_CHECK_MESSAGE(
- helper<charT>::equal(helper<charT>::sample0(), xe),
- "Mismatch after assignment from mgr. expected="
- << helper<charT>::sample0()
- << ", got=" << x);
-
- tested_element_traits::release(xe);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_const_string,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_element,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_self_assignment,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_non_const_string,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_copy,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_var,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_mgr,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("string sequence element unit test");
-
- boost::shared_ptr<Tester<char> > char_tester(
- Tester<char>::allocate());
- char_tester->add_all(ts);
-
- boost::shared_ptr<Tester<CORBA::WChar> > wchar_tester(
- Tester<CORBA::WChar>::allocate());
- wchar_tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/string_sequence_tester.hpp b/TAO/tests/Sequence_Unit_Tests/string_sequence_tester.hpp
deleted file mode 100644
index 1e6227eb22f..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/string_sequence_tester.hpp
+++ /dev/null
@@ -1,501 +0,0 @@
-#ifndef guard_string_sequence_tester_hpp
-#define guard_string_sequence_tester_hpp
-/**
- * @file
- *
- * @brief Helper class to implement tests for *_string_sequence
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "tao/String_Traits_T.h"
-
-#include "ace/OS_NS_string.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-#include <sstream>
-
-template<typename charT>
-struct string_sequence_test_helpers
-{
-};
-
-template<>
-struct string_sequence_test_helpers<char>
-{
- inline static char const * test_string()
- {
- return "In a hole in the ground there lived a Hobbit";
- }
-
- inline static char * allocate_test_string()
- {
- return TAO::details::string_traits<char,true>::duplicate(
- test_string());
- }
-
- static bool compare_test_string(char const * value)
- {
- return ACE_OS::strcmp(test_string(), value) == 0;
- }
-
- inline static char * to_string(CORBA::ULong i)
- {
- std::ostringstream os;
- os << i;
- return TAO::details::string_traits<char,true>::duplicate(
- os.str().c_str());
- }
-
- inline static bool compare(int i, char const * value)
- {
- std::ostringstream os;
- os << i;
- return ACE_OS::strcmp(os.str().c_str(), value) == 0;
- }
-
- inline static bool compare_empty(char const * value)
- {
- return ACE_OS::strcmp(value, "") == 0;
- }
-};
-
-template<>
-struct string_sequence_test_helpers<CORBA::WChar>
-{
- inline static CORBA::WChar const * test_string()
- {
- return L"In a hole in the ground there lived a Hobbit";
- }
-
- inline static CORBA::WChar * allocate_test_string()
- {
- return TAO::details::string_traits<CORBA::WChar,true>::duplicate(
- test_string());
- }
-
- static bool compare_test_string(CORBA::WChar const * value)
- {
- return ACE_OS::strcmp(test_string(), value) == 0;
- }
-
- inline static CORBA::WChar * to_string(CORBA::ULong i)
- {
- std::wostringstream os;
- os << i;
- return TAO::details::string_traits<CORBA::WChar,true>::duplicate(
- os.str().c_str());
- }
-
- inline static bool compare(int i, CORBA::WChar const * value)
- {
- std::wostringstream os;
- os << i;
- return ACE_OS::strcmp(os.str().c_str(), value) == 0;
- }
-
- inline static bool compare_empty(CORBA::WChar const * value)
- {
- return ACE_OS::strcmp(value, L"") == 0;
- }
-};
-
-
-
-template<class tested_sequence>
-struct string_sequence_tester
-{
- typedef typename tested_sequence::character_type character_type;
- typedef string_sequence_test_helpers<character_type> helper;
- typedef typename tested_sequence::value_type value_type;
- typedef typename tested_sequence::const_value_type const_value_type;
- typedef typename tested_sequence::element_traits tested_element_traits;
- typedef typename tested_sequence::allocation_traits tested_allocation_traits;
-
- void test_default_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- BOOST_CHECK_EQUAL(
- CORBA::ULong(tested_allocation_traits::default_maximum()),
- x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_copy_constructor_from_default()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- expected_calls d(tested_element_traits::duplicate_calls);
- {
- tested_sequence x;
-
- a.reset(); f.reset(); i.reset(); d.reset();
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- BOOST_CHECK_MESSAGE(d.expect(0), d);
-
- BOOST_CHECK_EQUAL(x.maximum(), y.maximum());
- BOOST_CHECK_EQUAL(x.length(), y.length());
- BOOST_CHECK_EQUAL(x.release(), y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_index_accessor()
- {
- tested_sequence x;
- x.length(8);
-
- tested_sequence const & y = x;
- character_type const * t = y[4];
- BOOST_CHECK_MESSAGE(helper::compare_empty(t),
- "Unexpected string value " << t);
- }
-
- void test_index_modifier()
- {
- tested_sequence x;
- x.length(8);
-
- tested_sequence const & y = x;
-
- character_type const * text = helper::test_string();
- x[4] = text;
-
- character_type const * t = y[4];
-
- BOOST_CHECK_MESSAGE(ACE_OS::strcmp(text, x[4]) == 0,
- "Mismatched values expected=" << text
- << ", got=" << x[4]);
- BOOST_CHECK_MESSAGE(ACE_OS::strcmp(text, y[4]) == 0,
- "Mismatched values expected=" << text
- << ", got=" << y[4]);
- BOOST_CHECK(text != t);
- }
-
- void test_index_checking()
- {
- tested_sequence x;
- x.length(8);
-
- tested_sequence const & y = x;
- character_type const * lhs = 0;
- character_type const * rhs = 0;
- BOOST_CHECK_THROW(lhs = y[32], std::range_error);
- BOOST_CHECK_THROW(x[32] = rhs, std::range_error);
- }
-
- void test_copy_constructor_values()
- {
- tested_sequence a;
- a.length(16);
- for(CORBA::ULong i = 0; i != 16; ++i)
- {
- a[i] = helper::to_string(i);
- }
-
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
- CORBA::ULong max;
- {
- tested_sequence b(a);
- BOOST_CHECK_MESSAGE(d.expect(16), d);
- max = b.maximum();
-
- BOOST_CHECK_EQUAL(a.length(), b.length());
- for(CORBA::ULong i = 0; i != a.length(); ++i)
- {
- BOOST_CHECK_MESSAGE(ACE_OS::strcmp(a[i], b[i]) == 0,
- "Mismatched elements at index=" << i
- << ", a=" << a[i]
- << ", b=" << b[i]);
- }
- }
- BOOST_CHECK_MESSAGE(r.expect(max), r);
- }
-
- void test_freebuf_releases_elements()
- {
- value_type * buffer = tested_sequence::allocbuf(32);
- for(int i = 0; i != 32; ++i)
- {
- buffer[i] = helper::allocate_test_string();
- }
-
- expected_calls r(tested_element_traits::release_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- tested_sequence::freebuf(buffer);
-
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(32), r);
- }
-
- void test_assignment_from_default()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence x;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_EQUAL(
- CORBA::ULong(tested_allocation_traits::default_maximum()),
- x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- y = x;
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_EQUAL(x.maximum(), y.maximum());
- BOOST_CHECK_EQUAL(x.length(), y.length());
- BOOST_CHECK_EQUAL(x.release(), y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_assignment_values()
- {
- tested_sequence a;
- a.length(16);
- for(CORBA::ULong i = 0; i != 16; ++i)
- {
- a[i] = helper::to_string(i);
- }
-
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- CORBA::ULong max;
- {
- tested_sequence b;
- b = a;
- BOOST_CHECK_MESSAGE(d.expect(16), d);
-
- max = b.maximum();
-
- BOOST_CHECK_EQUAL(a.maximum(), b.maximum());
- BOOST_CHECK_EQUAL(a.length(), b.length());
- BOOST_CHECK_EQUAL(a.release(), b.release());
- for(CORBA::ULong i = 0; i != a.length(); ++i)
- {
- BOOST_CHECK_MESSAGE(ACE_OS::strcmp(a[i], b[i]) == 0,
- "Mismatched elements at index " << i);
- }
- r.reset();
- }
- BOOST_CHECK_MESSAGE(r.expect(max), r);
- }
-
- void test_exception_in_copy_constructor()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x; x.length(8);
- f.reset();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence y(x), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_assignment()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x; x.length(2);
-
- tested_sequence y; y.length(3);
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- f.reset();
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(y = x, testing_exception);
-
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(3), y.length());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_duplicate_exception_in_copy_constructor()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x; x.length(8);
- f.reset();
-
- for(CORBA::ULong i = 0; i != 8; ++i)
- {
- x[i] = helper::allocate_test_string();
- }
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
- tested_element_traits::duplicate_calls.failure_countdown(4);
-
- BOOST_CHECK_THROW(tested_sequence y(x), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(d.expect(4), d);
- BOOST_CHECK_MESSAGE(r.expect(x.maximum()), r);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_duplicate_exception_in_assignment()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x; x.length(8);
- f.reset();
-
- for(CORBA::ULong i = 0; i != 8; ++i)
- {
- x[i] = helper::allocate_test_string();
- }
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
-
-
- {
- tested_sequence y; y.length(4);
- for(CORBA::ULong i = 0; i != 4; ++i)
- {
- y[i] = helper::allocate_test_string();
- }
-
- a.reset();
- d.reset();
- r.reset();
- f.reset();
- tested_element_traits::duplicate_calls.failure_countdown(4);
- BOOST_CHECK_THROW(y = x, testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(d.expect(4), d);
- BOOST_CHECK_MESSAGE(r.expect(x.maximum()), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(4), y.length());
- for(CORBA::ULong i = 0; i != 4; ++i)
- {
- BOOST_CHECK_MESSAGE(
- helper::compare_test_string(y[i]),
- "Mismatch in element " << i
- << ", got=" << y[i]);
- }
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_get_buffer_const()
- {
- tested_sequence a; a.length(8);
- tested_sequence const & b = a;
-
- const_value_type const * buffer = b.get_buffer();
- a[0] = helper::test_string();
-
- BOOST_CHECK_EQUAL(buffer, b.get_buffer());
- BOOST_CHECK_MESSAGE(ACE_OS::strcmp(a[0], buffer[0]) == 0,
- "Mismatched elements a[0]=" << a[0]
- << ", buffer[0]=" << buffer[0]);
- }
-
- void add_all(boost::unit_test_framework::test_suite * ts)
- {
- boost::shared_ptr<string_sequence_tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_default_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_copy_constructor_from_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_index_accessor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_index_modifier,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_index_checking,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_copy_constructor_values,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_freebuf_releases_elements,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_assignment_from_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_assignment_values,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_exception_in_copy_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_exception_in_assignment,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_duplicate_exception_in_copy_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_duplicate_exception_in_assignment,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &string_sequence_tester::test_get_buffer_const,
- shared_this));
-
-
- }
-
- static boost::shared_ptr<string_sequence_tester> allocate()
- {
- boost::shared_ptr<string_sequence_tester> ptr(
- new string_sequence_tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- string_sequence_tester() {}
-
- boost::weak_ptr<string_sequence_tester> self_;
-};
-
-#endif // guard_string_sequence_tester_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/string_ut.cpp b/TAO/tests/Sequence_Unit_Tests/string_ut.cpp
deleted file mode 100644
index 5ff67e39e0d..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/string_ut.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for CORBA string
- *
- * $Id$
- *
- * @author Johnny Willemsen
- */
-#include "testing_string_traits.hpp"
-#include "tao/CORBA_String.h"
-
-#include "ace/OS_NS_string.h"
-
-#include <sstream>
-#include <stdexcept>
-#include <iostream>
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace TAO::details;
-
-using namespace boost::unit_test_framework;
-
-template<typename charT>
-struct helper {};
-
-template<>
-struct helper<char>
-{
- static char const * empty() {
- return "";
- }
- static char const * sample0() {
- return "Hello";
- }
- static char const * sample1() {
- return "World";
- }
- static char * dup_sample0() {
- return string_traits<char,true>::duplicate(sample0());
- }
- static char * dup_sample1() {
- return string_traits<char,true>::duplicate(sample1());
- }
- static bool equal(char const * lhs, char const * rhs) {
- return ACE_OS::strcmp(lhs, rhs) == 0;
- }
-};
-
-template<>
-struct helper<CORBA::WChar>
-{
- static CORBA::WChar const * empty() {
- return L"";
- }
- static CORBA::WChar const * sample0() {
- return L"Hello";
- }
- static CORBA::WChar const * sample1() {
- return L"World";
- }
- static CORBA::WChar * dup_sample0() {
- return string_traits<CORBA::WChar,true>::duplicate(sample0());
- }
- static CORBA::WChar * dup_sample1() {
- return string_traits<CORBA::WChar,true>::duplicate(sample1());
- }
- static bool equal(CORBA::WChar const * lhs, CORBA::WChar const * rhs) {
- return ACE_OS::strcmp(lhs, rhs) == 0;
- }
-};
-
-template<class charT>
-struct Tester
-{
- typedef string_traits<charT,true> tested_string_traits;
- typedef charT * string_type;
- typedef charT const * const_string_type;
- typedef typename tested_string_traits::string_var string_var;
- typedef typename tested_string_traits::string_mgr string_mgr;
- typedef typename tested_string_traits::string_out string_out;
-
- void test_copy_constructor()
- {
- expected_calls d(tested_string_traits::duplicate_calls);
- expected_calls r(tested_string_traits::release_calls);
-
- {
- string_var xe = helper<charT>::dup_sample0();
- string_var xb (xe);
- }
-
- BOOST_CHECK_MESSAGE(d.expect(1), d);
- BOOST_CHECK_MESSAGE(r.expect(1), r);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("string unit test");
-
- boost::shared_ptr<Tester<char> > char_tester(
- Tester<char>::allocate());
- char_tester->add_all(ts);
-
- boost::shared_ptr<Tester<CORBA::WChar> > wchar_tester(
- Tester<CORBA::WChar>::allocate());
- wchar_tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp b/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp
deleted file mode 100644
index 57d3cb859f7..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef guard_testing_allocation_traits_hpp
-#define guard_testing_allocation_traits_hpp
-/**
- * @file
- *
- * @brief Specialize the allocation traits in a manner suitable for
- * testing.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-#include "tao/Unbounded_Value_Allocation_Traits_T.h"
-#include "tao/Bounded_Value_Allocation_Traits_T.h"
-#include "tao/Unbounded_Reference_Allocation_Traits_T.h"
-#include "tao/Bounded_Reference_Allocation_Traits_T.h"
-#include "testing_exception.hpp"
-#include "testing_counters.hpp"
-
-template<typename T, class base>
-struct testing_allocation_traits : public base
-{
- typedef typename base::value_type value_type;
-
- static call_counter default_buffer_allocation_calls;
- inline static value_type * default_buffer_allocation()
- {
- default_buffer_allocation_calls();
- return base::default_buffer_allocation();
- }
-
- static call_counter allocbuf_calls;
- inline static value_type * allocbuf(CORBA::ULong maximum)
- {
- allocbuf_calls();
- return base::allocbuf(maximum);
- }
-
- static call_counter freebuf_calls;
- inline static void freebuf(value_type * buffer)
- {
- freebuf_calls();
- base::freebuf(buffer);
- }
-};
-
-template<typename T, class base> call_counter
-testing_allocation_traits<T,base>::allocbuf_calls;
-
-template<typename T, class base> call_counter
-testing_allocation_traits<T,base>::freebuf_calls;
-
-template<typename T, class base> call_counter
-testing_allocation_traits<T,base>::default_buffer_allocation_calls;
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-namespace TAO
-{
-namespace details
-{
-
-template<typename T>
-struct unbounded_value_allocation_traits<T,true>
- : public testing_allocation_traits<T, unbounded_value_allocation_traits<T,false> >
-{
-};
-
-template<typename T, CORBA::ULong MAX>
-struct bounded_value_allocation_traits<T,MAX,true>
- : public testing_allocation_traits<T, bounded_value_allocation_traits<T,MAX,false> >
-{
-};
-
-template<typename T, class reference_traits>
-struct unbounded_reference_allocation_traits<T,reference_traits,true>
- : public testing_allocation_traits<T, unbounded_reference_allocation_traits<T,reference_traits,false> >
-{
-};
-
-template<typename T, class reference_traits, CORBA::ULong MAX>
-struct bounded_reference_allocation_traits<T,reference_traits,MAX,true>
- : public testing_allocation_traits<T, bounded_reference_allocation_traits<T,reference_traits,MAX,false> >
-{
-};
-
-} // namespace details
-} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif // guard_testing_allocation_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp b/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp
deleted file mode 100644
index de4426c4f16..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for the testing_allocation_traits.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_allocation_traits.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-#define CHECK_NO_THROW(statement) \
-try { statement; } catch(...) { \
- BOOST_ERROR("unexpected exception raised"); }
-
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details;
-
-using namespace boost::unit_test_framework;
-
-CORBA::ULong const MAXIMUM = 32;
-
-template<class value_type>
-struct Tester
-{
- typedef unbounded_value_allocation_traits<value_type,true> unbounded;
- typedef bounded_value_allocation_traits<value_type,MAXIMUM,true> bounded;
-
- template<class aspect>
- void test_allocbuf()
- {
- expected_calls c(aspect::allocbuf_calls);
-
- aspect::allocbuf_calls.failure_countdown(2);
- value_type * s = 0;
- CHECK_NO_THROW(s = aspect::allocbuf(4));
- aspect::freebuf(s);
- BOOST_CHECK_THROW(s = aspect::allocbuf(4), testing_exception);
- CHECK_NO_THROW(s = aspect::allocbuf(4));
- aspect::freebuf(s);
-
- BOOST_CHECK_MESSAGE(c.expect(3), c);
- }
-
- template<class aspect>
- void test_freebuf()
- {
- expected_calls c(aspect::freebuf_calls);
-
- aspect::freebuf_calls.failure_countdown(2);
- value_type * s = aspect::allocbuf(4);
- CHECK_NO_THROW(aspect::freebuf(s));
- s = aspect::allocbuf(4);
- BOOST_CHECK_THROW(aspect::freebuf(s), testing_exception);
- aspect::freebuf(s);
- s = aspect::allocbuf(4);
- CHECK_NO_THROW(aspect::freebuf(s));
-
- BOOST_CHECK_MESSAGE(c.expect(4), c);
- }
-
- void test_default_buffer_allocation_value()
- {
- expected_calls u(unbounded::default_buffer_allocation_calls);
- expected_calls b(bounded::default_buffer_allocation_calls);
-
- value_type * s = unbounded::default_buffer_allocation();
- BOOST_CHECK_MESSAGE(u.expect(1), u);
- BOOST_CHECK_MESSAGE(b.expect(0), b);
- BOOST_CHECK_EQUAL(static_cast<value_type*>(0), s);
- bounded::freebuf(s);
-
- s = bounded::default_buffer_allocation();
- BOOST_CHECK_MESSAGE(u.expect(0), u);
- BOOST_CHECK_MESSAGE(b.expect(1), b);
- BOOST_CHECK(static_cast<value_type*>(0) != s);
- bounded::freebuf(s);
- }
-
- template<class aspect>
- void test_default_buffer_allocation()
- {
- expected_calls c(aspect::default_buffer_allocation_calls);
-
- aspect::default_buffer_allocation_calls.failure_countdown(2);
- value_type * s = 0;
- CHECK_NO_THROW(
- s = aspect::default_buffer_allocation());
- aspect::freebuf(s);
- BOOST_CHECK_THROW(
- s = aspect::default_buffer_allocation(), testing_exception);
- CHECK_NO_THROW(
- s = aspect::default_buffer_allocation());
- aspect::freebuf(s);
-
- BOOST_CHECK_MESSAGE(c.expect(3), c);
- }
-
- void test_default_buffer_allocation_unbounded()
- {
- test_default_buffer_allocation<unbounded>();
- }
-
- void test_default_buffer_allocation_bounded()
- {
- test_default_buffer_allocation<bounded>();
- }
-
- void test_allocbuf_unbounded()
- {
- test_allocbuf<unbounded>();
- }
-
- void test_allocbuf_bounded()
- {
- test_allocbuf<bounded>();
- }
-
- void test_freebuf_unbounded()
- {
- test_freebuf<unbounded>();
- }
-
- void test_freebuf_bounded()
- {
- test_freebuf<bounded>();
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_buffer_allocation_value,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_buffer_allocation_unbounded,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_buffer_allocation_bounded,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_allocbuf_unbounded,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_allocbuf_bounded,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_freebuf_unbounded,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_freebuf_bounded,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-struct Foo { int y; };
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("testing allocation traits unit test");
-
- {
- boost::shared_ptr<Tester<int> > tester(
- Tester<int>::allocate());
- tester->add_all(ts);
- }
-
- {
- boost::shared_ptr<Tester<Foo> > tester(
- Tester<Foo>::allocate());
- tester->add_all(ts);
- }
-
- {
- boost::shared_ptr<Tester<char*> > tester(
- Tester<char*>::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_counters.hpp b/TAO/tests/Sequence_Unit_Tests/testing_counters.hpp
deleted file mode 100644
index e5f20bb8ee1..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/testing_counters.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-#ifndef guard_testing_counters_hpp
-#define guard_testing_counters_hpp
-/**
- * @file
- *
- * @brief Some unit tests need to count how many times a function is
- * called. Here we implement some simple helper classes for that
- * purpose.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-#include "testing_exception.hpp"
-
-#include <boost/utility.hpp>
-
-#include <iostream>
-
-/**
- * @brief Used to count how many times a function gets called. The
- * unit test should create one instance per function.
- */
-class call_counter
-{
-public:
- inline call_counter()
- : count_(0)
- , failure_countdown_(0)
- {}
-
- inline long current_count() const
- {
- return count_;
- }
-
- inline void failure_countdown(long countdown)
- {
- failure_countdown_ = countdown;
- }
-
- inline void operator()()
- {
- ++count_;
- if (--failure_countdown_ == 0)
- {
- throw testing_exception();
- }
- }
-
-private:
- long count_;
- long failure_countdown_;
-};
-
-/**
- * @brief Used to detect if a testing_counter is "called" the right
- * number of times.
- */
-class expected_calls
- : private boost::noncopyable
-{
-public:
- inline expected_calls(call_counter const & counter)
- : current_count_(counter.current_count())
- , previous_count_(counter.current_count())
- , counter_(counter)
- { }
-
- inline bool expect(long n)
- {
- reset();
- return (previous_count_ + n == current_count_);
- }
-
- inline void reset()
- {
- previous_count_ = current_count_;
- current_count_ = counter_.current_count();
- }
-
- inline long current_count() const
- {
- return current_count_;
- }
-
- inline long previous_count() const
- {
- return previous_count_;
- }
-
-private:
- long current_count_;
- long previous_count_;
- call_counter const & counter_;
-};
-
-inline std::ostream & operator<<(std::ostream & os, expected_calls const & x)
-{
- return os << "current=" << x.current_count()
- << ",previous=" << x.previous_count();
-
-}
-
-#endif // guard_testing_counters_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_exception.hpp b/TAO/tests/Sequence_Unit_Tests/testing_exception.hpp
deleted file mode 100644
index 2fc4c540197..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/testing_exception.hpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef guard_testing_exception_hpp
-#define guard_testing_exception_hpp
-/**
- * @file
- *
- * @brief Simple exception to raise in the tests.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-struct testing_exception {};
-
-#endif // guard_testing_exception_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp b/TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp
deleted file mode 100644
index 043c85ad06a..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/testing_object_reference_traits.hpp
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef guard_testing_object_reference_traits_hpp
-#define guard_testing_object_reference_traits_hpp
-/**
- * @file
- *
- * @brief Specialize the object reference traits so they can be used
- * in testing.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-#include "testing_exception.hpp"
-#include "testing_counters.hpp"
-#include "tao/Object_Reference_Traits_T.h"
-
-template<typename object_t, typename object_t_var>
-struct testing_object_reference_traits
- : public TAO::details::object_reference_traits_base<object_t, object_t_var>
- , public TAO::details::object_reference_traits_decorator<object_t, object_t_var, testing_object_reference_traits<object_t, object_t_var> >
-{
- static call_counter default_initializer_calls;
- static call_counter duplicate_calls;
- static call_counter release_calls;
-
- typedef object_t object_type;
- typedef object_t_var object_type_var;
- typedef TAO::details::object_reference_traits<object_t,object_t_var,false> real_traits;
-
- static object_type * default_initializer()
- {
- default_initializer_calls();
- return real_traits::default_initializer();
- }
-
- static object_type * duplicate(object_type * s)
- {
- duplicate_calls();
- return real_traits::duplicate(s);
- }
-
- static void release(object_type * s)
- {
- release_calls();
- return real_traits::release(s);
- }
-};
-
-template<typename object_t,typename object_t_var> call_counter
-testing_object_reference_traits<object_t,object_t_var>::default_initializer_calls;
-
-template<typename object_t,typename object_t_var> call_counter
-testing_object_reference_traits<object_t,object_t_var>::duplicate_calls;
-
-template<typename object_t,typename object_t_var> call_counter
-testing_object_reference_traits<object_t,object_t_var>::release_calls;
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-namespace TAO
-{
-namespace details
-{
-
-template<typename object_t, typename object_t_var>
-struct object_reference_traits<object_t,object_t_var,true>
- : public testing_object_reference_traits<object_t,object_t_var>
-{
-};
-
-} // namespace details
-} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif // guard_testing_object_reference_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp b/TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp
deleted file mode 100644
index 4017b294901..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/testing_range_checking.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef guard_testing_range_checking_hpp
-#define guard_testing_range_checking_hpp
-/**
- * @file
- *
- * @brief Specialize the range_checking traits in a manner suitable
- * for testing.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-#include "tao/Range_Checking_T.h"
-
-#include <sstream>
-#include <stdexcept>
-
-template<typename T>
-struct testing_range_checking
-{
- typedef T value_type;
-
- inline static void check(
- CORBA::ULong index,
- CORBA::ULong length,
- CORBA::ULong maximum,
- char const * function_name)
- {
- if (index < length) {
- return;
- }
- std::ostringstream error;
- error << "Out of range access in " << function_name
- << ", index=" << index
- << ", length=" << length
- << ", maximum=" << maximum;
- throw std::range_error(error.str());
- }
-
- inline static void check_length(
- CORBA::ULong & new_length,
- CORBA::ULong maximum)
- {
- if (maximum < new_length)
- {
- std::ostringstream error;
- error << "Invalid bounded sequence length "
- << ", length=" << new_length
- << ", maximum=" << maximum;
- throw std::runtime_error(error.str());
- }
- }
-};
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-namespace TAO
-{
-namespace details
-{
-
-template<typename T>
-struct range_checking<T,true>
- : public testing_range_checking<T>
-{
-};
-
-} // namespace details
-} // namespace TAO
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif // guard_testing_range_checking_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp b/TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp
deleted file mode 100644
index 0c316da6dc3..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/testing_string_traits.hpp
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifndef guard_testing_string_traits_hpp
-#define guard_testing_string_traits_hpp
-/**
- * @file
- *
- * @brief Specialize the string traits so they can be used in testing.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-#include "testing_exception.hpp"
-#include "tao/String_Traits_T.h"
-#include "testing_counters.hpp"
-
-template<typename charT>
-struct testing_string_traits
- : public TAO::details::string_traits_base<charT>
- , public TAO::details::string_traits_decorator<charT,testing_string_traits<charT> >
-{
- static call_counter default_initializer_calls;
- static call_counter duplicate_calls;
- static call_counter release_calls;
- static call_counter not_released_from_const_calls;
- static call_counter not_released_from_managed_calls;
-
- typedef charT char_type;
- typedef TAO::details::string_traits<charT,false> real_traits;
-
- static char_type * default_initializer()
- {
- default_initializer_calls();
- return real_traits::default_initializer();
- }
-
- static char_type * duplicate(char_type const * s)
- {
- duplicate_calls();
- return real_traits::duplicate(s);
- }
-
- static void release(char_type * s)
- {
- release_calls();
- return real_traits::release(s);
- }
-
- static void not_released_from_const(
- char_type * & dst, char_type const * src)
- {
- not_released_from_const_calls();
- real_traits::not_released_from_const(dst, src);
- }
-
- static void not_released_from_managed(
- char_type * & dst, char_type const * src)
- {
- not_released_from_managed_calls();
- real_traits::not_released_from_managed(dst, src);
- }
-};
-
-template<typename charT> call_counter
-testing_string_traits<charT>::default_initializer_calls;
-
-template<typename charT> call_counter
-testing_string_traits<charT>::duplicate_calls;
-
-template<typename charT> call_counter
-testing_string_traits<charT>::release_calls;
-
-template<typename charT> call_counter
-testing_string_traits<charT>::not_released_from_const_calls;
-
-template<typename charT> call_counter
-testing_string_traits<charT>::not_released_from_managed_calls;
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-namespace TAO
-{
-namespace details
-{
-
-template<>
-struct string_traits<char,true>
- : public testing_string_traits<char>
-{
-};
-
-template<>
-struct string_traits<CORBA::WChar,true>
- : public testing_string_traits<CORBA::WChar>
-{
-};
-
-} // namespace details
-} // namespace TAO
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif // guard_testing_string_traits_hpp
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_array_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_array_sequence_ut.cpp
deleted file mode 100644
index 9648158918a..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_array_sequence_ut.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of arrays.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-#include "mock_array.hpp"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "tao/Unbounded_Array_Sequence_T.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO;
-
-struct Tester
-{
- typedef unbounded_array_sequence<my_array, my_array_slice, my_array_tag> tested_sequence;
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- void test_default_constructor()
- {
- {
- tested_sequence x;
-
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_constructor,
- shared_this));
- }
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded array sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp
deleted file mode 100644
index e8f829b732d..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_fwd_object_reference_sequence_ut.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of forward declared object
- * references.
- *
- * $Id$
- *
- * @author Johnny Willemsen <jwillemsen@remedy.nl>
- */
-#include "testing_object_reference_traits.hpp"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "fwd_mock_reference.hpp"
-
-#include "tao/Unbounded_Object_Reference_Sequence_T.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-struct Tester
-{
- typedef unbounded_object_reference_sequence<fwd_mock_reference, fwd_mock_reference_var> tested_sequence;
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- void test_default_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_constructor,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp
deleted file mode 100644
index 7d02abdde69..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp
+++ /dev/null
@@ -1,519 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of object references.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_object_reference_traits.hpp"
-#include "tao/Object_Reference_Traits_T.h"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "mock_reference.hpp"
-
-#include "tao/Unbounded_Object_Reference_Sequence_T.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-struct Tester
-{
- typedef unbounded_object_reference_sequence<mock_reference, mock_reference_var> tested_sequence;
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- void test_default_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_ulong_constructor_throw()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence x(16), testing_exception);
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_buffer_constructor_release_true()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- CORBA::ULong maximum = 32;
- tested_sequence::value_type * data = tested_sequence::allocbuf(maximum);
- a.reset();
- tested_sequence x(maximum, maximum / 2, data, true);
-
- BOOST_CHECK_EQUAL(x.maximum(), maximum);
- BOOST_CHECK_EQUAL(x.length(), maximum / 2);
- BOOST_CHECK_EQUAL(x.get_buffer(), data);
- BOOST_CHECK_EQUAL(x.release(), true);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_buffer_constructor_release_false()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- CORBA::ULong maximum = 64;
- tested_sequence::value_type * data = tested_sequence::allocbuf(maximum);
- a.reset();
- {
- tested_sequence x(maximum, maximum / 2, data, false);
-
- BOOST_CHECK_EQUAL(x.maximum(), maximum);
- BOOST_CHECK_EQUAL(x.length(), maximum / 2);
- BOOST_CHECK_EQUAL(x.get_buffer(), data);
- BOOST_CHECK_EQUAL(x.release(), false);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
-
- tested_sequence::freebuf(data);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_copy_constructor_from_default()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x;
-
- tested_sequence y(x);
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_copy_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- expected_calls d(mock_reference::duplicate_calls);
- expected_calls r(mock_reference::release_calls);
- CORBA::ULong const l = 16;
- {
- tested_sequence x(l);
- x.length(l);
- BOOST_CHECK_MESSAGE(i.expect(l), i);
-
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_EQUAL(l, x.length());
- for(CORBA::ULong i = 0; i != l; ++i)
- {
- x[i] = mock_reference::allocate(i);
- }
-
- d.reset(); r.reset();
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_EQUAL(l, x.length());
- BOOST_CHECK_MESSAGE(d.expect(l), d);
- for(CORBA::ULong i = 0; i != l; ++i)
- {
- BOOST_CHECK_EQUAL(int(i), y[i]->id());
- }
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(2*l), r);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_copy_constructor_throw_duplicate()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- expected_calls d(mock_reference::duplicate_calls);
- expected_calls r(mock_reference::release_calls);
- CORBA::ULong const l = 16;
- {
- tested_sequence x(l);
- x.length(l);
-
- BOOST_CHECK_MESSAGE(i.expect(l), i);
-
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_EQUAL(l, x.length());
- for(CORBA::ULong i = 0; i != l; ++i)
- {
- x[i] = mock_reference::allocate(i);
- }
-
- d.reset(); r.reset();
-
- mock_reference::duplicate_calls.failure_countdown(8);
- BOOST_CHECK_THROW(tested_sequence y(x), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(d.expect(8), d);
- BOOST_CHECK_MESSAGE(r.expect(l), r);
- }
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(l), r);
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- BOOST_CHECK_MESSAGE(i.expect(8), i);
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(32);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_MESSAGE(i.expect(32), i);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_copy_elements()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(16);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.length());
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), a);
- BOOST_CHECK_MESSAGE(i.expect(16), i);
-
- for(int j = 0; j != 16; ++j)
- {
- BOOST_CHECK_EQUAL(mock_reference::_nil(), x[j]);
- x[j] = mock_reference::allocate(j);
- }
-
- x.length(32);
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(16), i);
-
- tested_sequence const & y = x;
-
- for(CORBA::ULong i = 0; i != 16UL; ++i)
- {
- BOOST_REQUIRE(mock_reference::_nil() != y[i]);
- BOOST_CHECK_EQUAL(int(i), y[i]->id());
- }
- for(CORBA::ULong i = 16; i != 32UL; ++i)
- {
- BOOST_CHECK_EQUAL(mock_reference::_nil(), y[i]);
- }
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_set_length_throw()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- x.length(16);
- BOOST_CHECK_MESSAGE(i.expect(16), i);
-
- for(int j = 0; j != 16; ++j)
- {
- BOOST_CHECK_EQUAL(mock_reference::_nil(), x[j]);
- x[j] = mock_reference::allocate(j);
- }
-
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(x.length(32), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.length());
- BOOST_CHECK_MESSAGE(i.expect(0), i);
-
- tested_sequence const & y = x;
-
- for(int j = 0; j != 16; ++j)
- {
- BOOST_REQUIRE(mock_reference::_nil() != y[j]);
- BOOST_CHECK_EQUAL(j, y[j]->id());
- }
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = mock_reference::allocate(1);
- buf[1] = mock_reference::allocate(4);
- buf[2] = mock_reference::allocate(9);
- buf[3] = mock_reference::allocate(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK_EQUAL( 1, a[0]->id());
- BOOST_CHECK_EQUAL( 4, a[1]->id());
- BOOST_CHECK_EQUAL( 9, a[2]->id());
- BOOST_CHECK_EQUAL(16, a[3]->id());
- }
-
- void test_replace_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_replace_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(0), 0);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_replace_release_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(0), 0);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_default_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor_throw,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_throw_duplicate,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_copy_elements,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_throw,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_release_default,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp
deleted file mode 100644
index 73772259ac1..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp
+++ /dev/null
@@ -1,486 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of octet types using the TAO
- * specific no copy specialization
- *
- * $Id$
- *
- * @author Johnny Willemsen
- */
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "tao/Unbounded_Octet_Sequence_T.h"
-
-#include "value_sequence_tester.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-#include "tao/Basic_Types.h"
-#include "tao/CDR.h"
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-typedef unbounded_value_sequence<CORBA::Octet> tested_sequence;
-typedef tested_sequence::element_traits tested_element_traits;
-typedef tested_sequence::allocation_traits tested_allocation_traits;
-typedef details::range_checking<CORBA::Octet,true> range;
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
-
- void test_copy_constructor_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- x.length(8);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_assignment_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- x.length(8);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- y = x;
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence x(16), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(32);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_set_length()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(x.length(8), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = 1; buf[1] = 4; buf[2] = 9; buf[3] = 16;
-
- return buf;
- }
-
- ACE_Message_Block * alloc_and_init_mb()
- {
- char buf[9];
- sprintf (buf, "%s", "testing ");
- size_t n = (strlen (buf) + 1) * sizeof (char);
- ACE_Message_Block * mb = new ACE_Message_Block (n);
- mb->copy ((char *) buf, n);
-
- return mb;
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, true);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(0UL, b.maximum());
- BOOST_CHECK_EQUAL(0UL, b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(1), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_no_copy_octet()
- {
-#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
- ACE_Message_Block * mb = alloc_and_init_mb();
- tested_sequence a (8, mb);
- BOOST_CHECK_EQUAL(CORBA::Octet( 't'), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 'g'), a[6]);
-
- char upperbuf[256];
- sprintf (upperbuf, "%s", "THIS IS A TEST");
- size_t n = (strlen (upperbuf) + 1) * sizeof (char);
- ACE_Message_Block * upper_mb = 0;
- ACE_NEW (upper_mb,
- ACE_Message_Block (n));
- // Copy buf into the Message_Block and update the wr_ptr ().
- upper_mb->copy ((char *) upperbuf, n);
- a.replace (n, upper_mb);
- BOOST_CHECK_EQUAL(CORBA::Octet( 'T'), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 'S'), a[6]);
-#endif
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_no_copy_octet,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_set_length,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
-
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded no copy octet sequence unit test");
-
- {
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp
deleted file mode 100644
index efb44423d9e..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp
+++ /dev/null
@@ -1,450 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of octet types
- *
- * $Id$
- *
- * @author Johnny Willemsen
- */
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "tao/Unbounded_Value_Sequence_T.h"
-
-#include "value_sequence_tester.hpp"
-
-#include "tao/Basic_Types.h"
-#include "tao/CDR.h"
-
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-using namespace boost::unit_test_framework;
-
-typedef unbounded_value_sequence<CORBA::Octet> tested_sequence;
-typedef tested_sequence::element_traits tested_element_traits;
-typedef tested_sequence::allocation_traits tested_allocation_traits;
-typedef details::range_checking<CORBA::Octet,true> range;
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
-
- void test_copy_constructor_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- x.length(8);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_assignment_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- x.length(8);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- y = x;
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence x(16), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(32);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_set_length()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(x.length(8), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = 1; buf[1] = 4; buf[2] = 9; buf[3] = 16;
-
- return buf;
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, true);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(CORBA::Octet( 1), a[0]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 4), a[1]);
- BOOST_CHECK_EQUAL(CORBA::Octet( 9), a[2]);
- BOOST_CHECK_EQUAL(CORBA::Octet(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(0UL, b.maximum());
- BOOST_CHECK_EQUAL(0UL, b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(1), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_set_length,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
-
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-using namespace boost::unit_test_framework;
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded octet sequence unit test");
-
- {
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp b/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp
deleted file mode 100644
index fd1e9aac05b..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef guard_unbounded_sequence_cdr
-#define guard_unbounded_sequence_cdr
-/**
- * @file
- *
- * @brief Extract the sequence
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- * @author Johnny Willemsen
- */
-
-#include "tao/Basic_Types.h"
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-namespace TAO {
- namespace details {
- template <typename stream, typename sequence>
- bool extract_unbounded_sequence(stream & strm, sequence & target) {
- ::CORBA::ULong new_length;
- if (!(strm >> new_length)) {
- return false;
- }
- if (new_length > strm.length()) {
- return false;
- }
- sequence tmp(new_length);
- tmp.length(new_length);
- typename sequence::value_type * buffer = tmp.get_buffer();
- for(CORBA::ULong i = 0; i < new_length; ++i) {
- if (!(strm >> buffer[i])) {
- return false;
- }
- }
- tmp.swap(target);
- return true;
- }
-
- template <typename stream, typename sequence>
- bool insert_unbounded_sequence(stream & strm, const sequence & source) {
- const CORBA::ULong length = source.length ();
- if (!(strm << length)) {
- return false;
- }
- for(CORBA::ULong i = 0; i < length; ++i) {
- if (!(strm << source[i])) {
- return false;
- }
- }
- return true;
- }
- }
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif /* guard_unbounded_sequence_cdr */
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp
deleted file mode 100644
index 53c722247c6..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of object references.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_object_reference_traits.hpp"
-#include "tao/Object_Reference_Traits_T.h"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "mock_reference.hpp"
-
-#include "tao/Unbounded_Value_Sequence_T.h"
-#include "tao/Unbounded_Object_Reference_Sequence_T.h"
-#include "tao/Unbounded_String_Sequence_T.h"
-#include "tao/Unbounded_Sequence_CDR_T.h"
-#include "tao/CDR.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-typedef unbounded_object_reference_sequence<mock_reference, mock_reference_var> tested_sequence;
-
-CORBA::Boolean operator<< (TAO_OutputCDR &strm, const tested_sequence &sequence)
-{
- return TAO::marshal_sequence(strm, sequence);
-}
-
-CORBA::Boolean operator>> (TAO_InputCDR &strm, tested_sequence &sequence)
-{
- return TAO::demarshal_sequence(strm, sequence);
-}
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
- typedef tested_sequence::const_value_type const_value_type;
-
- typedef tested_sequence::element_traits tested_element_traits;
- typedef tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = mock_reference::allocate(1);
- buf[1] = mock_reference::allocate(4);
- buf[2] = mock_reference::allocate(9);
- buf[3] = mock_reference::allocate(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK_EQUAL( 1, a[0]->id());
- BOOST_CHECK_EQUAL( 4, a[1]->id());
- BOOST_CHECK_EQUAL( 9, a[2]->id());
- BOOST_CHECK_EQUAL(16, a[3]->id());
- }
-
- void test_stream()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls s(mock_reference::marshal_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
-
- TAO_OutputCDR stream;
- stream << a;
- BOOST_CHECK_MESSAGE(s.expect(4), s);
- }
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_stream,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded object reference sequence unit test");
-
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp
deleted file mode 100644
index 0cbb69be858..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp
+++ /dev/null
@@ -1,544 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded string sequences.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_string_traits.hpp"
-#include "tao/String_Traits_T.h"
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "tao/Unbounded_String_Sequence_T.h"
-#include "tao/Unbounded_Wstring_Sequence_T.h"
-#include "tao/Unbounded_Wstring_Sequence_T.h"
-#include "tao/CORBA_String.h"
-
-#include "string_sequence_tester.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-template<class tested_sequence>
-struct Tester
-{
- typedef typename tested_sequence::character_type char_type;
- typedef string_sequence_test_helpers<char_type> helper;
- typedef typename tested_sequence::value_type value_type;
- typedef typename tested_sequence::const_value_type const_value_type;
-
- typedef typename tested_sequence::element_traits tested_element_traits;
- typedef typename tested_sequence::allocation_traits tested_allocation_traits;
- typedef TAO::details::range_checking<value_type,true> range;
-
- void test_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_copy_constructor_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- expected_calls d(tested_element_traits::duplicate_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(8);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- BOOST_CHECK_MESSAGE(i.expect(8), i);
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
-
- BOOST_CHECK_MESSAGE(d.expect(8), d);
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- BOOST_CHECK_MESSAGE(i.expect(0), i);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- BOOST_CHECK_MESSAGE(i.expect(8), i);
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls i(tested_element_traits::default_initializer_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(32);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_MESSAGE(i.expect(32), i);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence x(16), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- }
-
- void test_exception_in_length()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence y; y.length(4);
- for(CORBA::ULong i = 0; i != 4; ++i)
- {
- y[i] = helper::allocate_test_string();
- }
-
- a.reset();
- d.reset();
- r.reset();
- f.reset();
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(y.length(8), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- BOOST_CHECK_MESSAGE(d.expect(0), d);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(4), y.length());
- for(CORBA::ULong i = 0; i != 4; ++i)
- {
- BOOST_CHECK_MESSAGE(
- helper::compare_test_string(y[i]),
- "Mismatch in element " << i
- << ", got=" << y[i]);
- }
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_duplicate_exception_in_length()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls d(tested_element_traits::duplicate_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence y; y.length(4);
- for(CORBA::ULong i = 0; i != 4; ++i)
- {
- y[i] = helper::allocate_test_string();
- }
-
- a.reset();
- d.reset();
- r.reset();
- f.reset();
- tested_element_traits::duplicate_calls.failure_countdown(3);
- BOOST_CHECK_THROW(y.length(8), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(d.expect(3), d);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(4), y.length());
- for(CORBA::ULong i = 0; i != 4; ++i)
- {
- BOOST_CHECK_MESSAGE(
- helper::compare_test_string(y[i]),
- "Mismatch in element " << i
- << ", got=" << y[i]);
- }
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = helper::to_string(1);
- buf[1] = helper::to_string(4);
- buf[2] = helper::to_string(9);
- buf[3] = helper::to_string(16);
-
- return buf;
- }
-
- void check_values(tested_sequence const & a)
- {
- BOOST_CHECK(helper::compare(1, a[0]));
- BOOST_CHECK(helper::compare(4, a[1]));
- BOOST_CHECK(helper::compare(9, a[2]));
- BOOST_CHECK(helper::compare(16, a[3]));
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(true, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(0), 0);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(0), 0);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_MESSAGE(r.expect(0), r);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(0UL, b.maximum());
- BOOST_CHECK_EQUAL(0UL, b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(1), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
- void test_regression_2201()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- expected_calls r(tested_element_traits::release_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(false, a.release());
- check_values(a);
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK(helper::compare_empty(a[3]));
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- BOOST_CHECK_MESSAGE(r.expect(8), r);
- }
-
-
- void add_all(test_suite * ts)
- {
- typedef string_sequence_tester<tested_sequence> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
-
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_ulong,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_ulong_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_length,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_duplicate_exception_in_length,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201,
- shared_this));
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded string sequence unit test");
-
- {
- typedef Tester<unbounded_string_sequence> nTester;
- boost::shared_ptr<nTester> tester(nTester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef Tester<unbounded_wstring_sequence> wTester;
- boost::shared_ptr<wTester> tester(wTester::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp b/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp
deleted file mode 100644
index d3a110910bc..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp
+++ /dev/null
@@ -1,477 +0,0 @@
-/**
- * @file
- *
- * @brief Unit test for unbounded sequences of value types (integers,
- * structures, etc.)
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "testing_allocation_traits.hpp"
-#include "testing_range_checking.hpp"
-
-#include "tao/Unbounded_Value_Sequence_T.h"
-
-#include "value_sequence_tester.hpp"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-using namespace boost::unit_test_framework;
-using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO;
-
-typedef unbounded_value_sequence<int> tested_sequence;
-typedef tested_sequence::element_traits tested_element_traits;
-typedef tested_sequence::allocation_traits tested_allocation_traits;
-typedef details::range_checking<int,true> range;
-
-struct Tester
-{
- typedef tested_sequence::value_type value_type;
-
- void test_copy_constructor_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- x.length(8);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_assignment_from_ulong()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- x.length(8);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- y = x;
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), y.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), y.length());
- BOOST_CHECK_EQUAL(true, y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_ulong_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence x(16), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- }
-
- void test_set_length_less_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
-
- x.length(8);
- BOOST_CHECK_EQUAL(CORBA::ULong(16), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(8), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_set_length_more_than_maximum()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x(16);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
-
- x.length(32);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(32), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_set_length()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(x.length(8), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- value_type * alloc_and_init_buffer()
- {
- value_type * buf = tested_sequence::allocbuf(8);
- buf[0] = 1; buf[1] = 4; buf[2] = 9; buf[3] = 16;
-
- return buf;
- }
-
- void test_regression_2201 ()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- a.length (3);
- BOOST_CHECK_EQUAL(CORBA::ULong(3), a.length());
- a.length (4);
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(int(0), a[3]);
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_buffer_constructor_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_replace_default()
- {
- value_type * buffer = alloc_and_init_buffer();
-
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a;
- a.replace(8, 4, buffer);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, false);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(false, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
- tested_sequence::freebuf(buffer);
- }
-
- void test_replace_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
-
- {
- tested_sequence a;
- a.replace(8, 4, buffer, true);
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(8), a.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(4), a.length());
- BOOST_CHECK_EQUAL(buffer, a.get_buffer());
- BOOST_CHECK_EQUAL(int( 1), a[0]);
- BOOST_CHECK_EQUAL(int( 4), a[1]);
- BOOST_CHECK_EQUAL(int( 9), a[2]);
- BOOST_CHECK_EQUAL(int(16), a[3]);
- BOOST_CHECK_EQUAL(true, a.release());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_get_buffer_default()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(a.get_buffer(), buffer);
- }
-
- void test_get_buffer_true_with_release_false()
- {
- value_type * buffer = alloc_and_init_buffer();
- tested_sequence a(8, 4, buffer, false);
- BOOST_CHECK(0 == a.get_buffer(true));
- tested_sequence::freebuf(buffer);
- }
-
- void test_get_buffer_true_with_release_true()
- {
- value_type * buffer = alloc_and_init_buffer();
- expected_calls c(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence a(8, 4, buffer, true);
- BOOST_CHECK_EQUAL(buffer, a.get_buffer(true));
-
- tested_sequence const & b = a;
- BOOST_CHECK_EQUAL(0UL, b.maximum());
- BOOST_CHECK_EQUAL(0UL, b.length());
- BOOST_CHECK(0 != b.get_buffer());
- BOOST_CHECK_EQUAL(true, b.release());
-
- BOOST_CHECK_MESSAGE(c.expect(1), c);
-
- BOOST_CHECK(buffer != b.get_buffer());
- }
- BOOST_CHECK_MESSAGE(c.expect(0), c);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- tested_sequence::freebuf(buffer);
- }
-
- void add_all(test_suite * ts)
- {
- boost::shared_ptr<Tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_copy_constructor_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_assignment_from_ulong,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_ulong_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_less_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_set_length_more_than_maximum,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_exception_in_set_length,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_regression_2201 ,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_buffer_constructor_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_replace_true,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_false,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &Tester::test_get_buffer_true_with_release_true,
- shared_this));
-
- }
-
- static boost::shared_ptr<Tester> allocate()
- {
- boost::shared_ptr<Tester> ptr(new Tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- Tester() {}
-
- boost::weak_ptr<Tester> self_;
-};
-
-ACE_Proper_Export_Flag test_suite *
-init_unit_test_suite(int, char*[])
-{
- test_suite * ts =
- BOOST_TEST_SUITE("unbounded value sequence unit test");
-
- {
- boost::shared_ptr<Tester> tester(Tester::allocate());
- tester->add_all(ts);
- }
-
- {
- typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common;
- boost::shared_ptr<common> tester(common::allocate());
- tester->add_all(ts);
- }
-
- return ts;
-}
-
diff --git a/TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp b/TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp
deleted file mode 100644
index 02e88aad88e..00000000000
--- a/TAO/tests/Sequence_Unit_Tests/value_sequence_tester.hpp
+++ /dev/null
@@ -1,269 +0,0 @@
-#ifndef guard_value_sequence_tester_hpp
-#define guard_value_sequence_tester_hpp
-/**
- * @file
- *
- * @brief Helper class to implement tests for *_value_sequence
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-#include "tao/Basic_Types.h"
-
-#include <boost/test/unit_test.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-template<class tested_sequence,
- class tested_allocation_traits>
-struct value_sequence_tester
-{
- typedef typename tested_sequence::value_type value_type;
- typedef typename tested_sequence::const_value_type const_value_type;
-
- void test_default_constructor()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
-
- BOOST_CHECK_EQUAL(
- CORBA::ULong(tested_allocation_traits::default_maximum()),
- x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
- }
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
-
- void test_copy_constructor_from_default()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_EQUAL(
- CORBA::ULong(tested_allocation_traits::default_maximum()),
- x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y(x);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_EQUAL(x.maximum(), y.maximum());
- BOOST_CHECK_EQUAL(x.length(), y.length());
- BOOST_CHECK_EQUAL(x.release(), y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_index_accessor()
- {
- tested_sequence x;
- x.length(8);
-
- tested_sequence const & y = x;
- const_value_type & z = y[4];
- BOOST_CHECK_EQUAL(z, y[4]);
- }
-
- void test_index_modifier()
- {
- tested_sequence x;
- x.length(8);
-
- tested_sequence const & y = x;
- const_value_type & z = y[4];
- x[4] = 4;
- BOOST_CHECK_EQUAL(4, x[4]);
- BOOST_CHECK_EQUAL(4, y[4]);
- BOOST_CHECK_EQUAL(4, z);
- }
-
- void test_index_checking()
- {
- tested_sequence x;
- x.length(8);
-
- tested_sequence const & y = x;
- int z = 0;
-
- BOOST_CHECK_THROW(z = y[32], std::range_error);
- BOOST_CHECK_THROW(x[32] = z, std::range_error);
- }
-
- void test_copy_constructor_values()
- {
- tested_sequence a;
- a.length(16);
- for(CORBA::ULong i = 0; i != 16; ++i) a[i] = i*i;
-
- tested_sequence b(a);
- BOOST_CHECK_EQUAL(a.length(), b.length());
- for(CORBA::ULong i = 0; i != a.length(); ++i)
- {
- BOOST_CHECK_MESSAGE(a[i] == b[i],
- "Mismatched elements at index " << i);
- }
- }
-
- void test_assignment_from_default()
- {
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
- BOOST_CHECK_EQUAL(
- CORBA::ULong(tested_allocation_traits::default_maximum()),
- x.maximum());
- BOOST_CHECK_EQUAL(CORBA::ULong(0), x.length());
- BOOST_CHECK_EQUAL(true, x.release());
-
- tested_sequence y;
- BOOST_CHECK_MESSAGE(a.expect(0), a);
-
- y = x;
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- BOOST_CHECK_EQUAL(x.maximum(), y.maximum());
- BOOST_CHECK_EQUAL(x.length(), y.length());
- BOOST_CHECK_EQUAL(x.release(), y.release());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_assignment_values()
- {
- tested_sequence a;
- a.length(16);
- for(CORBA::ULong i = 0; i != 16; ++i) a[i] = i*i;
-
- tested_sequence b;
- b = a;
- BOOST_CHECK_EQUAL(a.maximum(), b.maximum());
- BOOST_CHECK_EQUAL(a.length(), b.length());
- BOOST_CHECK_EQUAL(a.release(), b.release());
- for(CORBA::ULong i = 0; i != a.length(); ++i)
- {
- BOOST_CHECK_MESSAGE(a[i] == b[i],
- "Mismatched elements at index " << i);
- }
- }
-
- void test_exception_in_copy_constructor()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x; x.length(8);
- f.reset();
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(tested_sequence y(x), testing_exception);
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- }
- BOOST_CHECK_MESSAGE(f.expect(1), f);
- }
-
- void test_exception_in_assignment()
- {
- expected_calls f(tested_allocation_traits::freebuf_calls);
- {
- tested_sequence x; x.length(2);
-
- tested_sequence y; y.length(3);
-
- expected_calls a(tested_allocation_traits::allocbuf_calls);
- f.reset();
- tested_allocation_traits::allocbuf_calls.failure_countdown(1);
- BOOST_CHECK_THROW(y = x, testing_exception);
-
- BOOST_CHECK_MESSAGE(a.expect(1), a);
- BOOST_CHECK_MESSAGE(f.expect(0), f);
-
- BOOST_CHECK_EQUAL(CORBA::ULong(3), y.length());
- }
- BOOST_CHECK_MESSAGE(f.expect(2), f);
- }
-
- void test_get_buffer_const()
- {
- tested_sequence a; a.length(4);
- tested_sequence const & b = a;
-
- value_type const * buffer = b.get_buffer();
- a[0] = 1; a[1] = 4; a[2] = 9; a[3] = 16;
-
- BOOST_CHECK_EQUAL(1, buffer[0]);
- BOOST_CHECK_EQUAL(4, buffer[1]);
- BOOST_CHECK_EQUAL(9, buffer[2]);
- BOOST_CHECK_EQUAL(16, buffer[3]);
- }
-
- void add_all(boost::unit_test_framework::test_suite * ts)
- {
- boost::shared_ptr<value_sequence_tester> shared_this(self_);
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_default_constructor,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_copy_constructor_from_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_index_accessor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_index_modifier,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_index_checking,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_copy_constructor_values,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_assignment_from_default,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_assignment_values,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_exception_in_copy_constructor,
- shared_this));
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_exception_in_assignment,
- shared_this));
-
- ts->add(BOOST_CLASS_TEST_CASE(
- &value_sequence_tester::test_get_buffer_const,
- shared_this));
- }
-
- static boost::shared_ptr<value_sequence_tester> allocate()
- {
- boost::shared_ptr<value_sequence_tester> ptr(
- new value_sequence_tester);
- ptr->self_ = ptr;
-
- return ptr;
- }
-
-private:
- value_sequence_tester() {}
-
- boost::weak_ptr<value_sequence_tester> self_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif // guard_value_sequence_tester_hpp
diff --git a/TAO/tests/Servant_To_Reference_Test/.cvsignore b/TAO/tests/Servant_To_Reference_Test/.cvsignore
deleted file mode 100644
index 254defddb53..00000000000
--- a/TAO/tests/Servant_To_Reference_Test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-server
diff --git a/TAO/tests/Servant_To_Reference_Test/Servant_to_Reference.mpc b/TAO/tests/Servant_To_Reference_Test/Servant_to_Reference.mpc
deleted file mode 100644
index 9c240b72452..00000000000
--- a/TAO/tests/Servant_To_Reference_Test/Servant_to_Reference.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver, minimum_corba {
- Source_Files {
- server.cpp
- Test_i.cpp
- TestC.cpp
- TestS.cpp
- }
-
- IDL_Files {
- Test.idl
- }
-}
-
-
-
diff --git a/TAO/tests/Servant_To_Reference_Test/Test.idl b/TAO/tests/Servant_To_Reference_Test/Test.idl
deleted file mode 100644
index 39548dcbf88..00000000000
--- a/TAO/tests/Servant_To_Reference_Test/Test.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A very simple interface
- interface One
- {
- /// Return a simple string
- string get_string ();
- };
-
- interface Two
- {
- string get_string ();
- };
-
- interface Three
- {
- string get_string ();
- };
-};
diff --git a/TAO/tests/Servant_To_Reference_Test/Test_i.cpp b/TAO/tests/Servant_To_Reference_Test/Test_i.cpp
deleted file mode 100644
index 6095fe48373..00000000000
--- a/TAO/tests/Servant_To_Reference_Test/Test_i.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// $Id$
-//
-#include "Test_i.h"
-
-ACE_RCSID(Hello, Hello, "$Id$")
-
-One_Impl::One_Impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-One_Impl::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("One_Impl there!");
-}
-
-Two_Impl::Two_Impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Two_Impl::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("One_Impl there!");
-}
-
-
-Three_Impl::Three_Impl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Three_Impl::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Three_Impl there!");
-}
diff --git a/TAO/tests/Servant_To_Reference_Test/Test_i.h b/TAO/tests/Servant_To_Reference_Test/Test_i.h
deleted file mode 100644
index 4ff3dd09b6e..00000000000
--- a/TAO/tests/Servant_To_Reference_Test/Test_i.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef HELLO_H
-#define HELLO_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-class One_Impl
- : public virtual POA_Test::One
-{
-public:
- /// Constructor
- One_Impl (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-class Two_Impl
- : public virtual POA_Test::Two
-{
-public:
- /// Constructor
- Two_Impl (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-class Three_Impl
- : public virtual POA_Test::Three
-{
-public:
- /// Constructor
- Three_Impl (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Servant_To_Reference_Test/run_test.pl b/TAO/tests/Servant_To_Reference_Test/run_test.pl
deleted file mode 100755
index dd868e17e78..00000000000
--- a/TAO/tests/Servant_To_Reference_Test/run_test.pl
+++ /dev/null
@@ -1,33 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-
-$SV->Spawn ();
-
-$server = $SV->WaitKill (120);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Servant_To_Reference_Test/server.cpp b/TAO/tests/Servant_To_Reference_Test/server.cpp
deleted file mode 100644
index 65139d0cd63..00000000000
--- a/TAO/tests/Servant_To_Reference_Test/server.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-// $Id$
-
-#include "Test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/Task.h"
-
-ACE_RCSID (Hello,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-class MT_Task : public ACE_Task_Base
-{
-public:
- MT_Task (PortableServer::POA_ptr p,
- PortableServer::Servant one,
- PortableServer::Servant two,
- PortableServer::Servant three)
- : p_ (PortableServer::POA::_duplicate (p))
- , one_ (one)
- , two_ (two)
- , three_ (three)
- {
- }
-
- int svc (void);
-
-private:
- PortableServer::POA_var p_;
- PortableServer::Servant one_;
- PortableServer::Servant two_;
- PortableServer::Servant three_;
-};
-
-int
-MT_Task::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- for (CORBA::Long i = 0;
- i != 2000;
- ++i)
- {
- CORBA::Object_var one_ref =
- this->p_->servant_to_reference (this->one_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var two_ref =
- this->p_->servant_to_reference (this->two_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var three_ref =
- this->p_->servant_to_reference (this->three_
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "(%P|%t) Caugh exception \n");
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- One_Impl *one_impl;
- ACE_NEW_RETURN (one_impl,
- One_Impl (orb.in ()),
- 1);
- Two_Impl *two_impl;
- ACE_NEW_RETURN (two_impl,
- Two_Impl (orb.in ()),
- 1);
-
- Three_Impl *three_impl;
- ACE_NEW_RETURN (three_impl,
- Three_Impl (orb.in ()),
- 1);
-
-
- PortableServer::ServantBase_var owner_transfer1 (one_impl);
- PortableServer::ServantBase_var owner_transfer2 (two_impl);
- PortableServer::ServantBase_var owner_transfer3 (three_impl);
-
- CORBA::PolicyList policies; // Empty policy list.
-
- PortableServer::POA_var first_poa =
- root_poa->create_POA ("first POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- PortableServer::ObjectId_var oid1 =
- first_poa->activate_object (one_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var oid2 =
- first_poa->activate_object (two_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::ObjectId_var oid3 =
- first_poa->activate_object (three_impl
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
- MT_Task task (first_poa.in (),
- one_impl,
- two_impl,
- three_impl);
-
- if (task.activate (THR_NEW_LWP | THR_JOINABLE,
- 32) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate threads\n"),
- 1);
-
- task.thr_mgr ()->wait ();
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - test finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Server_Connection_Purging/.cvsignore b/TAO/tests/Server_Connection_Purging/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Server_Connection_Purging/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc b/TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc
deleted file mode 100644
index a50eda03b14..00000000000
--- a/TAO/tests/Server_Connection_Purging/Server_Connection_Purging.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Server_Connection_Purging/Test.idl b/TAO/tests/Server_Connection_Purging/Test.idl
deleted file mode 100644
index ca9b3e126c0..00000000000
--- a/TAO/tests/Server_Connection_Purging/Test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-interface test
-{
- /*
- * A simple remote operation..
- */
- void send_stuff(in string foo);
-
-};
diff --git a/TAO/tests/Server_Connection_Purging/Test_i.cpp b/TAO/tests/Server_Connection_Purging/Test_i.cpp
deleted file mode 100644
index da045e2503f..00000000000
--- a/TAO/tests/Server_Connection_Purging/Test_i.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-#include "Test_i.h"
-
-void
-test_i::send_stuff (const char* string
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - %s\n", string));
-}
diff --git a/TAO/tests/Server_Connection_Purging/Test_i.h b/TAO/tests/Server_Connection_Purging/Test_i.h
deleted file mode 100644
index 0f6e923322d..00000000000
--- a/TAO/tests/Server_Connection_Purging/Test_i.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef TEST_I_H
-#define TEST_I_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-class test_i
- : public virtual POA_test
-{
-public:
- // = The skeleton methods
- virtual void send_stuff (const char* string
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-};
-
-#include /**/ "ace/post.h"
-#endif /* TEST_I_H */
diff --git a/TAO/tests/Server_Connection_Purging/client.cpp b/TAO/tests/Server_Connection_Purging/client.cpp
deleted file mode 100644
index 80d03ad751b..00000000000
--- a/TAO/tests/Server_Connection_Purging/client.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// $Id$
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-#include "ace/SOCK_Connector.h"
-#include "ace/TP_Reactor.h"
-#include "ace/Reactor.h"
-
-const char *host = "localhost";
-static int port = 10008;
-const int iter = 80;
-int purged_handles = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "h:p:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'h':
- host = get_opts.opt_arg ();
- break;
- case 'p':
- port = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-h <host> "
- "-p <port>"
- "-i <iterations>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Purging_Handler : public ACE_Event_Handler
-{
-public:
- virtual int handle_input (ACE_HANDLE h);
- virtual int handle_close (ACE_HANDLE h,
- ACE_Reactor_Mask m);
-};
-
-int
-Purging_Handler::handle_input (ACE_HANDLE )
-{
- return -1;
-}
-
-int
-Purging_Handler::handle_close (ACE_HANDLE h,
- ACE_Reactor_Mask )
-{
- if (purged_handles % 10 == 0)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) purging handle [%d] \n",
- h));
-
- ++purged_handles;
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- if (parse_args (argc, argv) == -1)
- return -1;
-
- ACE_Select_Reactor sr;
-
- ACE_Reactor reac (&sr);
-
- ACE_Reactor::instance (&reac);
-
- ACE_SOCK_Stream stream[iter];
-
- ACE_SOCK_Connector connector[iter];
-
- Purging_Handler ph[iter];
-
- ACE_INET_Addr addr (port,
- host);
-
-
- ACE_Reactor *singleton =
- ACE_Reactor::instance ();
-
- for (int i = 0; i != iter; ++i)
- {
- if (connector[i].connect (stream[i],
- addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error while connecting: %p\n",
- "client"),
- -1);
-
- if (stream[i].get_handle () == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Got invalid handles after connecting the [%d] time\n",i),
- -1);
- if (singleton->register_handler (stream[i].get_handle (),
- &ph[i],
- ACE_Event_Handler::READ_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Registration failed \n"),
- -1);
-
- ACE_Time_Value tv (1);
-
- while (singleton->handle_events (&tv) >= 1);
- }
-
- // Remove the handlers to avoid the possibility of the reactor
- // using any of them after they leave the scope (those that haven't
- // been closed and removed already, that is).
- for (int j = 0; j != iter; ++j)
- {
- singleton->remove_handler (stream[j].get_handle (),
- ACE_Event_Handler::READ_MASK);
- }
-
- if ((iter - purged_handles) > 20)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Purging hasnt worked at all \n"),
- -1);
-
- return 0;
-}
diff --git a/TAO/tests/Server_Connection_Purging/run_test.pl b/TAO/tests/Server_Connection_Purging/run_test.pl
deleted file mode 100755
index 4220bc5fc4f..00000000000
--- a/TAO/tests/Server_Connection_Purging/run_test.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-$orbport = 10000 + PerlACE::uniqueid ();
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://localhost:$orbport");
-$CL = new PerlACE::Process ("client", "-h localhost -p $orbport");
-
-print STDERR $CL->CommandLine(), "\n" ;
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (120);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Server_Connection_Purging/server.cpp b/TAO/tests/Server_Connection_Purging/server.cpp
deleted file mode 100644
index 52c7b5e6395..00000000000
--- a/TAO/tests/Server_Connection_Purging/server.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// $Id$
-
-#include "Test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- test_i *test_impl;
- ACE_NEW_RETURN (test_impl,
- test_i (),
- 1);
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- test_var test =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (120, 0);
-
- orb->run (&tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Server_Connection_Purging/svc.conf b/TAO/tests/Server_Connection_Purging/svc.conf
deleted file mode 100644
index e20a98842a7..00000000000
--- a/TAO/tests/Server_Connection_Purging/svc.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-static Resource_Factory "-ORBConnectionPurgingStrategy lru -ORBConnectionCacheMax 20 -ORBConnectionCachePurgePercentage 30"
diff --git a/TAO/tests/Server_Leaks/.cvsignore b/TAO/tests/Server_Leaks/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Server_Leaks/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Server_Leaks/Ping_Service.cpp b/TAO/tests/Server_Leaks/Ping_Service.cpp
deleted file mode 100644
index 31cf7652b1a..00000000000
--- a/TAO/tests/Server_Leaks/Ping_Service.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// $Id$
-//
-#include "Ping_Service.h"
-
-ACE_RCSID(Server_Leaks, Ping_Service, "$Id$")
-
-Ping_Service::Ping_Service (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Ping_Service::ping (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Ping_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Server_Leaks/Ping_Service.h b/TAO/tests/Server_Leaks/Ping_Service.h
deleted file mode 100644
index 8136914b8ce..00000000000
--- a/TAO/tests/Server_Leaks/Ping_Service.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef SERVER_LEAKS_PING_SERVICE_H
-#define SERVER_LEAKS_PING_SERVICE_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Ping_Service interface
-class Ping_Service
- : public virtual POA_Test::Ping_Service
-{
-public:
- /// Constructor
- Ping_Service (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual void ping (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* SERVER_LEAKS_PING_SERVICE_H */
diff --git a/TAO/tests/Server_Leaks/README b/TAO/tests/Server_Leaks/README
deleted file mode 100644
index 38faffb9dfd..00000000000
--- a/TAO/tests/Server_Leaks/README
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-
-@page Client Leaks Test README File
-
- On TAO-1.1.12 the ORB was leaking handles on the server-side.
-This test creates a single server and connection multiple clients to
-it, trying to force a fault if the resources are leaked.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Server_Leaks/Server_Leaks.mpc b/TAO/tests/Server_Leaks/Server_Leaks.mpc
deleted file mode 100644
index 4517bde0f91..00000000000
--- a/TAO/tests/Server_Leaks/Server_Leaks.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Ping_Service.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Server_Leaks/Test.idl b/TAO/tests/Server_Leaks/Test.idl
deleted file mode 100644
index 3f71918cab1..00000000000
--- a/TAO/tests/Server_Leaks/Test.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- /// An interface to communicate and shutdown a process
- interface Ping_Service
- {
- /// Just a void function contact the server
- void ping ();
-
- /// Shutdown the server
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Server_Leaks/client.cpp b/TAO/tests/Server_Leaks/client.cpp
deleted file mode 100644
index c8263903192..00000000000
--- a/TAO/tests/Server_Leaks/client.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Server_Leaks, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int do_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'x':
- do_shutdown = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-x "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Ping_Service_var ping_service =
- Test::Ping_Service::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (ping_service.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil process reference <%s>\n",
- ior),
- 1);
- }
-
- for (int i = 0; i != 10; ++i)
- {
- ping_service->ping (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- if (do_shutdown)
- {
- ping_service->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Server_Leaks/run_test.pl b/TAO/tests/Server_Leaks/run_test.pl
deleted file mode 100755
index 78d7361b657..00000000000
--- a/TAO/tests/Server_Leaks/run_test.pl
+++ /dev/null
@@ -1,87 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-use Getopt::Std;
-
-local ($opt_i);
-
-if (!getopts ('i:')) {
- print "Usage: run_test.pl [-i iterations]\n";
- exit 1;
-}
-
-$status = 0;
-my $iterations = 40;
-if (defined $opt_i) {
- $iterations = $opt_i;
-}
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$count = 0;
-for ($i = 0; $i != $iterations; $i++) {
- # First spawn all the processes
- my @CL = ();
-
- my $concurrent_clients = 30;
-
- for ($j = 0; $j != $concurrent_clients; $j++) {
- $CL[$j] = new PerlACE::Process ("client", " -k file://$iorfile");
-
- $CL[$j]->Spawn ();
- $count++;
- }
- # Now wait for each one
- for ($j = 0; $j != $concurrent_clients; $j++) {
- $client = $CL[$j]->WaitKill (5);
-
- if ($client != 0) {
- print STDERR "ERROR: client $j returned $client in iteration $i\n";
- $status = 1;
- }
- }
- if ($count % 100 == 0) {
- print STDERR "Iteration $i has created $count clients\n";
- }
-}
-
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -x");
-$client = $CL->SpawnWaitKill (20);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client during test shutdown\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Server_Leaks/server.cpp b/TAO/tests/Server_Leaks/server.cpp
deleted file mode 100644
index 0a037cdb95d..00000000000
--- a/TAO/tests/Server_Leaks/server.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// $Id$
-
-#include "Ping_Service.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Server_Leaks, server, "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Ping_Service *ping_service_impl;
- ACE_NEW_RETURN (ping_service_impl,
- Ping_Service (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(ping_service_impl);
-
- Test::Ping_Service_var ping_service =
- ping_service_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (ping_service.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Server_Port_Zero/.cvsignore b/TAO/tests/Server_Port_Zero/.cvsignore
deleted file mode 100644
index 254defddb53..00000000000
--- a/TAO/tests/Server_Port_Zero/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-server
diff --git a/TAO/tests/Server_Port_Zero/Hello.cpp b/TAO/tests/Server_Port_Zero/Hello.cpp
deleted file mode 100644
index 457b7da1064..00000000000
--- a/TAO/tests/Server_Port_Zero/Hello.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// $Id$
-//
-#include "Hello.h"
-
-ACE_RCSID(Server_Port_Zero,
- Hello,
- "$Id$")
-
-Hello::Hello (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-char *
-Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup ("Hello there!");
-}
-
-void
-Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Server_Port_Zero/Hello.h b/TAO/tests/Server_Port_Zero/Hello.h
deleted file mode 100644
index 1a404058944..00000000000
--- a/TAO/tests/Server_Port_Zero/Hello.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $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);
-
- // = The skeleton methods
- virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* HELLO_H */
diff --git a/TAO/tests/Server_Port_Zero/README b/TAO/tests/Server_Port_Zero/README
deleted file mode 100644
index b6a82e48d5c..00000000000
--- a/TAO/tests/Server_Port_Zero/README
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
-
-@page Server_Port_Zero Test README File
-
- A very simple test that checks whether the server can be
-started on port 0 using IIOP. Port 0 is reserved by TCP/IP and on
-specification of that port the OS should reserve a port
-automatically. This feature was broken sometime back. This test is to
-ensure that the bug doesn't show up again.
-*/
diff --git a/TAO/tests/Server_Port_Zero/Server_Port_Zero.mpc b/TAO/tests/Server_Port_Zero/Server_Port_Zero.mpc
deleted file mode 100644
index 4790e24fc4a..00000000000
--- a/TAO/tests/Server_Port_Zero/Server_Port_Zero.mpc
+++ /dev/null
@@ -1,11 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- Hello.cpp
- server.cpp
- }
-}
-
-
diff --git a/TAO/tests/Server_Port_Zero/Test.idl b/TAO/tests/Server_Port_Zero/Test.idl
deleted file mode 100644
index 3c0976e106d..00000000000
--- a/TAO/tests/Server_Port_Zero/Test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $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/TAO/tests/Server_Port_Zero/run_test.pl b/TAO/tests/Server_Port_Zero/run_test.pl
deleted file mode 100755
index 422f0e4e3ee..00000000000
--- a/TAO/tests/Server_Port_Zero/run_test.pl
+++ /dev/null
@@ -1,35 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-$status = 0;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Server_Port_Zero/server.cpp b/TAO/tests/Server_Port_Zero/server.cpp
deleted file mode 100644
index 4375a5c4b06..00000000000
--- a/TAO/tests/Server_Port_Zero/server.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-// $Id$
-
-#include "Hello.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Server_Port_Zero,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- 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 (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Hello *hello_impl;
- ACE_NEW_RETURN (hello_impl,
- Hello (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(hello_impl);
-
- Test::Hello_var hello =
- hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_Time_Value tv (3, 0);
-
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Single_Read/.cvsignore b/TAO/tests/Single_Read/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Single_Read/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Single_Read/README b/TAO/tests/Single_Read/README
deleted file mode 100644
index 84073bb124a..00000000000
--- a/TAO/tests/Single_Read/README
+++ /dev/null
@@ -1,18 +0,0 @@
-This is a stress test for TAO's "single read" feature. This test sends
-different sized octet sequences as one-way calls to the server. The
-server should not lose any of the calls. The client and server can be
-started like this
-
-$ server -o filename
-$ client -k file://filename -d <data_bytes> -i <iterations>
-
-The client first sends an octet sequnce of size data_bytes, then
-follows that with octet sequence of size 10 times more and follows
-that with an octet sequnce of size 10 times less than <data_bytes>
-size. This sequence of data pushing is done <iterations>
-times. Preferably <data_bytes> should be a multiple of 10 with a
-minimum value of 10.
-
-TO_DO
-----
-Make this test a multi-threaded one.
diff --git a/TAO/tests/Single_Read/Single_Read.mpc b/TAO/tests/Single_Read/Single_Read.mpc
deleted file mode 100644
index bfb96e8b536..00000000000
--- a/TAO/tests/Single_Read/Single_Read.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Single_Read/client.cpp b/TAO/tests/Single_Read/client.cpp
deleted file mode 100644
index 7e69d9350cf..00000000000
--- a/TAO/tests/Single_Read/client.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-// $Id$
-
-
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "testC.h"
-
-ACE_RCSID(Timed_Buffered_Oneways, client, "$Id$")
-
-// Name of file contains ior.
-static const char *IOR = "file://ior";
-
-// Default iterations.
-static u_long iterations = 20;
-
-// Default number of bytes to send as data.
-static CORBA::ULong data_bytes = 1000;
-
-// Flag indicates whether to shutdown remote server or not upon client
-// shutdown.
-static int shutdown_server = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:i:d:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- IOR = get_opts.opt_arg ();
- break;
- case 'i':
- iterations = ::atoi (get_opts.opt_arg ());
- break;
- case 'd':
- data_bytes = ::atoi (get_opts.opt_arg ());
- break;
- case 'x':
- shutdown_server = 1;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k IOR "
- "-i iterations "
- "-d data bytes "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- if (IOR == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify the IOR for the servant\n"), -1);
-
- if (data_bytes < 10)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify a value of more than 10 bytes\n"),
- -1);
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
- if (parse_args_result != 0)
- return parse_args_result;
-
- // Get an object reference from the argument string.
- CORBA::Object_var object =
- orb->string_to_object (IOR
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Try to narrow the object reference to a <test> reference.
- test_var test_object = test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test::data the_data0 (data_bytes);
- the_data0.length (data_bytes);
-
- data_bytes *= 10;
- test::data the_data1 (data_bytes);
- the_data1.length (data_bytes);
-
- data_bytes /= 100;
- test::data the_data2 (data_bytes);
- the_data2.length (data_bytes);
-
- for (CORBA::ULong i = 1; i <= iterations; ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client: Iteration %d @ %T\n",
- i));
-
- // Invoke the oneway method.
- test_object->method (i,
- the_data0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke the oneway method.
- test_object->method (i,
- the_data1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Invoke the oneway method.
- test_object->method (i,
- the_data2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Shutdown server.
- if (shutdown_server)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Sending a shutdown call..\n"));
- test_object->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Destroy the ORB. On some platforms, e.g., Win32, the socket
- // library is closed at the end of main(). This means that any
- // socket calls made after main() fail. Hence if we wait for
- // static destructors to flush the queues, it will be too late.
- // Therefore, we use explicit destruction here and flush the
- // queues before main() ends.
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Single_Read/run_test.pl b/TAO/tests/Single_Read/run_test.pl
deleted file mode 100755
index fc73e785a63..00000000000
--- a/TAO/tests/Single_Read/run_test.pl
+++ /dev/null
@@ -1,52 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -d 10 -i 10 -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-
-$client = $CL->SpawnWaitKill (200);
-
-if ($client != 0) {
- $time = localtime;
- print STDERR "ERROR: client returned $client at $time\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (400);
-
-if ($server != 0) {
- $time = localtime;
- print STDERR "ERROR: server returned $server at $time\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Single_Read/server.cpp b/TAO/tests/Single_Read/server.cpp
deleted file mode 100644
index 20af40930ea..00000000000
--- a/TAO/tests/Single_Read/server.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Timed_Buffered_Oneways, server, "$Id$")
-
-const char *ior_output_file = "ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- test_i servant (orb.in ());
-
- test_var server =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Single_Read/test.idl b/TAO/tests/Single_Read/test.idl
deleted file mode 100644
index 27f4c8e605f..00000000000
--- a/TAO/tests/Single_Read/test.idl
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- typedef sequence<octet> data;
-
- // A one way operation that pushes the data to the server
- oneway void method (in unsigned long req_no,
- in data d);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Single_Read/test_i.cpp b/TAO/tests/Single_Read/test_i.cpp
deleted file mode 100644
index 5125a7c9c22..00000000000
--- a/TAO/tests/Single_Read/test_i.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Single_Read, test_i, "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-test_i::method (CORBA::ULong request_number,
- const test::data &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("server: Iteration %d @ %T\n"),
- request_number));
-
- // Time required to process this request.
- ACE_Time_Value work_time (0,
- 3000 * 1000);
-
- ACE_OS::sleep (work_time);
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) About to invoke shudown... "));
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Single_Read/test_i.h b/TAO/tests/Single_Read/test_i.h
deleted file mode 100644
index 39387592b14..00000000000
--- a/TAO/tests/Single_Read/test_i.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Single_Read
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_SINGLE_READ_TEST_I_H
-#define TAO_SINGLE_READ_TEST_I_H
-
-#include "testS.h"
-
-class test_i : public POA_test
-{
- // = TITLE
- // Simple implementation.
- //
-public:
- test_i (CORBA::ORB_ptr orb);
- // ctor.
-
- // = The test interface methods.
- void method (CORBA::ULong request_number,
- const test::data &
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// The ORB.
- CORBA::ORB_var orb_;
-
-};
-
-#endif /* TAO_SINGLE_READ_TEST_I_H*/
diff --git a/TAO/tests/Smart_Proxies/.cvsignore b/TAO/tests/Smart_Proxies/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Smart_Proxies/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Smart_Proxies/Benchmark/.cvsignore b/TAO/tests/Smart_Proxies/Benchmark/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Smart_Proxies/Benchmark/README b/TAO/tests/Smart_Proxies/Benchmark/README
deleted file mode 100644
index a9cf4f9b7ca..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/README
+++ /dev/null
@@ -1,48 +0,0 @@
-$Id$
-
-Smart Proxies Overview
-----------------------
-
-Smart Proxies are a TAO extension that helps applications create
-user-defined proxies that can be used to add custom client-side
-processing and security to the default stub proxy.
-
-For details on how TAO implements Smart Proxies please see:
-
-www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/Smart_Proxies.html
-
-Smart Proxy Example
--------------------
-
-This directory contains a simple example that demostrats how the TAO
-Smart Proxy feature can be used. In this example, just a single
-method has been "smartified" to illustrate how you just implement the
-methods you wish to customize since the rest will be taken care of the
-genearated Smart Proxy base class.
-
-All you need to define in the client application is a new factory that
-will produce the kind of proxy desired by the user. This factory must
-be provided by the user and must derive from the generated
-TAO_Default_Proxy_Factory class.
-
-This is a benchmarking test for smart proxies and shows how effective it
-can be if used carefully.
-Results of this test were used for the following paper:
-http://www.cs.wustle.edu/~schmidt/PDF/COOTS-00.pdf
-
-For execution of the test:
-
-1) ./server -o test.ior
-
-2) ./client
-
--n can be used for iterations
--r can be used to toggle betn regsiteration and non-registeration
-of the smart proxy factory
-
-or simply use:
-
-run_test.pl
-
-Happy troubleshooting!
-
diff --git a/TAO/tests/Smart_Proxies/Benchmark/SP_Benchmark.mpc b/TAO/tests/Smart_Proxies/Benchmark/SP_Benchmark.mpc
deleted file mode 100644
index ea8e6a3a0d7..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/SP_Benchmark.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver, smart_proxies {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver, smart_proxies {
- Source_Files {
- client.cpp
- Smart_Proxy_Impl.cpp
- }
-}
-
diff --git a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp
deleted file mode 100644
index 949c299e773..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// $Id$
-
-#include "Smart_Proxy_Impl.h"
-Smart_Test_Factory::Smart_Test_Factory (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Smart_Test_Factory\n"));
-}
-
-Test_ptr
-Smart_Test_Factory::create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- ACE_DEBUG ((LM_DEBUG,
- "create_smart_proxy\n"));
-
- if (CORBA::is_nil (proxy) == 0)
- ACE_NEW_RETURN (proxy, Smart_Test_Proxy (proxy), 0);
-
- return proxy;
-
- }
-
-Smart_Test_Proxy::Smart_Test_Proxy (Test_ptr proxy)
- : TAO_Smart_Proxy_Base (proxy),
- price_ (0)
-{
-}
-
-CORBA::Short
-Smart_Test_Proxy::box_prices (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->price_ == 0)
- {
- this->price_ = TAO_Test_Smart_Proxy_Base::box_prices (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
- return this->price_;
-}
diff --git a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h b/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h
deleted file mode 100644
index b3ac7e0c5d9..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id$
-
-#include "testC.h"
-class Smart_Test_Factory : public virtual TAO_Test_Default_Proxy_Factory
-{
-public:
-
- Smart_Test_Factory (void);
-
- virtual Test_ptr create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- // This method will create the smart_proxy.
-};
-
-class Smart_Test_Proxy : public virtual TAO_Test_Smart_Proxy_Base
-{
-public:
- Smart_Test_Proxy (Test_ptr proxy);
-
- virtual CORBA::Short box_prices(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // "Smartify" the method call!
-
- private:
- CORBA::Short price_;
-};
diff --git a/TAO/tests/Smart_Proxies/Benchmark/client.cpp b/TAO/tests/Smart_Proxies/Benchmark/client.cpp
deleted file mode 100644
index 34732cdac90..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/client.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxies/Benchmark
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This is the client program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "testC.h"
-#include "Smart_Proxy_Impl.h"
-#include "tao/debug.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Sched_Params.h"
-#include "ace/Stats.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-#include "ace/OS_NS_errno.h"
-
-ACE_RCSID (Benchmark,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-int niterations = 5;
-int register_smart_proxy = 1;
-
-class Marker
-{
- public:
-
- void accumulate_into (ACE_Throughput_Stats &throughput) const
- {
- // Accumulate the throughput statistics into <throughput>
- throughput.accumulate (this->throughput_);
- }
- void dump_stats (const char* msg,
- ACE_UINT32 gsf)
- {
- // Print stats
- this->throughput_.dump_results (msg, gsf);
- }
- void sample (ACE_hrtime_t throughput_diff,
- ACE_hrtime_t latency_diff)
- {
- // get the sample.
- this->throughput_.sample (throughput_diff,
- latency_diff);
-
- }
- private:
- ACE_Throughput_Stats throughput_;
- // Keep throughput statistics on a per-thread basis
-};
-
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:n:r:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- ior = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case 'n':
- niterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case 'r':
- register_smart_proxy = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i -n"
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
- // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
-
- if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client (%P|%t): user is not superuser, "
- "test runs in time-shared class\n"));
- }
- else
- ACE_ERROR ((LM_ERROR,
- "client (%P|%t): sched_params failed\n"));
- }
-
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (register_smart_proxy == 1)
- {
- // To use the smart proxy it is necessary to allocate the
- // user-defined smart factory on the heap as the smart proxy
- // generated classes take care of destroying the object. This
- // way it a win situation for the application developer who
- // doesnt have to make sure to destoy it and also for the smart
- // proxy designer who now can manage the lifetime of the object
- // much surely.
-
- Smart_Test_Factory *test_factory = 0;
- ACE_NEW_RETURN (test_factory,
- Smart_Test_Factory,
- -1);
-
- ACE_UNUSED_ARG (test_factory);
- }
-
- Test_var server =
- Test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- Marker marker;
- ACE_Throughput_Stats throughput;
- int i=0;
- ACE_DEBUG ((LM_DEBUG, "High res. timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- marker.accumulate_into (throughput);
- CORBA::Short price =0;
- CORBA::Long cost =0;
- ACE_hrtime_t throughput_base = ACE_OS::gethrtime ();
- for (i = 0; i < niterations ; ++i)
- {
- // Record current time.
- ACE_hrtime_t latency_base = ACE_OS::gethrtime ();
-
- price = server->box_prices (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (price < 300)
- cost = server->tickets (5);
-
- // Grab timestamp again.
- ACE_hrtime_t now = ACE_OS::gethrtime ();
-
- // Record statistics.
- marker.sample (now - throughput_base,
- now - latency_base);
-
- ACE_TRY_CHECK;
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i));
- }
-
- marker.dump_stats ("buying tickets ", gsf);
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- /*
-
- Test_var server1 =
- Test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server1.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- Marker marker1;
- ACE_Throughput_Stats throughput1;
-
- ACE_DEBUG ((LM_DEBUG, "High res. timer calibration...."));
- ACE_UINT32 gsf1 = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG, "done\n"));
-
- marker1.accumulate_into (throughput1);
- CORBA::Short price1 =0;
- CORBA::Long cost1 =0;
- ACE_hrtime_t throughput_base1 = ACE_OS::gethrtime ();
- for (i = 0; i < niterations ; ++i)
- {
- // Record current time.
- ACE_hrtime_t latency_base = ACE_OS::gethrtime ();
-
- price1 = server1->box_prices (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (price1 < 300)
- cost = server1->tickets (5);
-
- // Grab timestamp again.
- ACE_hrtime_t now = ACE_OS::gethrtime ();
-
- // Record statistics.
- marker.sample (now - throughput_base1,
- now - latency_base);
-
- ACE_TRY_CHECK;
- if (TAO_debug_level > 0 && i % 100 == 0)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i));
- }
-
- marker1.dump_stats ("buying tickets using a default proxy ", gsf1);
-
- server1->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- */
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client-side exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/Benchmark/run_test.pl b/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
deleted file mode 100755
index ff3e0d6b952..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-
-print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", "-i file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Smart_Proxies/Benchmark/server.cpp b/TAO/tests/Smart_Proxies/Benchmark/server.cpp
deleted file mode 100644
index ca2acbcbec2..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/server.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxies/Benchmark
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// This is the server program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Benchmark, server, "$Id$")
-
-// The servant
-
-class Test_i : public POA_Test
-{
-public:
- Test_i (CORBA::ORB_ptr orb);
-
- CORBA::Short box_prices (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::Long tickets (CORBA::Short number
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Short
-Test_i::box_prices (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 125;
-}
-
-CORBA::Long
-Test_i::tickets (CORBA::Short number
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return 125 * number;
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-static const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_i servant (orb.in ());
- // Obtain RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var Test_object =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (Test_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in setting up server");
- ACE_ASSERT (0);
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/Benchmark/test.idl b/TAO/tests/Smart_Proxies/Benchmark/test.idl
deleted file mode 100644
index 4ff86645b77..00000000000
--- a/TAO/tests/Smart_Proxies/Benchmark/test.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-// $Id$
-
-interface Test
-{
- // = TITLE
- // A simple test interface
- //
- // = DESCRIPTION
- // This test demostrates the smart proxy feature in TAO
- // and shows how it can improve performace via caching.
-
- short box_prices ();
- // Get the prices for the box seats of the Broadway show.
-
- long tickets (in short number);
- // Order tickets.
-
- oneway void shutdown ();
-};
-
diff --git a/TAO/tests/Smart_Proxies/Collocation/.cvsignore b/TAO/tests/Smart_Proxies/Collocation/.cvsignore
deleted file mode 100644
index ba2906d0666..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-main
diff --git a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp
deleted file mode 100644
index fce6e571c50..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// $Id$
-
-//============================================================================
-//
-// =FILENAME
-// Collocation_Test.h
-//
-// =DESCRIPTION
-// Server class to perform testing of TAO's collocation mechanism.
-//
-// =AUTHOR
-// Nanbor Wang
-//
-//=============================================================================
-
-#include "Coll_Tester.h"
-#include "Smart_Proxy_Impl.h"
-
-Collocation_Test::Collocation_Test (void)
-{
- // no-op.
-}
-
-int
-Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL)
-{
- // Initialize the ORB.
- this->orb_ = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int result = this->parse_args (argc, argv);
- if (result != 0)
- return result;
-
- // Get an Object reference to RootPOA.
- CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Narrow the Object reference to a POA reference
- this->root_poa_ =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Get the POAManager of RootPOA
- this->poa_manager_ =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Activate the diamond servant and its base classes under RootPOA.
- PortableServer::ObjectId_var id =
- this->root_poa_->activate_object (&this->top_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-// // We only care about the most derived class here.
-// this->diamond_obj_ = this->diamond_servant_._this (ACE_ENV_SINGLE_ARG_PARAMETER);
-// ACE_CHECK_RETURN (-1);
-
- id =
- this->root_poa_->activate_object (&this->diamond_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // We only care about the most derived class here.
- this->diamond_obj_ = this->root_poa_->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- id =
- this->root_poa_->activate_object (&this->left_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- id =
- this->root_poa_->activate_object (&this->right_servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::String_var str =
- this->orb_->object_to_string (this->diamond_obj_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_DEBUG ((LM_DEBUG, "Diamond Servant activated:\n %s\n",
- str.in()));
-
- return 0;
-
-
-}
-
-int
-Collocation_Test::parse_args (int argc, char *argv[])
-{
- ACE_UNUSED_ARG(argc);
- ACE_UNUSED_ARG(argv);
- return 0;
-}
-
-int
-Collocation_Test::test_narrow (ACE_ENV_SINGLE_ARG_DECL)
-{
- // Ensure that the smart proxy is the one which is used by registering
- // the user-defined factory. Its necessary to create one on the heap so
- // the lifetime of the factory object can be managed by the framework.
- Smart_Diamond_Top_Factory *factory = 0;
- ACE_NEW_RETURN (factory,
- Smart_Diamond_Top_Factory,
- -1);
-
- Diamond::Top_var top =
- Diamond::Top::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- Diamond::Left_var left =
- Diamond::Left::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- Diamond::Right_var right =
- Diamond::Right::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- Diamond::Buttom_var buttom =
- Diamond::Buttom::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::String_var str = top->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling top->shape: %s\n", str.in ()));
-
- str = left->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling left->shape: %s\n", str.in ()));
-
- str = right->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling right->shape: %s\n", str.in ()));
-
- str = buttom->shape (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- ACE_DEBUG ((LM_DEBUG, "Calling buttom->shape: %s\n", str.in ()));
-
- return 0;
-}
-
-int
-Collocation_Test::run (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->test_narrow (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h
deleted file mode 100644
index 9e91a8f045b..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id$
-
-//============================================================================
-//
-// =FILENAME
-// Collocation_Test.h
-//
-// =DESCRIPTION
-// Server class to perform testing of TAO's collocation mechanism.
-//
-// =AUTHOR
-// Nanbor Wang
-//
-//=============================================================================
-
-#if !defined (TAO_COLLOCATION_TEST_H)
-#define TAO_COLLOCATION_TEST_H
-
-#include "Diamond_i.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-class Collocation_Test
-{
-public:
- Collocation_Test (void);
-
- int init (int argc, char *argv[] ACE_ENV_ARG_DECL_NOT_USED);
- // Initializing the Collocation_Test object.
-
- int parse_args (int argc, char *argv[]);
- // Parse the test specific arguments.
-
- int test_narrow (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // This test narrow an object reference to its base class and see
- // if it works correctly.
-
- int run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
- // Run the test.
-
-private:
- CORBA::ORB_var orb_;
-
- PortableServer::POA_var root_poa_;
-
- PortableServer::POAManager_var poa_manager_;
-
- CORBA::Object_var diamond_obj_;
- // Our basic test object.
-
- Top_i top_servant_;
- Left_i left_servant_;
- Right_i right_servant_;
- Buttom_i diamond_servant_;
- // A collection of servant for basic narrowing test.
-};
-
-#endif /* TAO_COLLOCATION_TEST_H */
diff --git a/TAO/tests/Smart_Proxies/Collocation/Diamond.idl b/TAO/tests/Smart_Proxies/Collocation/Diamond.idl
deleted file mode 100644
index 0e60b25c52c..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/Diamond.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-
-module Diamond
-{
- interface Top
- {
- string shape ();
- };
-
- interface Left : Top
- {
- string color ();
- };
-
- interface Right : Top
- {
- long width ();
- };
-
- interface Buttom : Left, Right
- {
- string name ();
- };
-};
diff --git a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp b/TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp
deleted file mode 100644
index f94a35d2c4b..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// $Id$
-
-#include "Diamond_i.h"
-
-Top_i::Top_i ()
-{
- // no-op.
-}
-
-Top_i::~Top_i ()
-{
- // No-op.
-}
-
-char *
-Top_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("a point.");
-}
-
-Left_i::Left_i ()
-{
- // No-op.
-}
-
-Left_i::~Left_i ()
-{
- // No-op.
-}
-
-char *
-Left_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("the left line");
-}
-
-char *
-Left_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("black");
-}
-
-Right_i::Right_i ()
-{
- // no-op.
-}
-
-Right_i::~Right_i ()
-{
- // no-op.
-}
-
-char *
-Right_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("the right line");
-}
-
-char *
-Right_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("red");
- //
-}
-
-CORBA::Long
-Right_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return 0;
-}
-
-Buttom_i::Buttom_i ()
-{
- // no-op.
-}
-
-Buttom_i::~Buttom_i ()
-{
- // no-op.
-}
-
-char *
-Buttom_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("a diamond");
-}
-
-char *
-Buttom_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("translucent");
-}
-
-CORBA::Long
-Buttom_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return 100;
-}
-
-char *
-Buttom_i::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return CORBA::string_dup ("Jubilee");
-}
diff --git a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.h b/TAO/tests/Smart_Proxies/Collocation/Diamond_i.h
deleted file mode 100644
index 853f34ff03d..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-
-#if !defined (TAO_DIAMOND_I_H)
-#define TAO_DIAMOND_I_H
-
-#include "DiamondS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-class Diamond_Export Top_i : public POA_Diamond::Top
-{
-public:
- Top_i (void);
- ~Top_i (void);
- // Ctor and dtor.
-
- virtual char* shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-};
-
-class Diamond_Export Left_i : public POA_Diamond::Left
-{
-public:
- Left_i (void);
- ~Left_i (void);
- // Ctor, dtor.
-
- virtual char * shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-
- virtual char * color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the color of this object (interface.)
-};
-
-class Diamond_Export Right_i : public POA_Diamond::Right
-{
-public:
- Right_i (void);
- ~Right_i (void);
- // Ctor, dtor.
-
- virtual char * shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-
- virtual char * color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the color of this object (interface.)
-
- virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the width of the stuff.
-};
-
-class Diamond_Export Buttom_i : public POA_Diamond::Buttom
-{
-public:
- Buttom_i (void);
- ~Buttom_i (void);
- // Ctor, dtor.
-
- virtual char * shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the shape of this object (interface.)
-
- virtual char * color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the color of this object (interface.)
-
- virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the width of the stuff.
-
- virtual char * name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Return the name of the object.
-};
-
-#endif /* TAO_DIAMOND_I_H */
-
diff --git a/TAO/tests/Smart_Proxies/Collocation/README b/TAO/tests/Smart_Proxies/Collocation/README
deleted file mode 100644
index bcdad70d063..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/README
+++ /dev/null
@@ -1,9 +0,0 @@
-This program performs a series of sanity check on the collocation support in TAO.
-
-After building the example, you'll get:
-
- Coll_Test_Stubs.{dll,so}: This library contains stub implementations.
-
- Diamond.{dll,so}: This library contains the implementation Diamond object.
-
- Collocation[.exe]: This program performs the collocation test. \ No newline at end of file
diff --git a/TAO/tests/Smart_Proxies/Collocation/SP_Collocation.mpc b/TAO/tests/Smart_Proxies/Collocation/SP_Collocation.mpc
deleted file mode 100644
index f98a8de4eb9..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/SP_Collocation.mpc
+++ /dev/null
@@ -1,36 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*TestStubsLib): taolib_with_idl, smart_proxies {
- sharedname = Coll_Test_Stubs
- dynamicflags += MY_STUB_BUILD_DLL
- idlflags += -Wb,stub_export_macro=MY_Stub_Export -Wb,stub_export_include=stub_export.h -Wb,skel_export_macro=Diamond_Export -Wb,skel_export_include=diamond_export.h -Gd
- Source_Files {
- DiamondC.cpp
- Smart_Proxy_Impl.cpp
- }
-}
-
-project(*DiamondLib) : taolib_with_idl, smart_proxies, portableserver {
- sharedname = Diamond
- after += *TestStubsLib
- libs += Coll_Test_Stubs
- dynamicflags += DIAMOND_BUILD_DLL
- idlflags += -Wb,stub_export_macro=MY_Stub_Export -Wb,stub_export_include=stub_export.h -Wb,skel_export_macro=Diamond_Export -Wb,skel_export_include=diamond_export.h -Gd
- Source_Files {
- Diamond_i.cpp
- DiamondS.cpp
- }
-}
-
-project(*Test): taoexe, smart_proxies, portableserver, strategies {
- after += *TestStubsLib *DiamondLib
- libs += Coll_Test_Stubs Diamond
- Source_Files {
- Coll_Tester.cpp
- main.cpp
- }
- idl_files {
- }
-}
-
diff --git a/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp
deleted file mode 100644
index 8de0a3ed17d..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id$
-
-#include "Smart_Proxy_Impl.h"
-
-#include "ace/OS_NS_string.h"
-#include "ace/Log_Msg.h"
-
-Smart_Diamond_Top_Factory::Smart_Diamond_Top_Factory (void)
-{
- ACE_DEBUG ((LM_DEBUG, "Smart_Diamond_Top_Factory\n"));
-}
-
-Diamond::Top_ptr
-Smart_Diamond_Top_Factory::create_proxy (Diamond::Top_ptr proxy
- ACE_ENV_ARG_DECL_NOT_USED
- )
- {
- ACE_DEBUG ((LM_DEBUG, "create_smart_proxy\n"));
- if (CORBA::is_nil (proxy) == 0)
- ACE_NEW_RETURN (proxy,
- Smart_Diamond_Top_Proxy (proxy),
- 0);
- return proxy;
-
- }
-
-Smart_Diamond_Top_Proxy::Smart_Diamond_Top_Proxy (Diamond::Top_ptr proxy)
- : TAO_Smart_Proxy_Base (proxy)
-{
-}
-
-char *
-Smart_Diamond_Top_Proxy::shape ( ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_DEBUG ((LM_DEBUG, "Smart_proxy: This is "));
-
- char *ans= 0;
- ACE_TRY
- {
- ans =
- ACE_OS::strdup (
- Diamond::TAO_Diamond_Top_Smart_Proxy_Base::shape (
- ACE_ENV_SINGLE_ARG_PARAMETER
- )
- );
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "%s\n", ans));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Uncaught Exception");
- return 0;
- }
- ACE_ENDTRY;
-
- return ans;
-}
diff --git a/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h b/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h
deleted file mode 100644
index 35930cf52cf..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id$
-//
-#ifndef SMART_PROXY_IMPL_H
-#define SMART_PROXY_IMPL_H
-
-#include "DiamondC.h"
-#include "stub_export.h"
-
-class MY_Stub_Export Smart_Diamond_Top_Factory : public virtual Diamond::TAO_Diamond_Top_Default_Proxy_Factory
-{
- public:
-
- Smart_Diamond_Top_Factory (void);
-
- virtual Diamond::Top_ptr create_proxy (Diamond::Top_ptr proxy
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- // This method will create the smart_proxy.
-};
-
-
-class MY_Stub_Export Smart_Diamond_Top_Proxy : public virtual Diamond::TAO_Diamond_Top_Smart_Proxy_Base
-{
- public:
-
- Smart_Diamond_Top_Proxy (Diamond::Top_ptr proxy);
-
- virtual char * shape (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
-
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- // Smartify the method call!
-
- // Dont need to add any extra functionality into shutdown()
- // hence neednt define it.
-};
-#endif /*SMART_PROXY_IMPL_H*/
diff --git a/TAO/tests/Smart_Proxies/Collocation/diamond_export.h b/TAO/tests/Smart_Proxies/Collocation/diamond_export.h
deleted file mode 100644
index fff24d8a0e5..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/diamond_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 DIAMOND_EXPORT_H
-#define DIAMOND_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (DIAMOND_HAS_DLL)
-# define DIAMOND_HAS_DLL 0
-# endif /* ! DIAMOND_HAS_DLL */
-#else
-# if !defined (DIAMOND_HAS_DLL)
-# define DIAMOND_HAS_DLL 1
-# endif /* ! DIAMOND_HAS_DLL */
-#endif
-
-#if defined (DIAMOND_HAS_DLL) && (DIAMOND_HAS_DLL == 1)
-# if defined (DIAMOND_BUILD_DLL)
-# define Diamond_Export ACE_Proper_Export_Flag
-# define DIAMOND_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define DIAMOND_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* DIAMOND_BUILD_DLL */
-# define Diamond_Export ACE_Proper_Import_Flag
-# define DIAMOND_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define DIAMOND_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* DIAMOND_BUILD_DLL */
-#else /* DIAMOND_HAS_DLL == 1 */
-# define Diamond_Export
-# define DIAMOND_SINGLETON_DECLARATION(T)
-# define DIAMOND_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* DIAMOND_HAS_DLL == 1 */
-
-#endif /* DIAMOND_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/Smart_Proxies/Collocation/main.cpp b/TAO/tests/Smart_Proxies/Collocation/main.cpp
deleted file mode 100644
index dff11cb451f..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/main.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id$
-
-#include "Coll_Tester.h"
-#include "tao/Strategies/advanced_resource.h"
-
-ACE_RCSID(Collocation, main, "$Id$")
-
-int main (int argc, char *argv[])
-{
- Collocation_Test coll_test;
-
- ACE_TRY_NEW_ENV
- {
- coll_test.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- coll_test.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Uncaught exception: ");
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/Collocation/stub_export.h b/TAO/tests/Smart_Proxies/Collocation/stub_export.h
deleted file mode 100644
index 2242f4a184e..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/stub_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 MY_STUB_EXPORT_H
-#define MY_STUB_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (MY_STUB_HAS_DLL)
-# define MY_STUB_HAS_DLL 0
-# endif /* ! MY_STUB_HAS_DLL */
-#else
-# if !defined (MY_STUB_HAS_DLL)
-# define MY_STUB_HAS_DLL 1
-# endif /* ! MY_STUB_HAS_DLL */
-#endif
-
-#if defined (MY_STUB_HAS_DLL) && (MY_STUB_HAS_DLL == 1)
-# if defined (MY_STUB_BUILD_DLL)
-# define MY_Stub_Export ACE_Proper_Export_Flag
-# define MY_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define MY_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* MY_STUB_BUILD_DLL */
-# define MY_Stub_Export ACE_Proper_Import_Flag
-# define MY_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define MY_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* MY_STUB_BUILD_DLL */
-#else /* MY_STUB_HAS_DLL == 1 */
-# define MY_Stub_Export
-# define MY_STUB_SINGLETON_DECLARATION(T)
-# define MY_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* MY_STUB_HAS_DLL == 1 */
-
-#endif /* MY_STUB_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/tests/Smart_Proxies/Collocation/svc.conf b/TAO/tests/Smart_Proxies/Collocation/svc.conf
deleted file mode 100644
index 285b1297bd4..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/svc.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-# $Id$
-#
-# Please see $TAO_ROOT/docs/Options.html for details on these options.
-#
-
-# This is a single threaded "server."
-static Advanced_Resource_Factory "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"
-
-# Make sure we use RW client handler so if something goes wrong, the program will bloc,
-# i.e., won't work.
-static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW"
-
-# Not absolutely necessary for this test, but we add it for fun.
-static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null"
diff --git a/TAO/tests/Smart_Proxies/Collocation/svc.conf.xml b/TAO/tests/Smart_Proxies/Collocation/svc.conf.xml
deleted file mode 100644
index 866550b8838..00000000000
--- a/TAO/tests/Smart_Proxies/Collocation/svc.conf.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Smart_Proxies/Collocation/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <!-- Please see $TAO_ROOT/docs/Options.html for details on these options. -->
- <!-- -->
- <!-- This is a single threaded "server." -->
- <static id="Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBConnectionCacheLock null"/>
- <!-- Make sure we use RW client handler so if something goes wrong, the program will bloc, -->
- <!-- i.e., won't work. -->
- <static id="Client_Strategy_Factory" params="-ORBProfileLock null -ORBClientConnectionHandler RW"/>
- <!-- Not absolutely necessary for this test, but we add it for fun. -->
- <static id="Server_Strategy_Factory" params="-ORBConcurrency reactive -ORBPOALock null"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Smart_Proxies/On_Demand/.cvsignore b/TAO/tests/Smart_Proxies/On_Demand/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Smart_Proxies/On_Demand/README b/TAO/tests/Smart_Proxies/On_Demand/README
deleted file mode 100644
index 3da4a0bc933..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/README
+++ /dev/null
@@ -1,43 +0,0 @@
-$Id$
-
-Smart Proxies Overview
-----------------------
-
-Smart Proxies are a TAO extension that helps applications create
-user-defined proxies that can be used to add custom client-side
-processing and security to the default stub proxy.
-
-For details on how TAO implements Smart Proxies please see:
-
-www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/Smart_Proxies.html
-
-Smart Proxy Example - On_Demand
---------------------------------
-
-This directory contains a simple example that demostrats how the TAO
-Smart Proxy feature can be used. In this example, just a single
-method has been "smartified" to illustrate how you just implement the
-methods you wish to customize since the rest will be taken care of the
-genearated Smart Proxy base class.
-
-All you need to define in the client application is a new factory that
-will produce the kind of proxy desired by the user. This factory must
-be provided by the user and must derive from the generated
-TAO_Default_Proxy_Factory class.
-
-Note:
-Here the extension to the Smart Proxy example is providing on-demand
-activation of the smart proxy via an enetry in the svc.conf file.
-
-For execution of the test:
-
-1) ./server -o test.ior
-
-2) ./client
-
-or simply use:
-
-run_test.pl
-
-Happy troubleshooting!
-
diff --git a/TAO/tests/Smart_Proxies/On_Demand/SP_On_Demand.mpc b/TAO/tests/Smart_Proxies/On_Demand/SP_On_Demand.mpc
deleted file mode 100644
index d286b8421d7..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/SP_On_Demand.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, smart_proxies {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoexe, portableserver, smart_proxies {
- Source_Files {
- client.cpp
- Smart_Proxy_Impl.cpp
- Smart_Test_Factory.cpp
- }
-}
-
diff --git a/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp
deleted file mode 100644
index 62e5232517a..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// $Id$
-#include "Smart_Proxy_Impl.h"
-
-Smart_Test_Proxy::Smart_Test_Proxy (Test_ptr proxy)
- : TAO_Smart_Proxy_Base (proxy)
-{
-}
-
-CORBA::Short
-Smart_Test_Proxy::method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Yahoo, I am smart\n"));
-
- CORBA::Short retval = 0;
- ACE_TRY
- {
- retval = TAO_Test_Smart_Proxy_Base::method (boo
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test::Oops, reason)
- {
- ACE_PRINT_EXCEPTION (reason,
- "User Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
-
diff --git a/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.h b/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.h
deleted file mode 100644
index a31d8556f36..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-class Smart_Test_Proxy : public virtual TAO_Test_Smart_Proxy_Base
-{
-public:
- Smart_Test_Proxy (Test_ptr proxy);
-
- virtual CORBA::Short method (CORBA::Short boo
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops));
- // "Smartify" the method call!
-
- // Don't need to add any extra functionality into <shutdown>, hence
- // we don't define it.
-};
diff --git a/TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.cpp b/TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.cpp
deleted file mode 100644
index 1d8380fc600..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//$Id$
-#define ACE_BUILD_SVC_DLL
-#include "Smart_Test_Factory.h"
-
-Smart_Test_Factory::Smart_Test_Factory (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Smart_Test_Factory\n"));
-}
-
-Test_ptr
-Smart_Test_Factory::create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- ACE_DEBUG ((LM_DEBUG,
- "create_smart_proxy\n"));
-
- if (CORBA::is_nil (proxy) == 0)
- ACE_NEW_RETURN (proxy, Smart_Test_Proxy (proxy), 0);
-
- return proxy;
-
- }
-
-// The following Factory is used by the <ACE_Service_Config> to
-// dynamically initialize the state of the Smart_Proxy_Factory
-ACE_SVC_FACTORY_DEFINE (Smart_Test_Factory)
diff --git a/TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.h b/TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.h
deleted file mode 100644
index fcfcc2a7517..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/Smart_Test_Factory.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-#include "Smart_Proxy_Impl.h"
-#include "ace/Service_Object.h"
-#include "ace/svc_export.h"
-
-class ACE_Svc_Export Smart_Test_Factory
- : public virtual TAO_Test_Default_Proxy_Factory,
- public virtual ACE_Service_Object
-
-{
-public:
-
- Smart_Test_Factory (void);
-
- // This method will create the smart_proxy.
- virtual Test_ptr create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-};
-
-// The following Factory is used by the ACE_Service_Config to
-// dynamically initialize the state of the Smart_Proxy_Factory
-ACE_SVC_FACTORY_DECLARE (Smart_Test_Factory)
diff --git a/TAO/tests/Smart_Proxies/On_Demand/client.cpp b/TAO/tests/Smart_Proxies/On_Demand/client.cpp
deleted file mode 100644
index 2ba4e74ca80..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/client.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxy/On_Demand
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This is the client program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#define ACE_BUILD_SVC_DLL
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Smart_Proxy, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- ior = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // To use the smart proxy just enter it as a svc.conf
- // entry.
-
- Test_var server =
- Test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
-
- server->method (0);
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client-side exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-
diff --git a/TAO/tests/Smart_Proxies/On_Demand/run_test.pl b/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
deleted file mode 100755
index 05bd093393b..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
+++ /dev/null
@@ -1,46 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", "-i file://$iorfile");
-
-print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp
deleted file mode 100644
index 5f0ebde1ffa..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxy/On_Demand
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// This is the server program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Smart_Proxy, server, "$Id$")
-
-// The servant
-
-class Test_i : public POA_Test
-{
-public:
- Test_i (CORBA::ORB_ptr orb);
-
- CORBA::Short method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Short
-Test_i :: method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Test_i::method () invoked\n")));
- if (boo == 5)
- ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"),
- -1);
-
- return 0;
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown ();
-}
-
-static const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_i servant (orb.in ());
- // Obtain RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var Test_object =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (Test_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in setting up server");
- ACE_ASSERT (0);
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/On_Demand/svc.conf b/TAO/tests/Smart_Proxies/On_Demand/svc.conf
deleted file mode 100644
index 4d8e6863165..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/svc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#$Id$
-# Dynamically configure the smart proxy
-dynamic Smart_Test_Factory Service_Object * ./Smart_Test_Factory:_make_Smart_Test_Factory() "dummy"
-
diff --git a/TAO/tests/Smart_Proxies/On_Demand/svc.conf.xml b/TAO/tests/Smart_Proxies/On_Demand/svc.conf.xml
deleted file mode 100644
index eeb9a2029ed..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/svc.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Smart_Proxies/On_Demand/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- Dynamically configure the smart proxy -->
- <dynamic id="Smart_Test_Factory" type="Service_Object">
- <initializer path="./Smart_Test_Factory" init="_make_Smart_Test_Factory" params="dummy"/>
- </dynamic>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Smart_Proxies/On_Demand/test.idl b/TAO/tests/Smart_Proxies/On_Demand/test.idl
deleted file mode 100644
index c3478d7e120..00000000000
--- a/TAO/tests/Smart_Proxies/On_Demand/test.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-
-interface Test
-{
- // = TITLE
- // Interface for testing this example.
- //
- // = DESCRIPTION
- // This interface defines a simple object
- // which has a method which can be 'smartified'
- // to provide extra functionality.
-
- exception Oops
- {
- string reason;
- };
-
- short method (in short boo) raises (Oops);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Smart_Proxies/Policy/.cvsignore b/TAO/tests/Smart_Proxies/Policy/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Smart_Proxies/Policy/README b/TAO/tests/Smart_Proxies/Policy/README
deleted file mode 100644
index f24653ec589..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/README
+++ /dev/null
@@ -1,87 +0,0 @@
-$Id$
-
-Smart Proxies Overview
-----------------------
-
-Smart Proxies are a TAO extension that helps applications create
-user-defined proxies that can be used to add custom client-side
-processing and security to the default stub proxy.
-
-For details on how TAO implements Smart Proxies please see:
-
-www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/Smart_Proxies.html
-
-Smart Proxy Example
--------------------
-
-This directory contains a simple example that demostrats how the TAO
-Smart Proxy feature can be used. In this example, just a single
-method has been "smartified" to illustrate how you just implement the
-methods you wish to customize since the rest will be taken care of the
-genearated Smart Proxy base class.
-
-All you need to define in the client application is a new factory that
-will produce the kind of proxy desired by the user. This factory must
-be provided by the user and must derive from the generated
-TAO_Default_Proxy_Factory class.
-
-This test particularly is used to test out the different policies for the
-smart proxy. If the same smart proxy is needed for the interface the
-"one-shot" policy is to be used by which once a smart proxy factory is
-registered it is retained until the program terminates. This is the default
-behavior. But if a more flexible option is desired where the smart proxy
-can be different with every instance of the target object, then the
-one-shot plolicy has to be disabled by passing a 0 at creation time.
-
-For execution of the test:
-
-1) ./server -o test1.ior
-
-2) ./server -o test2.ior
-
-2) ./client
-
-The -f0 option tries out the "per-object" policy and the -f1 (default)
-tries out the "one-shot" aka "per-interface" policy.
-
-or simply use:
-
-run_test.pl
-
-Happy troubleshooting!
-
-
-===============EXPECTED OUTPUT==========================
-running Smart Proxy test consisting of the client and two servers with <one-shot> policy
-
-Smart_Test_Factory
-create_smart_proxy
-Yahoo, I am smart
-Test_i::method () invoked
-event loop finished
-create_smart_proxy
-Yahoo, I am smart
-Test_i::method () invoked
-event loop finished
-
-running Smart Proxy test consisting of the client and two servers with <one-shot> policy disabled
-
-Smart_Test_Factory
-create_smart_proxy
-Yahoo, I am smart
-Test_i::method () invoked
-event loop finished
-Test_i::method () invoked
-event loop finished
-===========================================================================================
-
-Note: Difference in output of first two cases:
-"Yahoo, I am smart" signifies that the smart proxy is being called. In the first case,
-it is seen twice demostrating that with both servers the same kind of smart proxy was
-used since the smart proxy factory was permanent in behavior or "one-shot".
-
-While in send portion of the output, the smart proxy is used only once, that is in the
-first time around and the default proxy is called upon the second time. This is because
-the smart proxy factory gets unregistered since the "one-shot" policy is disabled.
-
-For details, please see: http://www.cs.wustl.edu/~schmidt/PDF/COOTS-00.pdf
diff --git a/TAO/tests/Smart_Proxies/Policy/SP_Policy.mpc b/TAO/tests/Smart_Proxies/Policy/SP_Policy.mpc
deleted file mode 100644
index 907dac72774..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/SP_Policy.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, smart_proxies {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, portableserver, smart_proxies {
- Source_Files {
- client.cpp
- Smart_Proxy_Impl.cpp
- }
-}
-
diff --git a/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp
deleted file mode 100644
index 4123f962892..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id$
-
-#include "Smart_Proxy_Impl.h"
-
-Smart_Test_Factory::Smart_Test_Factory (int one_shot_factory)
- : TAO_Test_Default_Proxy_Factory (one_shot_factory)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Smart_Test_Factory\n"));
-}
-
-Test_ptr
-Smart_Test_Factory::create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- ACE_DEBUG ((LM_DEBUG,
- "create_smart_proxy\n"));
-
- if (CORBA::is_nil (proxy) == 0)
- ACE_NEW_RETURN (proxy, Smart_Test_Proxy (proxy), 0);
-
- return proxy;
-
- }
-
-Smart_Test_Proxy::Smart_Test_Proxy (Test_ptr proxy)
- : TAO_Smart_Proxy_Base (proxy)
-{
-}
-
-CORBA::Short
-Smart_Test_Proxy::method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Yahoo, I am smart\n"));
-
- CORBA::Short retval = 0;
- ACE_TRY
- {
- retval = TAO_Test_Smart_Proxy_Base::method (boo
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test::Oops, reason)
- {
- ACE_PRINT_EXCEPTION (reason,
- "User Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
diff --git a/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.h b/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.h
deleted file mode 100644
index f024b4b69f7..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-class Smart_Test_Factory : public virtual TAO_Test_Default_Proxy_Factory
-{
-public:
-
- Smart_Test_Factory (int one_shot_factory = 1);
-
- virtual Test_ptr create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- // This method will create the smart_proxy.
-};
-
-class Smart_Test_Proxy : public virtual TAO_Test_Smart_Proxy_Base
-{
-public:
- Smart_Test_Proxy (Test_ptr proxy);
-
- virtual CORBA::Short method (CORBA::Short boo
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops));
- // "Smartify" the method call!
-
- // Don't need to add any extra functionality into <shutdown>, hence
- // we don't define it.
-};
diff --git a/TAO/tests/Smart_Proxies/Policy/client.cpp b/TAO/tests/Smart_Proxies/Policy/client.cpp
deleted file mode 100644
index a54fa3856f3..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/client.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxy
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This is the client program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-#include "testC.h"
-#include "Smart_Proxy_Impl.h"
-
-ACE_RCSID(Smart_Proxy, client, "$Id$")
-
-const char *ior1 = "file://test1.ior";
-const char *ior2 = "file://test2.ior";
-int one_shot_factory = 1;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:j:f:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- ior1 = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case 'j':
- ior2 = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case 'f':
- one_shot_factory = ACE_OS::atoi (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i -j -f"
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-int
-run_test (CORBA::ORB_ptr orb_ptr,
- int target)
-{
- CORBA::ORB_var orb = CORBA::ORB::_duplicate (orb_ptr);
- CORBA::Object_var object;
- ACE_TRY_NEW_ENV
- {
- if (target == 1)
- {
- object =
- orb->string_to_object (ior1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- object =
- orb->string_to_object (ior2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- Test_var server =
- Test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference is nil\n"),
- 1);
-
- server->method (0);
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client-side exception:");
- }
- ACE_ENDTRY;
-return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // To use the smart proxy it is necessary to allocate the
- // user-defined smart factory on the heap as the smart proxy
- // generated classes take care of destroying the object. This
- // way it a win situation for the application developer who
- // doesnt have to make sure to destoy it and also for the smart
- // proxy designer who now can manage the lifetime of the object
- // much surely.
- // By default this factory is permanent (i.e. registered for
- // this interface) but if there is a need for flexibility per
- // object instance then <one_shot_factory> needs to be set to 0.
- Smart_Test_Factory *test_factory = 0;
- ACE_NEW_RETURN (test_factory,
- Smart_Test_Factory (one_shot_factory),
- -1);
-
- ACE_UNUSED_ARG (test_factory);
-
- run_test (orb.in (), 1);
- run_test (orb.in (), 2);
-
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client-side exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/Policy/run_test.pl b/TAO/tests/Smart_Proxies/Policy/run_test.pl
deleted file mode 100755
index 3b4812b86a7..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/run_test.pl
+++ /dev/null
@@ -1,116 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile1 = PerlACE::LocalFile ("test1.ior");
-$iorfile2 = PerlACE::LocalFile ("test2.ior");
-
-unlink $iorfile1;
-unlink $iorfile2;
-
-$SV1 = new PerlACE::Process ("server", "-o $iorfile1");
-$SV2 = new PerlACE::Process ("server", "-o $iorfile2");
-$CL = new PerlACE::Process ("client", "-i file://$iorfile1 -j file://$iorfile2");
-
-print STDERR "\nrunning Smart Proxy test consisting of the client and two servers with <one-shot> policy\n\n";
-
-$SV1->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile1,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile1>\n";
- $SV1->Kill ();
- exit 1;
-}
-
-$SV2->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile2,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV1->Kill ();
- $SV2->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV1->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server 1 returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile1;
-
-$server = $SV2->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server 2 returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile2;
-
-print STDERR "\nrunning Smart Proxy test consisting of the client and two servers with <one-shot> policy disabled\n\n";
-
-$SV1->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile1,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile1>\n";
- $SV1->Kill ();
- exit 1;
-}
-
-$SV2->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile2,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV1->Kill ();
- $SV2->Kill ();
- exit 1;
-}
-
-$CL->Arguments ("-f0 -i file://$iorfile1 -j file://$iorfile2");
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV1->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server 1 returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile1;
-
-$server = $SV2->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server 2 returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile2;
-
-exit $status;
diff --git a/TAO/tests/Smart_Proxies/Policy/server.cpp b/TAO/tests/Smart_Proxies/Policy/server.cpp
deleted file mode 100644
index 7e000c323d3..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/server.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxy
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// This is the server program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Smart_Proxy, server, "$Id$")
-
-// The servant
-
-class Test_i : public POA_Test
-{
-public:
- Test_i (CORBA::ORB_ptr orb);
-
- CORBA::Short method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Short
-Test_i :: method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Test_i::method () invoked\n")));
- if (boo == 5)
- ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"),
- -1);
-
- return 0;
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-static const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_i servant (orb.in ());
- // Obtain RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var Test_object =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (Test_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in setting up server");
- ACE_ASSERT (0);
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/Policy/test.idl b/TAO/tests/Smart_Proxies/Policy/test.idl
deleted file mode 100644
index f870179f56d..00000000000
--- a/TAO/tests/Smart_Proxies/Policy/test.idl
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-interface Test
-{
- // = TITLE
- // A simple test interface
- //
- // = DESCRIPTION
- // This test demostrates the smart proxy feature in TAO
- // Note that though the interface has two methods just one
- // of them can be "smartified" if necessary, the other one
- // simply performs the same way as would the default proxy.
-
- exception Oops
- {
- string reason;
- };
-
- short method (in short boo) raises (Oops);
-
- oneway void shutdown ();
-};
-
diff --git a/TAO/tests/Smart_Proxies/README b/TAO/tests/Smart_Proxies/README
deleted file mode 100644
index 1cab0594585..00000000000
--- a/TAO/tests/Smart_Proxies/README
+++ /dev/null
@@ -1,39 +0,0 @@
-$Id$
-
-Smart Proxies Overview
-----------------------
-
-Smart Proxies are a TAO extension that helps applications create
-user-defined proxies that can be used to add custom client-side
-processing and security to the default stub proxy.
-
-For details on how TAO implements Smart Proxies please see:
-
-www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/Smart_Proxies.html
-
-Smart Proxy Example
--------------------
-
-This directory contains a simple example that demostrats how the TAO
-Smart Proxy feature can be used. In this example, just a single
-method has been "smartified" to illustrate how you just implement the
-methods you wish to customize since the rest will be taken care of the
-genearated Smart Proxy base class.
-
-All you need to define in the client application is a new factory that
-will produce the kind of proxy desired by the user. This factory must
-be provided by the user and must derive from the generated
-TAO_Default_Proxy_Factory class.
-
-For execution of the test:
-
-1) ./server -o test.ior
-
-2) ./client
-
-or simply use:
-
-run_test.pl
-
-Happy troubleshooting!
-
diff --git a/TAO/tests/Smart_Proxies/Smart_Proxies.mpc b/TAO/tests/Smart_Proxies/Smart_Proxies.mpc
deleted file mode 100644
index 473bc9b4087..00000000000
--- a/TAO/tests/Smart_Proxies/Smart_Proxies.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, smart_proxies {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, portableserver, smart_proxies {
- after += *Server
- Source_Files {
- testC.cpp
- Smart_Proxy_Impl.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp
deleted file mode 100644
index b49a86973b1..00000000000
--- a/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id$
-
-#include "Smart_Proxy_Impl.h"
-
-Smart_Test_Factory::Smart_Test_Factory (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Smart_Test_Factory\n"));
-}
-
-Test_ptr
-Smart_Test_Factory::create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- ACE_DEBUG ((LM_DEBUG,
- "create_smart_proxy\n"));
-
- if (CORBA::is_nil (proxy) == 0)
- ACE_NEW_RETURN (proxy, Smart_Test_Proxy (proxy), 0);
-
- return proxy;
-
- }
-
-Smart_Test_Proxy::Smart_Test_Proxy (Test_ptr proxy)
- : TAO_Smart_Proxy_Base (proxy)
-{
-}
-
-CORBA::Short
-Smart_Test_Proxy::method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops))
-{
- ACE_DEBUG ((LM_DEBUG,
- "Yahoo, I am smart\n"));
-
- CORBA::Short retval = 0;
- ACE_TRY
- {
- retval = TAO_Test_Smart_Proxy_Base::method (boo
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Test::Oops, reason)
- {
- ACE_PRINT_EXCEPTION (reason,
- "User Exception");
- return -1;
- }
- ACE_ENDTRY;
-
- return retval;
-}
diff --git a/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.h b/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.h
deleted file mode 100644
index a61d96be76d..00000000000
--- a/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-class Smart_Test_Factory : public virtual TAO_Test_Default_Proxy_Factory
-{
-public:
-
- Smart_Test_Factory (void);
-
- virtual Test_ptr create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- // This method will create the smart_proxy.
-};
-
-class Smart_Test_Proxy : public virtual TAO_Test_Smart_Proxy_Base
-{
-public:
- Smart_Test_Proxy (Test_ptr proxy);
-
- virtual CORBA::Short method (CORBA::Short boo
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops));
- // "Smartify" the method call!
-
- // Don't need to add any extra functionality into <shutdown>, hence
- // we don't define it.
-};
diff --git a/TAO/tests/Smart_Proxies/client.cpp b/TAO/tests/Smart_Proxies/client.cpp
deleted file mode 100644
index 74b28effab2..00000000000
--- a/TAO/tests/Smart_Proxies/client.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxy
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This is the client program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "Smart_Proxy_Impl.h"
-#include "ace/OS_NS_string.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Smart_Proxy, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- ior = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // To use the smart proxy it is necessary to allocate the
- // user-defined smart factory on the heap as the smart proxy
- // generated classes take care of destroying the object. This
- // way it a win situation for the application developer who
- // doesnt have to make sure to destoy it and also for the smart
- // proxy designer who now can manage the lifetime of the object
- // much surely.
- Smart_Test_Factory *test_factory = 0;
- ACE_NEW_RETURN (test_factory,
- Smart_Test_Factory,
- -1);
-
- ACE_UNUSED_ARG (test_factory);
-
- Test_var server =
- Test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
-
- server->method (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The following sleep is a hack to make sure the above oneway
- // request gets sent before we exit. Otherwise, at least on
- // Windows XP, the server may not even get the request.
- ACE_Time_Value tv (0, 100000);
- ACE_OS::sleep(tv);
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client-side exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/dtor/.cvsignore b/TAO/tests/Smart_Proxies/dtor/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Smart_Proxies/dtor/README b/TAO/tests/Smart_Proxies/dtor/README
deleted file mode 100644
index 9124b5aebf4..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/README
+++ /dev/null
@@ -1,16 +0,0 @@
-$Id$
-
-This test is to test if the destruction process
-and the _non_existent() function in the smart proxy
-is working properly.
-
-For execution of the test:
-
-1) ./server -o test.ior
-
-2) ./client
-
-or simply use:
-
-run_test.pl
-
diff --git a/TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.cpp
deleted file mode 100644
index 33354c75f64..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//$Id$
-
-#include "Smart_Proxy_Impl.h"
-
-Test_ptr
-Test_Smart_Factory::create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- // creat Smart_Proxy
- ACE_DEBUG ((LM_DEBUG,
- "create a smart_proxy\n"));
-
- if (CORBA::is_nil (proxy) == 0)
- ACE_NEW_RETURN (proxy,
- Test_Smart_Proxy(proxy),
- 0);
-
- return proxy;
-}
-
-Test_Smart_Proxy::Test_Smart_Proxy (Test_ptr proxy)
- : TAO_Smart_Proxy_Base (proxy)
-{
- dtor_called = false;
- ACE_DEBUG ((LM_DEBUG, "Smart Proxy constructor called\n"));
-}
-
-Test_Smart_Proxy::~Test_Smart_Proxy()
-{
- dtor_called = true;
- ACE_DEBUG ((LM_DEBUG, "Smart Proxy destructor called\n"));
-}
-
diff --git a/TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.h b/TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.h
deleted file mode 100644
index 481a410487a..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//$Id$
-
-#include "testC.h"
-
-extern bool dtor_called;
-
-class Test_Smart_Proxy: public virtual TAO_Test_Smart_Proxy_Base
-{
-public:
- Test_Smart_Proxy (Test_ptr proxy);
- virtual ~Test_Smart_Proxy ();
-};
-
-class Test_Smart_Factory: public TAO_Test_Default_Proxy_Factory
-{
-public:
- virtual Test_ptr create_proxy (Test_ptr proxy
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-};
diff --git a/TAO/tests/Smart_Proxies/dtor/client.cpp b/TAO/tests/Smart_Proxies/dtor/client.cpp
deleted file mode 100644
index 47c2c88884b..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/client.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-//$Id$
-
-#include "ace/OS_NS_string.h"
-#include "ace/OS_NS_unistd.h"
-#include "ace/Get_Opt.h"
-#include "testC.h"
-#include "Smart_Proxy_Impl.h"
-
-const char *ior = "file://test.ior";
-bool dtor_called;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "i:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'i':
- ior = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-i "
- "\n",
- argv [0]),
- -1);
- }
- return 0;
-}
-
-int main (int argc, char* argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var obj = orb->string_to_object (ior
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // force a scope to see the destruction of the server object
- {
- Test_Smart_Factory *test_factory = 0;
- ACE_NEW_RETURN (test_factory,
- Test_Smart_Factory,
- -1);
-
- ACE_UNUSED_ARG (test_factory);
-
- Test_var server =
- Test::_narrow(obj.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in())) {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- server->hello(3);
-
-#if (TAO_HAS_MINIMUM_CORBA == 0)
- // Testing the _non_existent function
- ACE_DEBUG ((LM_DEBUG, "Testing _non_existent()\n"));
- CORBA::Boolean ne =
- server->_non_existent(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- if (ne)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Not a Messenger object reference\n"),
- 1);
- else
- ACE_DEBUG ((LM_DEBUG,"Successfully called _non_existent()\n"));
-#endif /* TAO_HAS_MINIMUM_CORBA */
-
- server->shutdown(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The following sleep is a hack to make sure the above oneway
- // request gets sent before we exit. Otherwise, at least on
- // Windows XP, the server may not even get the request.
- ACE_Time_Value tv (0, 100000);
- ACE_OS::sleep(tv);
- }
- // here we should get the smart proxy destructor printout
- if (!dtor_called) {
- ACE_ERROR_RETURN((LM_ERROR,
- "The Smart proxy is not deleted\n"),1);
- }
-
- orb->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client-side exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/dtor/dtor.mpc b/TAO/tests/Smart_Proxies/dtor/dtor.mpc
deleted file mode 100644
index bfbcbe61031..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/dtor.mpc
+++ /dev/null
@@ -1,15 +0,0 @@
-//$Id$
-
-project(*Server): taoserver, smart_proxies {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode, smart_proxies {
- Source_Files {
- testC.cpp
- Smart_Proxy_Impl.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/Smart_Proxies/dtor/run_test.pl b/TAO/tests/Smart_Proxies/dtor/run_test.pl
deleted file mode 100755
index c6e2ba1ddbf..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/run_test.pl
+++ /dev/null
@@ -1,56 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-i file://$iorfile");
-
-print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-
-$svr = $SV->Spawn ();
-
-if ($svr != 0) {
- print STDERR "ERROR: server returned $svr\n";
- exit 1;
-}
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client == -1) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server == -1) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Smart_Proxies/dtor/server.cpp b/TAO/tests/Smart_Proxies/dtor/server.cpp
deleted file mode 100644
index fa9eadf988b..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/server.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-//$Id$
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-
-class Test_i: public virtual POA_Test
-{
-public:
- Test_i (CORBA::ORB_ptr orb);
-
- void hello (CORBA::Long howmany
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-Test_i::hello (CORBA::Long howmany
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "hello called with : %i \n", howmany));
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-static const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int main (int argc, char* argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Obtain RootPOA.
- CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA
- PortableServer::POAManager_var poa_mgr =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Create a servant
- Test_i servant (orb.in ());
-
- PortableServer::ObjectId_var oid =
- root_poa->activate_object (&servant
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- obj = root_poa->id_to_reference (oid.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (obj.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,"ior file name is null\n"),1);
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in setting up server");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/dtor/test.idl b/TAO/tests/Smart_Proxies/dtor/test.idl
deleted file mode 100644
index 5ab792d6458..00000000000
--- a/TAO/tests/Smart_Proxies/dtor/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//$Id$
-
-// This test is to ensure if the destruction process
-// and the _non_existent() function in the smart proxy
-// is working properly.
-
-
-interface Test
-{
- void hello (in long howmany);
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Smart_Proxies/run_test.pl b/TAO/tests/Smart_Proxies/run_test.pl
deleted file mode 100755
index 9ce35f6d854..00000000000
--- a/TAO/tests/Smart_Proxies/run_test.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-i file://$iorfile");
-
-print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client == -1) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server == -1) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Smart_Proxies/server.cpp b/TAO/tests/Smart_Proxies/server.cpp
deleted file mode 100644
index 0fc44b24f0f..00000000000
--- a/TAO/tests/Smart_Proxies/server.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-// $Id$
-
-//========================================================================
-//
-// = LIBRARY
-// TAO/tests/Smart_Proxy
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// This is the server program that tests TAO's Smart Proxy extension.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-//=========================================================================
-
-#include "testS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_string.h"
-
-ACE_RCSID(Smart_Proxy, server, "$Id$")
-
-// The servant
-
-class Test_i : public POA_Test
-{
-public:
- Test_i (CORBA::ORB_ptr orb);
-
- CORBA::Short method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-
-};
-
-Test_i::Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-CORBA::Short
-Test_i :: method (CORBA::Short boo
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Test::Oops))
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Test_i::method () invoked\n")));
- if (boo == 5)
- ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"),
- -1);
-
- return 0;
-}
-
-void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
-
-static const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = ACE_OS::strdup (get_opts.opt_arg ());
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Test_i servant (orb.in ());
- // Obtain RootPOA.
- CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_TRY_CHECK;
-
- // Get the POAManager of the RootPOA.
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test_var Test_object =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (Test_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file =
- ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
-
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in setting up server");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Smart_Proxies/test.idl b/TAO/tests/Smart_Proxies/test.idl
deleted file mode 100644
index f870179f56d..00000000000
--- a/TAO/tests/Smart_Proxies/test.idl
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-interface Test
-{
- // = TITLE
- // A simple test interface
- //
- // = DESCRIPTION
- // This test demostrates the smart proxy feature in TAO
- // Note that though the interface has two methods just one
- // of them can be "smartified" if necessary, the other one
- // simply performs the same way as would the default proxy.
-
- exception Oops
- {
- string reason;
- };
-
- short method (in short boo) raises (Oops);
-
- oneway void shutdown ();
-};
-
diff --git a/TAO/tests/Stack_Recursion/.cvsignore b/TAO/tests/Stack_Recursion/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Stack_Recursion/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Stack_Recursion/Client_Task.cpp b/TAO/tests/Stack_Recursion/Client_Task.cpp
deleted file mode 100644
index 58747bad1e4..00000000000
--- a/TAO/tests/Stack_Recursion/Client_Task.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// $Id$
-//
-
-#include "Client_Task.h"
-
-ACE_RCSID(Stack_Recursion,
- Client_Task,
- "$Id$")
-
-Client_Task::Client_Task (Test::Sender_ptr sender,
- CORBA::Long event_count,
- CORBA::ULong event_size,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , sender_ (Test::Sender::_duplicate (sender))
- , event_count_ (event_count)
- , event_size_ (event_size)
-{
-}
-
-int
-Client_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->validate_connections (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for (int i = 0; i != this->event_count_; ++i)
- {
-#if 0
- if (i%100 == 0)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) In iteration [%d] ....\n",
- i));
-#endif /*if 0*/
- Test::Payload_var pl = new Test::Payload;
- Test::Payload_out payload (pl.out ());
- this->sender_->get_data (this->event_size_,
- payload
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
- return 0;
-}
-
-
-void
-Client_Task::validate_connections (ACE_ENV_SINGLE_ARG_DECL)
-{
- for (int i = 0 ; i != 100; i++)
- {
- ACE_TRY
- {
- this->sender_->ping (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- }
- ACE_CATCHANY {} ACE_ENDTRY;
- }
-}
diff --git a/TAO/tests/Stack_Recursion/Client_Task.h b/TAO/tests/Stack_Recursion/Client_Task.h
deleted file mode 100644
index b52629ef5af..00000000000
--- a/TAO/tests/Stack_Recursion/Client_Task.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef STACK_RECURSION_CLIENT_TASK_H
-#define STACK_RECURSION_CLIENT_TASK_H
-#include /**/ "ace/pre.h"
-#include "TestC.h"
-
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.h"
-
-/// Implement a Task to run the experiments using multiple threads.
-class Client_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Client_Task (Test::Sender_ptr receiver,
- CORBA::Long event_count,
- CORBA::ULong event_size,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
-
- /// Simple pings to prune up the connections
- void validate_connections (ACE_ENV_SINGLE_ARG_DECL);
-
-private:
- /// Reference to the test interface
- Test::Sender_var sender_;
-
- /// Total number of events
- CORBA::Long event_count_;
-
- /// Size of each message
- CORBA::ULong event_size_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* STACK_RECURSION_CLIENT_TASK_H */
diff --git a/TAO/tests/Stack_Recursion/README b/TAO/tests/Stack_Recursion/README
deleted file mode 100644
index cc202fc7c40..00000000000
--- a/TAO/tests/Stack_Recursion/README
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-
-@page Stack_Recursion Test README File
-
- A stress test for the stack recursion outlined in the bugzilla
-under id 1125. Here is the link for the bug
-
-http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1125
-
-This test is designed to show the bug. The test has a server running 4
-threads and clients running 16 threads requesting around 30 MB of
-data.
-
-@@NOTE: Once the bug is fixed we may have to change the timings in the
-test so that the test can run to completion.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-*/ \ No newline at end of file
diff --git a/TAO/tests/Stack_Recursion/Sender.cpp b/TAO/tests/Stack_Recursion/Sender.cpp
deleted file mode 100644
index 7f897c4deee..00000000000
--- a/TAO/tests/Stack_Recursion/Sender.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// $Id$
-//
-#include "Sender.h"
-
-ACE_RCSID(Stack_Recursion,
- Sender,
- "$Id$")
-
-Sender::Sender (CORBA::ORB_ptr orb)
- : message_count_ (0)
- , byte_count_ (0)
- , orb_ (CORBA::ORB::_duplicate (orb))
- , is_done_ (false)
-{
-}
-
-void
-Sender::dump_results (void)
-{
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
- ACE_DEBUG ((LM_DEBUG,
- "Total messages = %d\n"
- "Total bytes = %d\n",
- this->message_count_,
- this->byte_count_));
-}
-
-bool
-Sender::is_done (void) const
-{
- return this->is_done_;
-}
-
-CORBA::Boolean
-Sender::get_data (CORBA::ULong size,
- Test::Payload_out payload
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
- ace_mon,
- this->mutex_,
- 0);
-
- ++this->message_count_;
- payload =
- new Test::Payload (size);
- payload->length (size);
- this->byte_count_ += size;
-
- return 1;
-}
-
-CORBA::Long
-Sender::get_event_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
- ace_mon,
- this->mutex_,
- 0);
- return this->message_count_;
-}
-
-
-void
-Sender::ping (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return;
-}
-
-void
-Sender::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->is_done_ == false)
- {
- ACE_GUARD (ACE_SYNCH_MUTEX,
- ace_mon,
- this->mutex_);
-
- if (this->is_done_ == false)
- this->is_done_ = true;
- }
-}
diff --git a/TAO/tests/Stack_Recursion/Sender.h b/TAO/tests/Stack_Recursion/Sender.h
deleted file mode 100644
index be1663cabe6..00000000000
--- a/TAO/tests/Stack_Recursion/Sender.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef STACK_RECURSION_SENDER_H
-#define STACK_RECURSION_SENDER_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Receiver interface
-/**
- * Simply print count how many bytes were received.
- */
-class Sender
- : public virtual POA_Test::Sender
-{
-public:
- /// Constructor
- Sender (CORBA::ORB_ptr orb);
-
- /// Print out the results
- void dump_results (void);
-
- /// Get the status of the flag..
- bool is_done (void) const;
-
- // = The skeleton methods
- virtual CORBA::Boolean get_data (CORBA::ULong size,
- Test::Payload_out payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Long get_event_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void ping (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- ACE_SYNCH_MUTEX mutex_;
- CORBA::ULong message_count_;
- CORBA::ULong byte_count_;
- CORBA::ORB_var orb_;
-
- bool is_done_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* MUXING_RECEIVER_H */
diff --git a/TAO/tests/Stack_Recursion/Server_Task.cpp b/TAO/tests/Stack_Recursion/Server_Task.cpp
deleted file mode 100644
index 9961c2fde5e..00000000000
--- a/TAO/tests/Stack_Recursion/Server_Task.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// $Id$
-//
-
-#include "Server_Task.h"
-#include "Sender.h"
-
-ACE_RCSID(Stack_Recusrion,
- Server_Task,
- "$Id$")
-
-Server_Task::Server_Task (CORBA::ORB_ptr orb,
- const Sender *sender,
- ACE_Thread_Manager *thr_mgr)
- : ACE_Task_Base (thr_mgr)
- , orb_ (CORBA::ORB::_duplicate (orb))
- , sender_ (sender)
-{
-}
-
-int
-Server_Task::svc (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- while (!this->sender_->is_done ())
- {
- // run the test for at most 120 seconds...
- ACE_Time_Value tv (240, 0);
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
- return 0;
-}
diff --git a/TAO/tests/Stack_Recursion/Server_Task.h b/TAO/tests/Stack_Recursion/Server_Task.h
deleted file mode 100644
index d4bc07f6a41..00000000000
--- a/TAO/tests/Stack_Recursion/Server_Task.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef STACK_RECURSION_SERVER_TASK_H
-#define STACK_RECUSRION_SERVER_TASK_H
-#include /**/ "ace/pre.h"
-#include "tao/ORB.h"
-
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/Task.h"
-
-class Sender;
-
-/// Implement a Task to run the experiments using multiple threads.
-class Server_Task : public ACE_Task_Base
-{
-public:
- /// Constructor
- Server_Task (CORBA::ORB_ptr orb,
- const Sender *ptr,
- ACE_Thread_Manager *thr_mgr);
-
- /// Thread entry point
- int svc (void);
-
-private:
- /// Reference to the ORB
- CORBA::ORB_var orb_;
-
- /// The sender pointer
- const Sender *sender_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* STACK_RECUSRION_SERVER_TASK_H */
diff --git a/TAO/tests/Stack_Recursion/Stack_Recursion.mpc b/TAO/tests/Stack_Recursion/Stack_Recursion.mpc
deleted file mode 100644
index ce10971c433..00000000000
--- a/TAO/tests/Stack_Recursion/Stack_Recursion.mpc
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- TestC.cpp
- TestS.cpp
- server.cpp
- Server_Task.cpp
- Sender.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- TestC.cpp
- client.cpp
- Client_Task.cpp
- }
-}
-
diff --git a/TAO/tests/Stack_Recursion/Test.idl b/TAO/tests/Stack_Recursion/Test.idl
deleted file mode 100644
index 91adb6e4bf6..00000000000
--- a/TAO/tests/Stack_Recursion/Test.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// $Id$
-//
-
-module Test
-{
- typedef sequence<octet> Payload;
-
- interface Sender {
-
- /// Receive a big payload
- boolean get_data (in unsigned long size,
- out Payload the_payload);
-
- /// Return the number of messages received so far
- long get_event_count ();
-
- /// Simple ping to the server
- void ping ();
-
- /// A method to shutdown the ORB
- oneway void shutdown ();
- };
-};
diff --git a/TAO/tests/Stack_Recursion/client.cpp b/TAO/tests/Stack_Recursion/client.cpp
deleted file mode 100644
index b9db252871c..00000000000
--- a/TAO/tests/Stack_Recursion/client.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// $Id$
-
-#include "Client_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Stack_Recursion,
- client,
- "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Sender_var sender =
- Test::Sender::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (sender.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil coordinator reference <%s>\n",
- ior),
- 1);
- }
-
-
- Client_Task client_task (sender.in (),
- 1000,
- 1048576,
- ACE_Thread_Manager::instance ());
-
- if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, 8, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- CORBA::Long count =
- sender->get_event_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P) - Receiver got %d messages\n",
- count));
-
- // shutdown the remote ORB
- sender->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
-
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Stack_Recursion/run_test.pl b/TAO/tests/Stack_Recursion/run_test.pl
deleted file mode 100755
index 9c66cd4a3e5..00000000000
--- a/TAO/tests/Stack_Recursion/run_test.pl
+++ /dev/null
@@ -1,53 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-@files= <core.*>;
-unlink $iorfile;
-unlink (@files);
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL->Spawn (60);
-
-$client = $CL->WaitKill (960);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-@files= <core.*>;
-#unlink (@files);
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Stack_Recursion/server.cpp b/TAO/tests/Stack_Recursion/server.cpp
deleted file mode 100644
index baa7bca0b5d..00000000000
--- a/TAO/tests/Stack_Recursion/server.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id$
-
-#include "Sender.h"
-#include "Server_Task.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Stack_Recursion,
- server,
- "$Id$")
-
-const char *ior_output_file = "test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Sender *sender_impl = 0;
- ACE_NEW_RETURN (sender_impl,
- Sender (orb.in ()),
- 1);
- PortableServer::ServantBase_var receiver_owner_transfer(sender_impl);
-
- Test::Sender_var sender =
- sender_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (sender.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Server_Task server_task (orb.in (),
- sender_impl,
- ACE_Thread_Manager::instance ());
-
- if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
- {
- ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
- }
- ACE_Thread_Manager::instance ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Now terminating test\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Strategies/.cvsignore b/TAO/tests/Strategies/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Strategies/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Strategies/README b/TAO/tests/Strategies/README
deleted file mode 100644
index d6116565696..00000000000
--- a/TAO/tests/Strategies/README
+++ /dev/null
@@ -1,20 +0,0 @@
-// $Id$
-
- This test helps show the various ways in which the default and
-advanced TAO Strategies can be dynamically loaded.
-
-The default TAO strategies are defined in tao/default_resource.cpp and
-the advanced TAO strategies are defined in
-tao/Strategies/advanced_resource.cpp.
-
- The advanced TAO strategies can be loaded dynamically or
-statically linked. To load these strategies dynamically, we need to
-use the service configurator files. But, if we need to link them
-statically, we need to link the library and include the header file.
-
- This test shows a simple case where in only the default
-strategies are used. It also shows the advanced case where in the
-advanced strategies are used.
-
- The test can be run using the perl script available or
-manually.
diff --git a/TAO/tests/Strategies/Strategies.mpc b/TAO/tests/Strategies/Strategies.mpc
deleted file mode 100644
index 77ac8271640..00000000000
--- a/TAO/tests/Strategies/Strategies.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): strategies, messaging, taoserver {
- Source_Files {
- simple_test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): strategies, messaging, taoexe, portableserver {
- after += *Server
- Source_Files {
- simple_testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Strategies/advanced_svc.conf b/TAO/tests/Strategies/advanced_svc.conf
deleted file mode 100644
index 4d54795129a..00000000000
--- a/TAO/tests/Strategies/advanced_svc.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-# $Id$
-
-#This conf file is used to load the advanced strategies.
-
-# dynamic UIOP_Factory Service_Object *TAO_Strategies:_make_TAO_UIOP_Protocol_Factory () ""
-dynamic SHMIOP_Factory Service_Object *TAO_Strategies:_make_TAO_SHMIOP_Protocol_Factory () ""
-
-dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBProtocolFactory IIOP_Factory -ORBProtocolFactory SHMIOP_Factory"
-# dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIOP_Factory -ORBProtocolFactory SHMIOP_Factory"
-
-#static Resource_Factory "-ORBReactorType select_mt -ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIOP_Factory -ORBProtocolFactory SHMIOP_Factory"
-
diff --git a/TAO/tests/Strategies/advanced_svc.conf.xml b/TAO/tests/Strategies/advanced_svc.conf.xml
deleted file mode 100644
index 10abbe0a61e..00000000000
--- a/TAO/tests/Strategies/advanced_svc.conf.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Strategies/advanced_svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- This conf file is used to load the advanced strategies. -->
- <!-- dynamic UIOP_Factory Service_Object *TAO_Strategies:_make_TAO_UIOP_Protocol_Factory () "" -->
- <dynamic id="SHMIOP_Factory" type="Service_Object">
- <initializer path="TAO_Strategies" init="_make_TAO_SHMIOP_Protocol_Factory"/>
- </dynamic>
- <dynamic id="Advanced_Resource_Factory" type="Service_Object">
- <initializer path="TAO_Strategies" init="_make_TAO_Advanced_Resource_Factory" params="-ORBReactorType select_st -ORBInputCDRAllocator null -ORBProtocolFactory IIOP_Factory -ORBProtocolFactory SHMIOP_Factory"/>
- </dynamic>
- <!-- dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorType select_st -ORBInputCDRAllocator null -ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIOP_Factory -ORBProtocolFactory SHMIOP_Factory" -->
- <!-- static Resource_Factory "-ORBReactorType select_mt -ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIOP_Factory -ORBProtocolFactory SHMIOP_Factory" -->
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Strategies/client.cpp b/TAO/tests/Strategies/client.cpp
deleted file mode 100644
index a554f94fea5..00000000000
--- a/TAO/tests/Strategies/client.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-#include "simple_testC.h"
-
-ACE_RCSID(tests, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int server_shutdown = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case 'x':
- server_shutdown = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-class Client
-{
- // = TITLE
- // Defines a class that is used to test and understand the
- // different ways of loading the default and advanced TAO
- // strategies.
- //
- // = DESCRIPTION
- // A simple client which receives the CORBA boolean variabel
- // from the server to indicate that everything went on good.
- //
-public:
- Client ();
- // ctor
-
-};
-
-// ****************************************************************
-
-Client::Client ()
-{
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- // Invoke a request on the server
- CORBA::Boolean ret_value =
- server->print_status (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ret_value == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "The server has been contacted !!\n",
- 0));
- }
-
- if (server_shutdown)
- {
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Strategies/run_test.pl b/TAO/tests/Strategies/run_test.pl
deleted file mode 100755
index 7b1e481357b..00000000000
--- a/TAO/tests/Strategies/run_test.pl
+++ /dev/null
@@ -1,88 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-$svcconf = PerlACE::LocalFile ("svc$PerlACE::svcconf_ext");
-$advsvcconf = PerlACE::LocalFile ("advanced_svc$PerlACE::svcconf_ext");
-
-print "$svcconf\n";
-unlink $iorfile;
-
-
-# Run with a static configuration
-
-$SV = new PerlACE::Process ("server", "-o $iorfile -ORBSvcConf $svcconf");
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -x -ORBSvcConf $svcconf");
-
-print STDERR "\nrunning Strategies test with static config\n\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-
-# Run using dynamic configuration (and the Advanced_Resource_Factory)
-# This will fail for builds lacking dynamic libraries.
-
-$SV2 = new PerlACE::Process ("server",
- "-o $iorfile -ORBSvcConf $advsvcconf");
-$CL2 = new PerlACE::Process ("client",
- "-k file://$iorfile -x -ORBSvcConf $advsvcconf");
-
-print STDERR "\nrunning Strategies test with dynamic config\n\n";
-
-$SV2->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV2->Kill ();
- exit 1;
-}
-
-$client = $CL2->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV2->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Strategies/server.cpp b/TAO/tests/Strategies/server.cpp
deleted file mode 100644
index 9e1de742de4..00000000000
--- a/TAO/tests/Strategies/server.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "simple_test_i.h"
-
-ACE_RCSID(tests, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Strategies/simple_test.idl b/TAO/tests/Strategies/simple_test.idl
deleted file mode 100644
index 7dd811b8ffd..00000000000
--- a/TAO/tests/Strategies/simple_test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * $Id$
- */
-
-interface Simple_Server
-{
- boolean print_status ();
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Strategies/simple_test_i.cpp b/TAO/tests/Strategies/simple_test_i.cpp
deleted file mode 100644
index f6ca0ea9a94..00000000000
--- a/TAO/tests/Strategies/simple_test_i.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id$
-
-#include "simple_test_i.h"
-#include "tao/debug.h"
-
-#if !defined(__ACE_INLINE__)
-#include "simple_test_i.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(tests, simple_test_i, "$Id$")
-
-CORBA::Boolean
-Simple_Server_i::print_status (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "%N:%l:(%P:%t):Simple_Server_i::print_status called\n"));
- return 0;
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/Strategies/simple_test_i.h b/TAO/tests/Strategies/simple_test_i.h
deleted file mode 100644
index ad353e0a263..00000000000
--- a/TAO/tests/Strategies/simple_test_i.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tao/Strategies/tests/
-//
-// = FILENAME
-// simple_test_i.h
-//
-// = AUTHOR
-// Priyanka Gontla <pgontla@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_STRATEGIES_TEST_I_H
-#define TAO_STRATEGIES_TEST_I_H
-
-#include "simple_testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Boolean print_status (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
-
-#if defined(__ACE_INLINE__)
-#include "simple_test_i.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_STRATEGIES_I_H */
diff --git a/TAO/tests/Strategies/simple_test_i.i b/TAO/tests/Strategies/simple_test_i.i
deleted file mode 100644
index ed9a04eb108..00000000000
--- a/TAO/tests/Strategies/simple_test_i.i
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-ACE_INLINE
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
diff --git a/TAO/tests/Strategies/svc.conf b/TAO/tests/Strategies/svc.conf
deleted file mode 100644
index 4d648b28256..00000000000
--- a/TAO/tests/Strategies/svc.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-# $Id$
-#
-
-# This configuration file is used to use only the default TAO
-# strategies
-
-static Resource_Factory "-ORBProtocolFactory IIOP_Factory"
-
-
diff --git a/TAO/tests/Strategies/svc.conf.xml b/TAO/tests/Strategies/svc.conf.xml
deleted file mode 100644
index cebfc28bbb2..00000000000
--- a/TAO/tests/Strategies/svc.conf.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<!-- Converted from ./tests/Strategies/svc.conf by svcconf-convert.pl -->
-<ACE_Svc_Conf>
- <!-- $Id$ -->
- <!-- -->
- <!-- This configuration file is used to use only the default TAO -->
- <!-- strategies -->
- <static id="Resource_Factory" params="-ORBProtocolFactory IIOP_Factory"/>
-</ACE_Svc_Conf>
diff --git a/TAO/tests/Timed_Buffered_Oneways/.cvsignore b/TAO/tests/Timed_Buffered_Oneways/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Timed_Buffered_Oneways/README b/TAO/tests/Timed_Buffered_Oneways/README
deleted file mode 100644
index 41888706f3d..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/README
+++ /dev/null
@@ -1,32 +0,0 @@
-# $Id$
-
-Description:
-
-This is a test for oneways with buffering and timing constraints. The
-client sends is setup to send large requests to the server. The
-server is setup to take a long time to process these requests. The
-combination will cause flow control for the client. The timing
-constraints on the client ORB will prevent the client from blocking
-because of flow control. The request is queued up for later delivery
-once the flow control subsides.
-
-Controlling the test:
-
-The client invokes a oneway of size <data_bytes> after every
-<interval> amount of time. The amount of time taken by the server to
-process the request is <remote_work>. Blocking on the client is
-prevented by <roundtrip_timeout>.
-
-Expected output:
-
-The client should be able to make steady progress, i.e., should not be
-effected by flow control, while the server is slow to catch up. At
-the end of the client application, it will block to make sure that any
-unsent data is delivered to the server.
-
-How to run:
-
-You can use the run_test.pl script to run it or:
-
-$ server
-$ client
diff --git a/TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc b/TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc
deleted file mode 100644
index 1bd7978c70a..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/Timed_Buffered_Oneways.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): messaging, taoexe, portableserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): messaging, taoexe, portableserver {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Timed_Buffered_Oneways/client.cpp b/TAO/tests/Timed_Buffered_Oneways/client.cpp
deleted file mode 100644
index 9878f57d8b8..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/client.cpp
+++ /dev/null
@@ -1,330 +0,0 @@
-// $Id$
-
-// ================================================================
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// This is a client that uses oneways with buffering constraints
-// and roundtrip timeout constraints.
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ================================================================
-
-#include "testC.h"
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/TAOA.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/TAOC.h"
-#include "ace/Get_Opt.h"
-#include "ace/Read_Buffer.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Timed_Buffered_Oneways, client, "$Id$")
-
-// Eager buffering option.
-static int eager_buffering = 0;
-
-// Name of file contains ior.
-static const char *IOR = "file://ior";
-
-// Default iterations.
-static u_long iterations = 20;
-
-// Default number of bytes to send as data.
-static CORBA::ULong data_bytes = 100000;
-
-// Default roundtrip timeout (in milli seconds).
-static long timeout = 500;
-
-// Default amount of work.
-static CORBA::ULong work = 3000;
-
-// Time interval between invocation (in milli seconds).
-static u_long interval = 500;
-
-// Flag indicates whether to shutdown remote server or not upon client
-// shutdown.
-static int shutdown_server = 0;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "ek:i:d:t:w:z:x");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'e':
- eager_buffering = 1;
- break;
-
- case 'k':
- IOR = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'd':
- data_bytes = ::atoi (get_opts.opt_arg ());
- break;
-
- case 't':
- timeout = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'w':
- work = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'z':
- interval = ::atoi (get_opts.opt_arg ());
- break;
-
- case 'x':
- shutdown_server = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-e eager buffering [default is delayed] "
- "-k IOR "
- "-i iterations "
- "-d data bytes "
- "-t roundtrip timeout "
- "-w remote work "
- "-z interval between calls "
- "-x shutdown server "
- "\n",
- argv [0]),
- -1);
- }
-
- if (IOR == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify the IOR for the servant\n"), -1);
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-void
-setup_timeouts (CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
-{
- // Escape value.
- if (timeout == -1)
- return;
-
- // Obtain PolicyCurrent.
- CORBA::Object_var object = orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Narrow down to correct type.
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- TimeBase::TimeT rt_timeout = 10000 * timeout;
-
- CORBA::Any rt_timeout_any;
- rt_timeout_any <<= rt_timeout;
-
- CORBA::PolicyList rt_timeout_policy_list (1);
- rt_timeout_policy_list.length (1);
-
- rt_timeout_policy_list[0] =
- orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- rt_timeout_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policy_current->set_policy_overrides (rt_timeout_policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- rt_timeout_policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-setup_buffering_constraints (CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
-{
- // Obtain PolicyCurrent.
- CORBA::Object_var object = orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Narrow down to correct type.
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Setup the sync scope policy, i.e., the ORB will buffer oneways.
- Messaging::SyncScope sync =
- eager_buffering ? TAO::SYNC_EAGER_BUFFERING : TAO::SYNC_DELAYED_BUFFERING;
-
- // Setup the sync scope any.
- CORBA::Any sync_any;
- sync_any <<= sync;
-
- // Setup the sync scope policy list.
- CORBA::PolicyList sync_policy_list (1);
- sync_policy_list.length (1);
-
- // Setup the sync scope policy.
- sync_policy_list[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- sync_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Setup the sync scope.
- policy_current->set_policy_overrides (sync_policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // We are now done with this policy.
- sync_policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Flush buffers.
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_FLUSH;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = 0;
-
- // Setup the buffering constraint any.
- CORBA::Any buffering_constraint_any;
- buffering_constraint_any <<= buffering_constraint;
-
- // Setup the buffering constraint policy list.
- CORBA::PolicyList buffering_constraint_policy_list (1);
- buffering_constraint_policy_list.length (1);
-
- // Setup the buffering constraint policy.
- buffering_constraint_policy_list[0] =
- orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_constraint_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Setup the constraints.
- policy_current->set_policy_overrides (buffering_constraint_policy_list,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // We are done with the policy.
- buffering_constraint_policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-main (int argc, char **argv)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
- if (parse_args_result != 0)
- return parse_args_result;
-
- // Get an object reference from the argument string.
- CORBA::Object_var object =
- orb->string_to_object (IOR
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Try to narrow the object reference to a <test> reference.
- test_var test_object = test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Setup buffering.
- setup_buffering_constraints (orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Setup timeout.
- setup_timeouts (orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- test::data the_data (data_bytes);
- the_data.length (data_bytes);
-
- for (CORBA::ULong i = 1; i <= iterations; ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "client: Iteration %d @ %T\n",
- i));
-
- // Invoke the oneway method.
- test_object->method (i,
- the_data,
- work
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Interval between successive calls.
- ACE_Time_Value sleep_interval (0,
- interval * 1000);
-
- ACE_OS::sleep (sleep_interval);
- }
-
- // Shutdown server.
- if (shutdown_server)
- {
- test_object->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // Destroy the ORB. On some platforms, e.g., Win32, the socket
- // library is closed at the end of main(). This means that any
- // socket calls made after main() fail. Hence if we wait for
- // static destructors to flush the queues, it will be too late.
- // Therefore, we use explicit destruction here and flush the
- // queues before main() ends.
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Client side exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
diff --git a/TAO/tests/Timed_Buffered_Oneways/run_test.pl b/TAO/tests/Timed_Buffered_Oneways/run_test.pl
deleted file mode 100755
index b533838ee93..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/run_test.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (200);
-
-if ($client != 0) {
- $time = localtime;
- print STDERR "ERROR: client returned $client at $time\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (100);
-
-if ($server != 0) {
- $time = localtime;
- print STDERR "ERROR: server returned $server at $time\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Timed_Buffered_Oneways/server.cpp b/TAO/tests/Timed_Buffered_Oneways/server.cpp
deleted file mode 100644
index 20af40930ea..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/server.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "test_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Timed_Buffered_Oneways, server, "$Id$")
-
-const char *ior_output_file = "ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- test_i servant (orb.in ());
-
- test_var server =
- servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Timed_Buffered_Oneways/test.idl b/TAO/tests/Timed_Buffered_Oneways/test.idl
deleted file mode 100644
index ce512ae6fb2..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// $Id$
-//
-
-interface test
-{
- typedef sequence<octet> data;
- oneway void method (in unsigned long request_number,
- in data d,
- in unsigned long work);
-
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Timed_Buffered_Oneways/test_i.cpp b/TAO/tests/Timed_Buffered_Oneways/test_i.cpp
deleted file mode 100644
index 159c09067ec..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/test_i.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Timed_Buffered_Oneways, test_i, "$Id$")
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-void
-test_i::method (CORBA::ULong request_number,
- const test::data &,
- CORBA::ULong work
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "server: Iteration %d @ %T\n",
- request_number));
-
- // Time required to process this request. <work> is time units in
- // milli seconds.
- ACE_Time_Value work_time (0,
- work * 1000);
-
- ACE_OS::sleep (work_time);
-}
-
-void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Timed_Buffered_Oneways/test_i.h b/TAO/tests/Timed_Buffered_Oneways/test_i.h
deleted file mode 100644
index 48b20f4057f..00000000000
--- a/TAO/tests/Timed_Buffered_Oneways/test_i.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Timed_Buffered_Oneways/
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef TAO_TIMED_BUFFERED_ONEWAYS_TEST_I_H
-#define TAO_TIMED_BUFFERED_ONEWAYS_TEST_I_H
-
-#include "testS.h"
-
-class test_i : public POA_test
-{
- // = TITLE
- // Simple implementation.
- //
-public:
- test_i (CORBA::ORB_ptr orb);
- // ctor.
-
- // = The test interface methods.
- void method (CORBA::ULong request_number,
- const test::data &,
- CORBA::ULong work
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB.
-};
-
-#endif /* TAO_TIMED_BUFFERED_ONEWAYS_TEST_I_H */
diff --git a/TAO/tests/Timeout/.cvsignore b/TAO/tests/Timeout/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Timeout/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Timeout/README b/TAO/tests/Timeout/README
deleted file mode 100644
index 4528b52fdcd..00000000000
--- a/TAO/tests/Timeout/README
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Id$
-
- A simple test for timeouts. The client sets each one of the
-policy overrides (object, thread and ORB) and issues requests using
-those policies. The requests take a client controlled amount of time
-on the server.
-
- As the client increases the duration of the request the
-requests should start to timeout.
-
- To run it do:
-
-$ server -o test.ior
-$ client -k file://test.ior -l 5 -h 15
-
- or use the run_test.pl script.
diff --git a/TAO/tests/Timeout/Timeout.mpc b/TAO/tests/Timeout/Timeout.mpc
deleted file mode 100644
index 5826c607d6e..00000000000
--- a/TAO/tests/Timeout/Timeout.mpc
+++ /dev/null
@@ -1,18 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- test_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, messaging {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Timeout/client.cpp b/TAO/tests/Timeout/client.cpp
deleted file mode 100644
index 7d0ff876ea7..00000000000
--- a/TAO/tests/Timeout/client.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-// $Id$
-
-#include "testC.h"
-
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Timeout, client, "$Id$")
-
-const char *ior = "file://test.ior";
-int min_timeout = 0;
-int max_timeout = 20;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:l:h:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'l':
- min_timeout = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'h':
- max_timeout = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "-l <min_timeout> "
- "-h <max_timeout> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-static int timeout_count = 0;
-static int in_time_count = 0;
-
-void
-send_echo (CORBA::ORB_ptr orb,
- Simple_Server_ptr server,
- CORBA::Long t
- ACE_ENV_ARG_DECL)
-{
- ACE_TRY
- {
- server->echo (0, t ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- in_time_count++;
- }
- ACE_CATCH (CORBA::TIMEOUT, timeout)
- {
- timeout_count++;
-
- // Trap this exception and continue...
- // ACE_DEBUG ((LM_DEBUG,
- // "==> Trapped a TIMEOUT exception (expected)\n"));
-
- // Sleep so the server can send the reply...
- ACE_Time_Value tv (max_timeout / 1000,
- (max_timeout % 1000) * 1000);
-
- // This is a non-standard TAO call that's used to give the
- // client ORB a chance to cleanup the reply that's come back
- // from the server.
- orb->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_ENDTRY;
-}
-
-
-int main (int argc, char* argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Object reference <%s> is nil\n",
- ior),
- 1);
- }
-
- object =
- orb->resolve_initial_references ("ORBPolicyManager"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyManager_var policy_manager =
- CORBA::PolicyManager::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TimeBase::TimeT mid_value =
- 10000 * (min_timeout + max_timeout) / 2;
-
- CORBA::Any any_orb;
- any_orb <<= mid_value;
- CORBA::Any any_thread;
- any_thread <<= mid_value + 10000;
- CORBA::Any any_object;
- any_object <<= mid_value + 20000;
-
- CORBA::PolicyList policy_list (1);
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- any_object
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- object =
- server->_set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_var timeout_server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policy_list[0] = CORBA::Policy::_nil ();
-
- ACE_DEBUG ((LM_DEBUG,
- "client (%P) testing from %d to %d milliseconds\n",
- min_timeout, max_timeout));
-
- for (CORBA::Long t = min_timeout; t != max_timeout; ++t)
- {
- //ACE_DEBUG ((LM_DEBUG,
- // "\n================================\n"
- // "Trying with timeout = %d\n", t));
-
- // ACE_DEBUG ((LM_DEBUG,
- // "Cleanup ORB/Thread/Object policies\n"));
-
- policy_list.length (0);
- policy_manager->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- send_echo (orb.in (), server.in (), t ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG,
- // "client(%P) Set the ORB policies\n"));
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- any_orb
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_manager->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- send_echo (orb.in (), server.in (), t ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG,
- // "client(%P) Set the thread policies\n"));
-
- policy_list.length (1);
- policy_list[0] =
- orb->create_policy (Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
- any_thread
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- send_echo (orb.in (), server.in (), t ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG,
- // "client(%P) Use the object policies\n"));
- send_echo (orb.in (), timeout_server.in (), t ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- // ACE_DEBUG ((LM_DEBUG,
- // "\n\n\nclient(%P) Test completed, "
- // "resynch with server\n"));
- policy_list.length (0);
- policy_manager->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policy_current->set_policy_overrides (policy_list,
- CORBA::SET_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- send_echo (orb.in (), server.in (), 0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (timeout_count == 0)
- ACE_ERROR ((LM_ERROR,
- "ERROR: No messaged timed out\n"));
-
- if (in_time_count == 0)
- ACE_ERROR ((LM_ERROR,
- "ERROR: No messages on time\n"));
-
- ACE_DEBUG ((LM_DEBUG, "In time = %d, timed out = %d\n",
- in_time_count, timeout_count));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Timeout/run_test.pl b/TAO/tests/Timeout/run_test.pl
deleted file mode 100755
index dd503620fd3..00000000000
--- a/TAO/tests/Timeout/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-ORBDebugLevel 0 -k file://$iorfile -l 2 -h 28");
-
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Timeout/server.cpp b/TAO/tests/Timeout/server.cpp
deleted file mode 100644
index 3fd05a6c9db..00000000000
--- a/TAO/tests/Timeout/server.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Timeout, server, "$Id$")
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
-
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Simple_Server_i server_impl (orb.in ());
-
- Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Timeout/test.idl b/TAO/tests/Timeout/test.idl
deleted file mode 100644
index 5481e3f26f0..00000000000
--- a/TAO/tests/Timeout/test.idl
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// $Id$
-//
-
-interface Simple_Server {
-
- /// Returns <x>, but sleep for <msecs> milliseconds before returning
- long echo (in long x, in long msecs);
-
- /// Shutdown the ORB
- oneway void shutdown ();
-};
diff --git a/TAO/tests/Timeout/test_i.cpp b/TAO/tests/Timeout/test_i.cpp
deleted file mode 100644
index 00d5ddfd698..00000000000
--- a/TAO/tests/Timeout/test_i.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Timeout, test_i, "$Id$")
-
-Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-
-}
-
-CORBA::Long
-Simple_Server_i::echo (CORBA::Long x,
- CORBA::Long msecs
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_Time_Value tv (msecs / 1000, (msecs % 1000) * 1000);
-
- // ACE_DEBUG ((LM_DEBUG, "server (%P) Sleeping for %d msecs\n",
- // tv.msec ()));
- ACE_OS::sleep (tv);
-
- return x;
-}
-
-void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "server (%P) Received shutdown request from client\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Timeout/test_i.h b/TAO/tests/Timeout/test_i.h
deleted file mode 100644
index 00018fa25d8..00000000000
--- a/TAO/tests/Timeout/test_i.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Timeout
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef TAO_TIMEOUT_TEST_I_H
-#define TAO_TIMEOUT_TEST_I_H
-
-#include "testS.h"
-
-class Simple_Server_i : public POA_Simple_Server
-{
- // = TITLE
- // Simpler Server implementation
- //
- // = DESCRIPTION
- // Implements the Simple_Server interface in test.idl
- //
-public:
- Simple_Server_i (CORBA::ORB_ptr orb);
- // ctor
-
- // = The Simple_Server methods.
- CORBA::Long echo (CORBA::Long x,
- CORBA::Long msecs
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-};
-
-#endif /* TAO_TIMEOUT_TEST_I_H */
diff --git a/TAO/tests/Two_Objects/.cvsignore b/TAO/tests/Two_Objects/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Two_Objects/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Two_Objects/First_i.cpp b/TAO/tests/Two_Objects/First_i.cpp
deleted file mode 100644
index b275e55e0be..00000000000
--- a/TAO/tests/Two_Objects/First_i.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// $Id$
-//
-
-#include "First_i.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "ace/Synch.h"
-#include "ace/Auto_Event.h"
-
-ACE_RCSID(Test, First_i, "$Id$")
-
-First_i::First_i (CORBA::ORB_ptr orb, ACE_Auto_Event &two_way_done)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- two_way_done_(two_way_done)
-{
-}
-
-void
-First_i::oneway_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Oneway servant : (%P|%t) one way method called. About to wait for two way call completion\n"));
-
- two_way_done_.wait ();
-
- ACE_DEBUG ((LM_DEBUG, "Oneway servant : (%P|%t) woke up after wait\n"));
-}
diff --git a/TAO/tests/Two_Objects/First_i.h b/TAO/tests/Two_Objects/First_i.h
deleted file mode 100644
index 6fa70f53749..00000000000
--- a/TAO/tests/Two_Objects/First_i.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-#ifndef TAO_TWO_OBJECTS_FIRST_I_H
-#define TAO_TWO_OBJECTS_FIRST_I_H
-
-#include "Two_ObjectsS.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Auto_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/// Implement the Two_Objects_Test::First interface
-class First_i
- : public virtual POA_Two_Objects_Test::First
-{
-public:
-
- // Ctor..
- First_i (CORBA::ORB_ptr orb, ACE_Auto_Event &two_way_done);
-
- /// Interface methods..
- void oneway_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
- ACE_Auto_Event &two_way_done_;
-};
-
-#endif /* TAO_TWO_OBJECTS_FIRST_I_H*/
diff --git a/TAO/tests/Two_Objects/Object_Factory_i.cpp b/TAO/tests/Two_Objects/Object_Factory_i.cpp
deleted file mode 100644
index 368c3aa94ed..00000000000
--- a/TAO/tests/Two_Objects/Object_Factory_i.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// $Id$
-//
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "Object_Factory_i.h"
-#include "ace/Synch.h"
-
-ACE_RCSID(Test, Test, "$Id$")
-
-
-Object_Factory_i::Object_Factory_i (CORBA::ORB_ptr orb, CORBA::ULong len)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- length_(len)
-{
-}
-
-//factory method to create first object
-Two_Objects_Test::First_ptr
-Object_Factory_i::create_first (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- First_i *first_impl;
-
- // @@ Dont you want to transfer ownership to the POA?
- ACE_NEW_THROW_EX (first_impl,
- First_i (orb_.in(), two_way_done_ ),
- CORBA::NO_MEMORY() );
-
- Two_Objects_Test::First_var first =
- first_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER );
-
- return first._retn();
-}
-
-//factory method to create second object
-Two_Objects_Test::Second_ptr
-Object_Factory_i::create_second (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Second_i *second_impl;
-
- ACE_NEW_THROW_EX (second_impl,
- Second_i (orb_.in(),
- length_, two_way_done_),
- CORBA::NO_MEMORY ());
-
- Two_Objects_Test::Second_var second =
- second_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (Two_Objects_Test::Second::_nil ());
-
- return second._retn();
-}
diff --git a/TAO/tests/Two_Objects/Object_Factory_i.h b/TAO/tests/Two_Objects/Object_Factory_i.h
deleted file mode 100644
index fbfd2ef094c..00000000000
--- a/TAO/tests/Two_Objects/Object_Factory_i.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef OBJECT_FACTORY_I_H
-#define OBJECT_FACTORY_I_H
-
-#include "Two_ObjectsS.h"
-#include "First_i.h"
-#include "Second_i.h"
-
-#include "ace/Auto_Event.h"
-
-
-/// Implement the MTServer::Test interface
-class Object_Factory_i
- : public virtual POA_Two_Objects_Test::Object_Factory
-{
-public:
-
- Object_Factory_i (CORBA::ORB_ptr orb,
- CORBA::ULong len);
-
- Two_Objects_Test::First_ptr create_first (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- Two_Objects_Test::Second_ptr create_second (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
- CORBA::ULong length_;
- ACE_Auto_Event two_way_done_;
-};
-
-#endif /* OBJECT_FACTORY_I_H */
diff --git a/TAO/tests/Two_Objects/README b/TAO/tests/Two_Objects/README
deleted file mode 100644
index bd19ac387b8..00000000000
--- a/TAO/tests/Two_Objects/README
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
-
-@page Two_Objects Test README File
-
- This is used as an extended test for bug fix #575.
-There are two objects managed by the same POA. Before the
-bug fix, the calls to the objects on the same connection
-were serialized even when the first call was a one way call.
-The connection handle in the reactor was not 'resumed' until
-the upcall after was completed. The fix resumes the handle
-before the upcall is made, so that another thread could listen
-for subsequent requests on the same connection handle.
-
-
-Description:
-
-The server creates two servants ( each implementing different
-interfaces ). Two threads are created on the server and each
-one of them listens for requests (has a orb->run() call). The
-client first makes a one way call to Servant 1. It then makes
-a two way call to Servant 2. Servant 1 handles the oneway
-request and waits for a signal from Servant 2. Servant 2 gets
-the two way request, handles it and then wakes up Servant 1.
-We do an assertion that there is only one connection in the
-transport cache manager. If the bug fix was not working,
-Servant 2 would have never received the request and Servant 1
-will wait for ever.
-
- To run the test use the run_test.pl script:
-
-$ ./run_test.pl
-
- the script returns 0 if the test was successful.
-
-Expected output:
-
-ior file = test.ior #threads = 2 msglen = 100000 ORB timeout = 30 sec
-Client : one way call done
-Oneway servant : (<pid>|<tid>) one way method called. About to wait for
-two way call completion
-Twoway servant : (<pid>|<tid>) two way method called.
-Twoway servant : (<pid>|<tid>) about to signal one way thread.
-Oneway servant : (<pid>|<tid>) woke up after wait
-Client : length of returned data is 100000
-(<pid>|<tid>) event loop finished
-
-<pid>, <tid> will have actual values for process id and thread id.
-
-*/
-
-
-
-
-
diff --git a/TAO/tests/Two_Objects/Second_i.cpp b/TAO/tests/Two_Objects/Second_i.cpp
deleted file mode 100644
index cf3c9f5abff..00000000000
--- a/TAO/tests/Two_Objects/Second_i.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id$
-
-#include "Second_i.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "tao/Transport_Cache_Manager.h"
-#include "tao/Thread_Lane_Resources.h"
-#include "ace/Auto_Event.h"
-
-
-ACE_RCSID (Two_Objects,
- Second_i,
- "$Id$")
-
-
-Second_i::Second_i (CORBA::ORB_ptr orb,
- CORBA::ULong len, ACE_Auto_Event &two_way_done)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- length_(len),
- two_way_done_(two_way_done)
-{
-
-}
-
-Two_Objects_Test::Octet_Seq *
-Second_i::twoway_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- Two_Objects_Test::Octet_Seq *preply_mesg;
-
- ACE_NEW_THROW_EX (preply_mesg,
- Two_Objects_Test::Octet_Seq (this->length_),
- CORBA::NO_MEMORY ());
-
- Two_Objects_Test::Octet_Seq_var reply_var =
- preply_mesg;
- reply_var->length ( this->length_);
-
- ACE_DEBUG ((LM_DEBUG,
- "Twoway servant : (%P|%t) two way method called.\n"));
-
- // @@ This will not work with the latest copy of ACE+TAO :-). Irfan
- // has moved the cache somewhere else. You may want to check the
- // latest code in BiDir cals again ;)
- // @@ Try to use the current_size () instead of total_size ()
- ACE_ASSERT(this->orb_->orb_core ()->lane_resources().
- transport_cache ().current_size () == 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "Twoway servant : (%P|%t) about to signal one way thread.\n"));
-
- two_way_done_.signal ();
-
- return reply_var._retn ();
-}
-
-void
-Second_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) about to shutdown the orb\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Two_Objects/Second_i.h b/TAO/tests/Two_Objects/Second_i.h
deleted file mode 100644
index aa0375c9b2f..00000000000
--- a/TAO/tests/Two_Objects/Second_i.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#ifndef TAO_TWO_OBJECTS_SECOND_I_H
-#define TAO_TWO_OBEJCTS_SECOND_I_H
-
-#include "Two_ObjectsS.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Auto_Event;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-/// Implement the POA_Two_Objects_Test::Second interface
-class Second_i
- : public virtual POA_Two_Objects_Test::Second
-{
-public:
-
- Second_i ( CORBA::ORB_ptr orb,
- CORBA::ULong len, ACE_Auto_Event &two_way_done);
-
- Two_Objects_Test::Octet_Seq *
- twoway_method (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to conver strings to objects and shutdown
- /// the application.
- CORBA::ORB_var orb_;
- CORBA::ULong length_;
- ACE_Auto_Event &two_way_done_;
-};
-
-#endif /* TAO_TWO_OBEJCTS_SECOND_I_H*/
diff --git a/TAO/tests/Two_Objects/Two_Objects.idl b/TAO/tests/Two_Objects/Two_Objects.idl
deleted file mode 100644
index a4c985c2eac..00000000000
--- a/TAO/tests/Two_Objects/Two_Objects.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// $Id$
-//
-
-module Two_Objects_Test
-{
-
- typedef sequence<octet> Octet_Seq;
-
- /// A very simple interface
- interface First
- {
- oneway void oneway_method ();
- };
-
- interface Second
- {
- /// Return a simple string
- Octet_Seq twoway_method ();
-
- /// A method to shutdown the ORB
- oneway void shutdown ();
- };
-
- /// Factory interface to create first and second objects
- interface Object_Factory
- {
- First create_first ();
- Second create_second ();
- };
-};
diff --git a/TAO/tests/Two_Objects/Two_Objects.mpc b/TAO/tests/Two_Objects/Two_Objects.mpc
deleted file mode 100644
index 1dbe304222f..00000000000
--- a/TAO/tests/Two_Objects/Two_Objects.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver {
- Source_Files {
- worker.cpp
- First_i.cpp
- Second_i.cpp
- Object_Factory_i.cpp
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode {
- after += *Server
- Source_Files {
- Two_ObjectsC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Two_Objects/client.cpp b/TAO/tests/Two_Objects/client.cpp
deleted file mode 100644
index d93a387409a..00000000000
--- a/TAO/tests/Two_Objects/client.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-#include "Two_ObjectsC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Test, client, "$Id$")
-
-const char *ior = "file://test.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "r:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'r':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-r <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- // Used to declare the CORBA::Environment variable
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- // Initialize the ORB
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse the arguments
- if (parse_args (argc, argv) != 0)
- return 1;
-
- // Convert the ior string to an object reference.
- // The object reference obtained is a reference to the factory
- // object.
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow the object reference to the appropriate type
- Two_Objects_Test::Object_Factory_var factory =
- Two_Objects_Test::Object_Factory::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (factory.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Two_Objects_Test::Object_Factory reference <%s>\n",
- ior),
- 1);
- }
-
- Two_Objects_Test::First_var first;
- Two_Objects_Test::Second_var second;
-
- // Use the factory object to create the first and second interfaces
- first = factory->create_first();
- second = factory->create_second();
-
- // Call the oneway method
- first->oneway_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Client : one way call done\n"));
-
- Two_Objects_Test::Octet_Seq_var reply_seq =
- second->twoway_method (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Client : length of returned data is %d\n",
- reply_seq->length() ));
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Two_Objects/run_test.pl b/TAO/tests/Two_Objects/run_test.pl
deleted file mode 100755
index 9cb6615c5a4..00000000000
--- a/TAO/tests/Two_Objects/run_test.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
-$status = 0;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior -t 10 -l 100000");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -t 10 0l 100000");
-}
-$CL = new PerlACE::Process ("client", " -r file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (60);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Two_Objects/server.cpp b/TAO/tests/Two_Objects/server.cpp
deleted file mode 100644
index 639cb344ab8..00000000000
--- a/TAO/tests/Two_Objects/server.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// $Id$
-
-#include "worker.h"
-#include "Object_Factory_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/Task.h"
-
-ACE_RCSID(Test, server, "$Id$")
-
-int msglen = 100; //default length of reply message is 100 bytes
-int nthreads = 2;
-const char *ior_output_file = "test.ior";
-int timeout = 30; //default timeout for ORB is 30 sec
-
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:n:l:t:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'l':
- msglen = ACE_OS::atoi( get_opts.opt_arg ());
- break;
-
- case 'n':
- nthreads = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 't':
- timeout = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- " -n <#of threads>"
- " -l <size of message in bytes>"
- " -t <timeout for ORB in secs>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- // Initialize the ORB
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Get initial reference to the Root POA
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Narrow down to the appropriate type
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- // Get referencee to the POA manager
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Parse the arguments
- if (parse_args (argc, argv) != 0)
- return 1;
-
- ACE_DEBUG(( LM_DEBUG, "ior file = %s\t#threads = %d\t"
- "msglen = %d\tORB timeout = %d sec\n",
- ior_output_file, nthreads, msglen, timeout ));
-
- // Create the factory servant
- Object_Factory_i *factory_impl;
- ACE_NEW_THROW_EX (factory_impl,
- Object_Factory_i (orb.in (), msglen),
- CORBA::NO_MEMORY ());
-
- // _this method registers the object withe the POA and returns
- // an object reference
- Two_Objects_Test::Object_Factory_var factory =
- factory_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Convert the object reference to a string so that it can
- // be saved in a file and used by clinet programs later
- CORBA::String_var ior =
- orb->object_to_string (factory.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
-
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
-
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- // Activate the POA manager
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Instantiate the specified # of worker threads
- Worker worker (orb.in (), timeout);
-
- if (worker.activate (THR_NEW_LWP | THR_JOINABLE,
- nthreads) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot activate server threads\n"),
- 1);
-
- // Wait for all threads to get done
- worker.thr_mgr ()->wait ();
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Two_Objects/worker.cpp b/TAO/tests/Two_Objects/worker.cpp
deleted file mode 100644
index b1581d8baa9..00000000000
--- a/TAO/tests/Two_Objects/worker.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// $Id$
-//
-
-#include "worker.h"
-
-Worker::Worker (CORBA::ORB_ptr orb, int time)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- timeout_(time)
-{
-}
-
-int
-Worker::svc (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- ACE_Time_Value tv (timeout_);
-
- ///orb times out after <timeout> seconds
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- }
- ACE_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Two_Objects/worker.h b/TAO/tests/Two_Objects/worker.h
deleted file mode 100644
index 42ed1fe0cb9..00000000000
--- a/TAO/tests/Two_Objects/worker.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-#ifndef TAO_TWO_OBJECTS_WORKER_H
-#define TAO_TWO_OBJECTS_WORKER_H
-
-#include "tao/ORB.h"
-#include "ace/Task.h"
-
-// Use the ACE_Task_Base class to run server threads
-class Worker : public ACE_Task_Base
-{
-public:
-
- // Ctor
- Worker (CORBA::ORB_ptr orb, int time);
-
- // The thread entry point.
- virtual int svc (void);
-
-
-private:
- // The orb
- CORBA::ORB_var orb_;
-
- int timeout_;
-};
-
-#endif /* TAO_TWO_OBJECTS_WORKER_H */
diff --git a/TAO/tests/Typedef_String_Array/.cvsignore b/TAO/tests/Typedef_String_Array/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/Typedef_String_Array/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/Typedef_String_Array/client.cpp b/TAO/tests/Typedef_String_Array/client.cpp
deleted file mode 100644
index 4637dc4b943..00000000000
--- a/TAO/tests/Typedef_String_Array/client.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(StringArray, client, "$Id$")
-
-const char *ior = "file://server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- SimpleStrings_var server =
- SimpleStrings::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil SimpleStrings reference <%s>\n",
- ior),
- 1);
- }
-
- ArrayOfString_var the_strings;
- server->get_strings (the_strings.out () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- for(size_t i = 0; i < 15; i++)
- {
- ACE_DEBUG ((LM_DEBUG, "%s\n", the_strings[i].in ()));
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Typedef_String_Array/run_test.pl b/TAO/tests/Typedef_String_Array/run_test.pl
deleted file mode 100755
index d2391bbf584..00000000000
--- a/TAO/tests/Typedef_String_Array/run_test.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ('client', "-k file://$iorfile");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 20) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (10);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/Typedef_String_Array/server.cpp b/TAO/tests/Typedef_String_Array/server.cpp
deleted file mode 100644
index 51f5f7792af..00000000000
--- a/TAO/tests/Typedef_String_Array/server.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "testImpl.h"
-
-ACE_RCSID(MT_Client, server, "$Id$")
-
-const char *ior_output_file = "server.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- TestImpl test_impl (orb.in ());
-
- SimpleStrings_var server = test_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Typedef_String_Array/test.idl b/TAO/tests/Typedef_String_Array/test.idl
deleted file mode 100644
index 776cebb3be0..00000000000
--- a/TAO/tests/Typedef_String_Array/test.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-// $Id$
-
-// Either of these sets will work, but only the last one
-// demonstrates the original tao_idl problem.
-
-//#define MyString string
-//typedef MyString ArrayOfString[15];
-
-//typedef string MyString;
-//typedef string ArrayOfString[15];
-
-typedef string MyString;
-typedef MyString ArrayOfString[15];
-
-interface SimpleStrings
-{
- void get_strings(out ArrayOfString strings);
-};
diff --git a/TAO/tests/Typedef_String_Array/testImpl.cpp b/TAO/tests/Typedef_String_Array/testImpl.cpp
deleted file mode 100644
index a71deedee5f..00000000000
--- a/TAO/tests/Typedef_String_Array/testImpl.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-#include "testImpl.h"
-
-static const size_t maxd = 15;
-static const char* data[maxd] = { "Hi there",
- "This is a test",
- "of typedefed string",
- "arrays",
- "This test should work with either set",
- "of typedefs",
- "typedef string MyString",
- "typedef MyString ArrayOfString[15]",
- "or",
- "#define MyString string",
- "typedef MyString ArrayOfString[15]",
- "or",
- "typedef string MyString",
- "typedef string ArrayOfString[15]",
- "thats it"
- };
-
-TestImpl::TestImpl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate(orb))
-{
-}
-
-
-void
-TestImpl::get_strings (ArrayOfString_out strings
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_NEW (strings, ArrayOfString);
-
- for (size_t i = 0; i < maxd; i++)
- {
- strings[i] = data[i];
- }
-
- orb_->shutdown();
-}
diff --git a/TAO/tests/Typedef_String_Array/testImpl.h b/TAO/tests/Typedef_String_Array/testImpl.h
deleted file mode 100644
index dc1c3e5b890..00000000000
--- a/TAO/tests/Typedef_String_Array/testImpl.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// $Id$
-
-#include "testS.h"
-
-class TestImpl: public POA_SimpleStrings
-{
-public:
- TestImpl(CORBA::ORB_ptr orb);
-
- virtual void get_strings (ArrayOfString_out strings
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
diff --git a/TAO/tests/Typedef_String_Array/typedef_string_array.mpc b/TAO/tests/Typedef_String_Array/typedef_string_array.mpc
deleted file mode 100644
index a28ade36239..00000000000
--- a/TAO/tests/Typedef_String_Array/typedef_string_array.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*server): taoserver {
- Source_Files {
- server.cpp
- testImpl.cpp
- }
-}
-
-project(*client): taoclient, anytypecode {
- after += *server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
diff --git a/TAO/tests/UNKNOWN_Exception/.cvsignore b/TAO/tests/UNKNOWN_Exception/.cvsignore
deleted file mode 100644
index f2ad85300eb..00000000000
--- a/TAO/tests/UNKNOWN_Exception/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-client
-server
diff --git a/TAO/tests/UNKNOWN_Exception/README b/TAO/tests/UNKNOWN_Exception/README
deleted file mode 100644
index ee867ed21f7..00000000000
--- a/TAO/tests/UNKNOWN_Exception/README
+++ /dev/null
@@ -1,32 +0,0 @@
-# $Id$
-
-Description:
-
-This is a test for UNKNOWN exceptions raised by the server. There are
-two places where this example tests for UNKNOWN exceptions: (a)
-UNKNOWN exception raised in an upcall and (b) UNKNOWN exception raised
-while a servant is being cleaned up after deactivation. The number of
-outstanding requests in the POA are checked after each unit of work
-performed by the server. The assumption is that if the number of
-outstanding requests are correct, then the server correctly handled
-the UNKNOWN exceptions.
-
-Expected output:
-
-A successful run is one without any asserts.
-
-The server should say:
-
-- test_i::normal_method() called
-
-- test_i::unknown_exception_in_method() called
- Unknown exception being generated: should be propagated to the client
-
-- test_i::unknown_exception_during_deactivation() called
- Unknown exception being generated: should be gobbled up by the POA
-
-
-And the client should say:
-
-CORBA::UNKNOWN was thrown by the server during test::unknown_exception_in_method()
- This is expected behavior
diff --git a/TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc b/TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc
deleted file mode 100644
index 0fe69a4a621..00000000000
--- a/TAO/tests/UNKNOWN_Exception/UNKNOWN_Exception.mpc
+++ /dev/null
@@ -1,17 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, exceptions {
- Source_Files {
- server.cpp
- }
-}
-
-project(*Client): taoclient, anytypecode, exceptions {
- after += *Server
- Source_Files {
- testC.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/UNKNOWN_Exception/client.cpp b/TAO/tests/UNKNOWN_Exception/client.cpp
deleted file mode 100644
index 548b4b99e94..00000000000
--- a/TAO/tests/UNKNOWN_Exception/client.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testC.h"
-
-ACE_RCSID (UNKNOWN_Exception, client, "$Id$")
-
-static const char *ior = "file://ior";
-static int shutdown_server = 1;
-
-static int
-parse_args (int argc, char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:x:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case 'x':
- shutdown_server = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "\nusage %s:\n"
- "\t-k <ior> [defaults to %s]\n"
- "\t-x <shutdown server> [defaults to %d]\n"
- "\n",
- argv [0],
- ior,
- shutdown_server),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- try
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- 0);
-
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
- CORBA::Object_var object =
- orb->string_to_object (ior);
-
- test_factory_var test_factory =
- test_factory::_narrow (object.in ());
-
- test_var test =
- test_factory->create_test ();
-
- test->normal_method ();
-
- int unknown_exception_raised = 0;
-
- try
- {
- test->unknown_exception_in_method ();
- }
- catch (CORBA::UNKNOWN)
- {
- unknown_exception_raised = 1;
-
- ACE_DEBUG ((LM_DEBUG,
- "\nCORBA::UNKNOWN was thrown by the server during test::unknown_exception_in_method()\n"
- "\tThis is expected behavior\n\n"));
- }
-
- ACE_ASSERT (unknown_exception_raised == 1);
- unknown_exception_raised = 0;
-
- test->unknown_exception_during_deactivation ();
-
- if (shutdown_server)
- test_factory->shutdown ();
- }
- catch (...)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Failure: Unexpected exception caught\n"),
- -1);
- }
-
- return 0;
-}
diff --git a/TAO/tests/UNKNOWN_Exception/run_test.pl b/TAO/tests/UNKNOWN_Exception/run_test.pl
deleted file mode 100755
index 9334b4edbd4..00000000000
--- a/TAO/tests/UNKNOWN_Exception/run_test.pl
+++ /dev/null
@@ -1,49 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -x 1");
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = -1;
-$client = $CL->SpawnWaitKill (200);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $iorfile;
-
-exit $status;
diff --git a/TAO/tests/UNKNOWN_Exception/server.cpp b/TAO/tests/UNKNOWN_Exception/server.cpp
deleted file mode 100644
index 2beb08f85fa..00000000000
--- a/TAO/tests/UNKNOWN_Exception/server.cpp
+++ /dev/null
@@ -1,257 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "testS.h"
-#include "tao/PortableServer/Root_POA.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (UNKNOWN_Exception, server, "$Id$")
-
-const char *ior_output_file = "ior";
-static int done = 0;
-
-void
-throw_exception (void)
-{
- throw 1;
-}
-
-class test_i :
- public POA_test
-{
-public:
-
- test_i (CORBA::ORB_ptr orb);
-
- void normal_method (void)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void unknown_exception_in_method (void)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void unknown_exception_during_deactivation (void)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void _add_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- void _remove_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- CORBA::ORB_var orb_;
-
- int reference_count_;
-};
-
-test_i::test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- reference_count_ (1)
-{
-}
-
-void
-test_i::normal_method (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::normal_method() called\n"));
-}
-
-void
-test_i::unknown_exception_in_method (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::unknown_exception_in_method() called\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Unknown exception being generated: should be propagated to the client\n"));
-
- throw_exception ();
-}
-
-void
-test_i::unknown_exception_during_deactivation (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::unknown_exception_during_deactivation() called\n"));
-
- PortableServer::POA_var poa =
- this->_default_POA ();
-
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this);
-
- poa->deactivate_object (id.in ());
-}
-
-void
-test_i::_add_ref (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::_add_ref() called; current refcount = %d\n",
- this->reference_count_++));
-}
-
-void
-test_i::_remove_ref (ACE_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG,
- "test_i::_remove_ref() called; current refcount = %d\n",
- this->reference_count_--));
-
- if (this->reference_count_ == 0)
- {
- delete this;
-
- ACE_DEBUG ((LM_DEBUG,
- "Unknown exception being generated: should be gobbled up by the POA\n"));
-
- throw_exception ();
- }
-}
-
-class test_factory_i :
- public POA_test_factory
-{
-public:
-
- test_factory_i (CORBA::ORB_ptr orb);
-
- test_ptr create_test (void)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (void)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- CORBA::ORB_var orb_;
-};
-
-test_factory_i::test_factory_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-test_ptr
-test_factory_i::create_test (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- test_i *servant =
- new test_i (this->orb_.in ());
-
- PortableServer::ServantBase_var safe_servant (servant);
- ACE_UNUSED_ARG (safe_servant);
-
- test_var test =
- servant->_this ();
-
- return test._retn ();
-}
-
-void
-test_factory_i::shutdown (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "factory_i::shutdown() called\n"));
-
- done = 1;
- this->orb_->shutdown (0);
-}
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "\nusage %s:\n"
- "\t-o <ior output file> [defaults to %s]\n"
- "\n",
- argv [0],
- ior_output_file),
- -1);
- }
-
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- try
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- "");
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA");
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ());
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager ();
-
- if (parse_args (argc, argv) != 0)
- return -1;
-
- {
- test_factory_i *servant =
- new test_factory_i (orb.in ());
-
- PortableServer::ServantBase_var safe_servant (servant);
- ACE_UNUSED_ARG (safe_servant);
-
- test_factory_var test_factory =
- servant->_this ();
-
- CORBA::String_var ior =
- orb->object_to_string (test_factory.in ());
-
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate ();
-
- TAO_Root_POA *tao_poa = dynamic_cast <TAO_Root_POA*> (root_poa.in ());
-
- while (!done)
- {
- CORBA::ULong outstanding_requests =
- tao_poa->outstanding_requests ();
-
- ACE_DEBUG ((LM_DEBUG,
- "Number of outstanding requests before ORB::perform_work(): %d\n",
- outstanding_requests));
-
- ACE_ASSERT (outstanding_requests == 0);
-
- orb->perform_work ();
- }
- }
- catch (...)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Failure: Unexpected exception caught\n"),
- -1);
- }
-
- return 0;
-}
diff --git a/TAO/tests/UNKNOWN_Exception/test.idl b/TAO/tests/UNKNOWN_Exception/test.idl
deleted file mode 100644
index 8502c8d5cd8..00000000000
--- a/TAO/tests/UNKNOWN_Exception/test.idl
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// $Id$
-//
-
-
-interface test
-{
- void normal_method ();
- void unknown_exception_in_method ();
- void unknown_exception_during_deactivation ();
-};
-
-interface test_factory
-{
- test create_test ();
- void shutdown ();
-};
-
diff --git a/TAO/tests/Xt_Stopwatch/.cvsignore b/TAO/tests/Xt_Stopwatch/.cvsignore
deleted file mode 100644
index 955ffdc75d5..00000000000
--- a/TAO/tests/Xt_Stopwatch/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-client
-client
-server
-server
diff --git a/TAO/tests/Xt_Stopwatch/Client.h b/TAO/tests/Xt_Stopwatch/Client.h
deleted file mode 100644
index 978e0f3c3b1..00000000000
--- a/TAO/tests/Xt_Stopwatch/Client.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Xt_Stopwatch/Stopwatch_client
-//
-// = FILENAME
-// Client.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef CLIENT_H
-#define CLIENT_H
-
-#include "testC.h"
-
-
-#include "tao/XtResource_Loader.h"
-class Control;
-
-class Client
-{
-public:
-
- Client (CORBA::ORB_ptr orb);
- // ctor
-
- ~Client (void);
- //Dtor..
-
- static void start_callback (Widget w,
- XtPointer client_data,
- XtPointer call_data);
- static void stop_callback (Widget w,
- XtPointer client_data,
- XtPointer call_data);
- // The callbacks
-
- void start_hook (void);
- void stop_hook (void);
- // The hooks...
-
- void add_callback (Control &);
- // Adds the callbacks to the GUI underneath.....
-
- void parse_args (int argc, char *argv[]
- ACE_ENV_ARG_DECL);
-private:
-
- CORBA::ORB_var orb_;
- // The ORB
-
- Stopwatch_var server_;
- // The server.
-};
-
-#endif /* CLIENT_H */
diff --git a/TAO/tests/Xt_Stopwatch/Control.cpp b/TAO/tests/Xt_Stopwatch/Control.cpp
deleted file mode 100644
index 6d3de01204b..00000000000
--- a/TAO/tests/Xt_Stopwatch/Control.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-#include "Control.h"
-
-
-Control::Control (Widget &parent)
-{
- // Instantiate the sub-components of the Control
- this->frame_ = XmCreateFrame (parent,
- (char *) "frame",
- 0,
- 0 );
-
- this->rowcolumn_ = XmCreateRowColumn (this->frame_,
- (char *)"rwc",
- 0,
- 0 );
-
- this->startwidget_ = XmCreatePushButton (this->rowcolumn_,
- (char *) "Start",
- 0,
- 0);
-
- this->stopwidget_ = XmCreatePushButton (this->rowcolumn_,
- (char *) "Stop",
- 0,
- 0);
-}
-
-Control::~Control (void)
-{
-}
-
-void
-Control::manage (void)
-{
- XtManageChild (frame_);
- XtManageChild (rowcolumn_);
- XtManageChild (startwidget_);
- XtManageChild (stopwidget_);
-}
-
-Widget &
-Control::startwidget (void)
-{
- return this->startwidget_;
-}
-
-Widget &
-Control::stopwidget (void)
-{
- return this->stopwidget_;
-}
-
diff --git a/TAO/tests/Xt_Stopwatch/Control.h b/TAO/tests/Xt_Stopwatch/Control.h
deleted file mode 100644
index 0dea6b7eed9..00000000000
--- a/TAO/tests/Xt_Stopwatch/Control.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Xt_Stopwatch/Stopwatch_client
-//
-// = FILENAME
-// Control.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef CONTROL_H
-#define CONTROL_H
-#include "Client.h"
-
-
-#include <Xm/Xm.h>
-#include <Xm/PushB.h>
-#include <Xm/Label.h>
-#include <Xm/RowColumn.h>
-#include <Xm/Frame.h>
-
-
-class Control
-{
- public:
- Control (Widget &parent);
- // Stopwatch constructor
-
- virtual ~Control (void);
- // Destructor
-
- virtual void manage (void);
- // Manage the widget
-
- Widget& startwidget (void);
- // Return the start widget
-
- Widget& stopwidget (void);
- // Return the stop widget..
-
- private:
-
- Widget frame_;
- // A frame widget...
-
- Widget rowcolumn_;
- // A row column widget..
-
- Widget startwidget_;
- // Pushbutton Widget that is used to start the timer..
-
- Widget stopwidget_;
- // Pushbutton widget that is used to stop the timer..
-
-};
-
-
-#endif /* CONTROL_H */
diff --git a/TAO/tests/Xt_Stopwatch/README b/TAO/tests/Xt_Stopwatch/README
deleted file mode 100644
index 85040fb2895..00000000000
--- a/TAO/tests/Xt_Stopwatch/README
+++ /dev/null
@@ -1,35 +0,0 @@
-# $Id$
-
-Introduction:
-
-This example illustrates the usage of the XtReactor from TAO. The
-server creates a small display dialog and the client displays a dialog
-with a start and stop button. On pressing the start button the server
-dialog box starts a stopwatch. On the pressing the stop the stopwatch
-stops. On repressing the start the stopwatch resets and start all over
-again.
-
-To run the server and the client simply do the following:
-
-$ server -o foo.ior
-$ client -k file://foo.ior
-
-Note: this test only does something useful if the Xtoolkit is enabled
-and the executables linked against the following libraries Xm, Xt &
-X11.
-
----------------------------------------------------------------------
-Technical Description:
-
-In addition to specifying the resources that the ORB needs to allocate
-for an Xt event loop, the ORB also needs the information about the
-XtAppContext in which the user application is initialised. To provide
-these information TAO provides a class by name TAO_XtResource_Loader which is
-responsible for create and instance of TAO_XtResource_Factory that inherits
-from the TAO_Default_Resource_factory. TAO_XtResource_Loader has a constructor
-parameterized the application context necessary for integration of ACE_XtReactor
-with Xt event loop.
-
-Please notice also that the server and client run on the Xt event loop by
-calling the XtAppMainLoop ().
-
diff --git a/TAO/tests/Xt_Stopwatch/Stopwatch_display.cpp b/TAO/tests/Xt_Stopwatch/Stopwatch_display.cpp
deleted file mode 100644
index 9f55249b27b..00000000000
--- a/TAO/tests/Xt_Stopwatch/Stopwatch_display.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id$
-
-#include "Stopwatch_display.h"
-
-
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Xt_Stopwatch,
- Stopwatch_display,
- "$Id$")
-
-
-Stopwatch_display::Stopwatch_display (Widget &parent)
-{
- // Instantiate the sub-components of the Stopwatch_display
- this->frame_ = XtCreateWidget ("frame",
- xmFrameWidgetClass,
- parent,
- 0,
- 0);
-
- this->label_ = XtCreateWidget ("label",
- xmLabelWidgetClass,
- this->frame_,
- 0,
- 0);
-}
-
-Stopwatch_display::~Stopwatch_display (void)
-{
- //No-op
-}
-
-void
-Stopwatch_display::manage (void)
-{
- XtManageChild (this->frame_);
- XtManageChild (this->label_);
-}
-
-void
-Stopwatch_display::set_time (CORBA::Float time)
-{
- char buf[50];
-
- // Format value as a string
- ACE_OS::sprintf (buf, "%6.3f", time);
-
- // Convert to compound string
- XmString xmstr = XmStringCreateSimple (buf);
-
- // Display the string in the Label widget
- XtVaSetValues (this->label_, XmNlabelString, xmstr, NULL);
- //??Can use XtSetValues with ac and al values..
-
- // The compound string can be freed once passed to the widget
- XmStringFree (xmstr);
-}
-
diff --git a/TAO/tests/Xt_Stopwatch/Stopwatch_display.h b/TAO/tests/Xt_Stopwatch/Stopwatch_display.h
deleted file mode 100644
index 984d90b4d35..00000000000
--- a/TAO/tests/Xt_Stopwatch/Stopwatch_display.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Xt_Stopwatch/Stopwatch_server
-//
-// = FILENAME
-// Stopwatch.h
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef STOPWATCH_H
-#define STOPWATCH_H
-#include /**/ "ace/pre.h"
-#include "tao/ORB_Constants.h"
-
-#include <Xm/Xm.h>
-#include <Xm/Frame.h>
-#include <Xm/Label.h>
-
-class Stopwatch_display
-{
-public:
-
- Stopwatch_display (Widget &parent);
- // Stopwatch_display constructor
-
- virtual ~Stopwatch_display (void);
- // Destructor
-
- virtual void manage (void);
- // Manage the widget
-
- void set_time (CORBA::Float value);
- // Change the displayed time
-
-private:
- Widget frame_;
- // A frame widget...
-
- Widget label_;
- // Label Widget that is used to display time..
-};
-
-
-#include /**/ "ace/post.h"
-#endif /* STOPWATCH_H */
diff --git a/TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc b/TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc
deleted file mode 100644
index cbfa1580e94..00000000000
--- a/TAO/tests/Xt_Stopwatch/Xt_Stopwatch.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoexe, portableserver, tao_xtresource, ace_motif {
- Source_Files {
- test_i.cpp
- Stopwatch_display.cpp
- timer.cpp
- server.cpp
- }
-}
-
-project(*Client): taoexe, tao_xtresource, ace_motif {
- after += *Server
- Source_Files {
- testC.cpp
- Control.cpp
- client.cpp
- }
-}
-
diff --git a/TAO/tests/Xt_Stopwatch/client.cpp b/TAO/tests/Xt_Stopwatch/client.cpp
deleted file mode 100644
index 713ddb68f84..00000000000
--- a/TAO/tests/Xt_Stopwatch/client.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-// $Id$
-
-#include "testC.h"
-#include "ace/Get_Opt.h"
-
-ACE_RCSID(Xt_Stopwatch, client, "$Id$")
-
-#include "Control.h"
-#include "Client.h"
-
-
-int
-main (int argc, char *argv[])
-{
- XtAppContext app;
- Widget toplevel = XtAppInitialize (&app,
- "Start & Stop",
- NULL,
- 0,
- &argc,
- argv,
- NULL,
- NULL,
- 0);
-
- TAO::XtResource_Loader xt_loader (app);
-
- Control control (toplevel);
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Client client (orb.in ());
-
- client.parse_args (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- client.add_callback (control);
-
- // Manage the widgets
- control.manage ();
- XtRealizeWidget (toplevel);
- XtAppMainLoop (app);
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
-Client::Client (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-
-Client::~Client (void)
-{
-}
-
-void
-Client::parse_args (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
-{
- const char *ior = "file://test.ior";
-
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]));
- }
-
- CORBA::Object_var object =
- this->orb_->string_to_object (ior ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->server_ =
- Stopwatch::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil(this->server_.in ()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "\n The server value is nil "));
- }
-}
-
-void
-Client::add_callback (Control &ctrl)
-{
- XtPointer client_data = static_cast<XtPointer> (this);
-
- // Register callbacks, specifying the object's instance pointer as
- // client data.
- XtAddCallback (ctrl.startwidget (),
- XmNactivateCallback,
- &Client::start_callback,
- client_data);
-
- XtAddCallback (ctrl.stopwidget (),
- XmNactivateCallback,
- &Client::stop_callback,
- client_data);
-}
-
-void
-Client::start_callback (Widget /*widget*/,
- XtPointer client_data,
- XtPointer)
-{
- Client *self = static_cast<Client *> (client_data);
- self->start_hook ();
-}
-
-void
-Client::stop_callback (Widget /*widget*/,
- XtPointer client_data,
- XtPointer )
-{
- Client *self = static_cast<Client *> (client_data);
- self->stop_hook ();
-}
-
-void
-Client::start_hook (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->server_->start (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught an exception in the start button callback");
- return;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-void
-Client::stop_hook (void)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- this->server_->stop (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught an exception in the stop button callback");
- return;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
diff --git a/TAO/tests/Xt_Stopwatch/run_test.pl b/TAO/tests/Xt_Stopwatch/run_test.pl
deleted file mode 100755
index 546d8c8b716..00000000000
--- a/TAO/tests/Xt_Stopwatch/run_test.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$file = PerlACE::LocalFile ("test.ior");
-
-unlink $file;
-
-$SV = new PerlACE::Process ("server", "-o $file");
-$CL = new PerlACE::Process ("client", "file://$file");
-
-print STDERR "\n\n==== XtReactor demo test\n";
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($file, 3) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-unlink $file;
-
-exit $status;
diff --git a/TAO/tests/Xt_Stopwatch/server.cpp b/TAO/tests/Xt_Stopwatch/server.cpp
deleted file mode 100644
index 374dcb368f0..00000000000
--- a/TAO/tests/Xt_Stopwatch/server.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Xt_Stopwatch,
- server,
- "$Id$")
-
-#include "tao/XtResource_Loader.h"
-#include <Xm/Xm.h>
-#include "Stopwatch_display.h"
-#include "timer.h"
-
-const char *ior_output_file = 0;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- // We do the command line parsing first
- if (parse_args (argc, argv) != 0)
- return 1;
-
- XtAppContext app;
- Widget toplevel = XtAppInitialize (&app,
- "Stopwatch",
- NULL,
- 0,
- &argc,
- argv,
- NULL,
- NULL,
- 0);
-
- TAO::XtResource_Loader xt_loader (app);
-
- Stopwatch_display stopwatch (toplevel);
-
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- stopwatch.manage ();
-
- // Make a timer class
- Timer_imp timer (app, 100, &stopwatch);
-
- Stopwatch_imp server_impl (orb.in (), &timer);
-
- Stopwatch_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- XtRealizeWidget (toplevel);
- /* Looks like there seems to be a problem with ST cases using
- XtAppMainLoop. Havent been able to figure out what the
- problem could be. The funny part is that orb->run () works
- fine. The XtRector actually calls XtAppProcessEvent (), which
- actually does something similar to this. Need to investigate
- this when we have time*/
-#if defined (ACE_HAS_THREADS)
- XtAppMainLoop (app);
-#else
- orb->run ();
-#endif /*ACE_HAS_THREADS*/
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- return 1;
- }
- ACE_ENDTRY;
- return 0;
-}
-
diff --git a/TAO/tests/Xt_Stopwatch/test.idl b/TAO/tests/Xt_Stopwatch/test.idl
deleted file mode 100644
index 74e2d42aa80..00000000000
--- a/TAO/tests/Xt_Stopwatch/test.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-// $Id$
-
-interface Stopwatch
-{
- void start ();
- // Start the Stop watch
-
- void stop ();
- // Stop the watch
-
- void shutdown ();
- // Shutdown the ORB
-};
diff --git a/TAO/tests/Xt_Stopwatch/test_i.cpp b/TAO/tests/Xt_Stopwatch/test_i.cpp
deleted file mode 100644
index de99f651892..00000000000
--- a/TAO/tests/Xt_Stopwatch/test_i.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id$
-
-#include "test_i.h"
-
-ACE_RCSID(Xt_Stopwatch, test_i, "$Id$")
-
-Stopwatch_imp::Stopwatch_imp (CORBA::ORB_ptr orb, Timer_imp *timer)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- timer_ (timer)
-{
-}
-
-void
-Stopwatch_imp::start (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->timer_->start ();
-}
-
-void
-Stopwatch_imp::stop (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->timer_->stop ();
-}
-
-void
-Stopwatch_imp::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0);
-}
-
diff --git a/TAO/tests/Xt_Stopwatch/test_i.h b/TAO/tests/Xt_Stopwatch/test_i.h
deleted file mode 100644
index 33e4e0e826f..00000000000
--- a/TAO/tests/Xt_Stopwatch/test_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Xt_Stopwatch
-//
-// = FILENAME
-// test_i.h
-//
-// = AUTHOR
-// Bala
-//
-// ============================================================================
-
-#ifndef SERVER_TEST_I_H
-#define SERVER_TEST_I_H
-
-#include "testS.h"
-#include "timer.h"
-
-
-class Stopwatch_imp : public POA_Stopwatch
-{
- // = TITLE
- // Stopwatch implementation class
- //
- // = DESCRIPTION
- // Implements the Stopwatch interface in test.idl
- //
-public:
- Stopwatch_imp (CORBA::ORB_ptr, Timer_imp *);
- // ctor
-
- // = The Simple_Server methods.
- void start (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void stop (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
- // The ORB
-
- Timer_imp *timer_;
- // Hold the timer object...
-};
-
-#endif /* SERVER_TEST_I_H */
diff --git a/TAO/tests/Xt_Stopwatch/timer.cpp b/TAO/tests/Xt_Stopwatch/timer.cpp
deleted file mode 100644
index ce807616e3e..00000000000
--- a/TAO/tests/Xt_Stopwatch/timer.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-//$Id$
-#include "timer.h"
-
-
-Timer_imp::Timer_imp (XtAppContext &app,
- CORBA::Long interval,
- Stopwatch_display *stopwatch)
- :stopwatch_ (stopwatch),
- counter_ (0),
- interval_ (interval),
- id_ (0),
- app_ (app)
-{
-}
-
-void
-Timer_imp::start (void)
-{
- // Reset the elapsed time
- this->counter_ = 0;
-
- // If a previous callback is still in effect, remove it
- if (this->id_)
- {
- XtRemoveTimeOut (this->id_);
- this->id_ = 0;
- }
-
- // Register a function to be called in interval_ milliseconds
- this->id_ = XtAppAddTimeOut (this->app_,
- this->interval_,
- &Timer_imp::tick_callback,
- (XtPointer) this );
-}
-
-void
-Timer_imp::stop (void)
-{
- // Remove the current timeout function, if any
- if (this->id_)
- XtRemoveTimeOut (this->id_);
-
- this->id_ = 0;
-}
-
-CORBA::Float
-Timer_imp::elapsed_time(void)
-{
- return ((CORBA::Float) counter_ * interval_ / 1000.0 );
-}
-
-void
-Timer_imp::tick_callback (XtPointer client_data,
- XtIntervalId * )
-{
- // Get the object pointer and call the corresponding tick function
- Timer_imp *obj = static_cast<Timer_imp *> (client_data);
- obj->tick ();
-}
-
-
-void
-Timer_imp::tick (void)
-{
- // Increment a counter for each tick
- counter_++;
-
- // Call derived class function to report time
- this->report_time (this->elapsed_time ());
-
- // Reinstall the timeout callback
- this->id_ = XtAppAddTimeOut (app_,
- interval_,
- &Timer_imp::tick_callback,
- (XtPointer) this);
-}
-
-void
-Timer_imp::report_time (CORBA::Float time)
-{
- stopwatch_->set_time (time);
-}
-
-
diff --git a/TAO/tests/Xt_Stopwatch/timer.h b/TAO/tests/Xt_Stopwatch/timer.h
deleted file mode 100644
index 6c2362cb1a3..00000000000
--- a/TAO/tests/Xt_Stopwatch/timer.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Xt_Stopwatch
-//
-// = FILENAME
-// timer.h
-//
-// = AUTHOR
-// Bala <bala@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TIMER_H
-#define TIMER_H
-
-#include "Stopwatch_display.h"
-
-
-#include <Xm/Xm.h>
-
-
-class Timer_imp
-{
- public:
-
- Timer_imp (XtAppContext &,
- CORBA::Long,
- Stopwatch_display *);
- // Constructor..
-
- void start (void);
- // Resets, and starts the clock ticking
-
- void stop (void);
- // Stops the clock
-
- CORBA::Float elapsed_time (void);
- // Returns time since timer started
-
- private:
-
- static void tick_callback (XtPointer,
- XtIntervalId *);
- // Static member function used for TimeOut callback.
-
- void tick (void);
- // Called every interval_ milliseconds
-
- virtual void report_time (CORBA::Float);
- // Called at each clock tick...
-
- Stopwatch_display *stopwatch_;
- // A copy of the stopwatch object
-
- CORBA::Long counter_;
- // Current number of ticks
-
- CORBA::Long interval_;
- // Time in milliseconds between updates
-
- XtIntervalId id_;
- // Identifier of current TimeOut
-
- XtAppContext app_;
- // Required by Xt functions
-};
-
-
-#endif /* TIMER_H */
diff --git a/TAO/tests/tests.mwc b/TAO/tests/tests.mwc
deleted file mode 100644
index dd297256b34..00000000000
--- a/TAO/tests/tests.mwc
+++ /dev/null
@@ -1,5 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-workspace {
-}